Stripe error: You must supply either a card or a c

  • Posts: 60
  • Thank you received: 1
10 years 1 month ago #176634

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.2.2

Hi,
I've just created a Stripe account and want to add this method to my site.
I've settled both secrete key and publishable Key of my Stripe account But testing it I get the error:
You must supply either a card or a customer id
and the order is cancelled.
Any hint?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #176641

Hi,

When testing it in frontend, do you have filled the credit card information with a valid credit card ?

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 1 month ago #176741

Yes, I used mine... and even the credit card's data for test on Stripe's web site.

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 4 weeks ago #177157

So, it is possible to get support for this, please?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 4 weeks ago #177197

Hi,

Here is a thread about the same issue:
www.hikashop.com/forum/install-update/87...edirect-failing.html

There are two links to two other threads with potential solutions and also another potential solution at the end of this thread so please try them all and report how it went.

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 4 weeks ago #177276

Hi,
yes I've seen those posts and:

www.hikashop.com/forum/payment-methods/8...-working.html#157015
I've replaced the files manually too. Error persists.

www.hikashop.com/forum/payment-methods/8...-failing.html#145529
Error log file is empty. Error persists.

Still www.hikashop.com/forum/payment-methods/8...-failing.html#145529
I can't find

var stripeResponseHandler = function(status, response)
	{
		var $form = $("#payment-form");
		if (response.error)
		{
			alert(response.error.message);
			$form.find(".payment-errors").text(response.error.message);
			$form.find("button").prop("disabled", false);
		}
		else
		{
			var token = response.id;
			$form.append($("<input type=\'hidden\' name=\'stripeToken\' />").val(token));
			$form.get(0).submit();
		}
	};
as I have
Stripe.setPublishableKey("'.$this->payment_params->publishable_key.'");
	hkjQuery(function($)
	{
		$("#payment-form").submit(function(e)
		{
			var $form = $(this);
			$form.find("button").prop("disabled", true);
			Stripe.createToken($form,
				function(status, response)
				{
					var $form = hkjQuery("#payment-form");
					if (response.error)
					{
						alert(response.error.message);
						$form.find(".payment-errors").text(response.error.message);
						$form.find("button").prop("disabled", false);
					}
					else
					{
						var token = response.id;
						$form.append(hkjQuery("<input type=\'hidden\' name=\'stripeToken\' />").val(token));
						$form.get(0).submit();
					}
				}
			);
			return false;
		});
	});
so I assume I have a newer file version

Still www.hikashop.com/forum/payment-methods/8...-failing.html#145529
I already have the instruction
hikashop_loadJsLib('jquery');
in my file. I tested the reverse (
$doc->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js');
but the error persists.

www.hikashop.com/forum/install-update/87...edirect-failing.html
I deleted the files too and re-uploaded them (both in front and back end). The error persists.

www.hikashop.com/forum/payment-methods/8...-working.html#157015
I don't understand "readded it inside the Hikashop component panel" so I did nothing.

www.hikashop.com/forum/payment-methods/8...-failing.html#147181
As above, I already have the command
hikashop_loadJsLib('jquery');
and already tested it. The error persists.

So, next step?

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 3 weeks ago #177601

Hi,
I've just tested Stripe account with akeeba subscription component and it works fine!
So the problem is definitely related to Hikashop's Stripe plugin.
Can I have support, please?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 weeks ago #178215

Hi,

I will take in charge this thread.
I saw that your strip plugin is no more visible (what I can easily understand) ; would it be possible to have a test account in your website in order to make some fast tests ?
If I can access to your backend, I will be able to publish temporally the plugin, make the test and unpublish the plugin afterwards.
The stripe plugin is highly based on javascript which make it very complicated to debug ; depending the website, the plugin can react differently. That's why it is difficult for us to reproduce the issues.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 3 weeks ago #178231

Hi,
I just sent you a private message.
Thank you!

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 weeks ago #178265

Hi,

When you submit the form ; the stripe.js lib is called to generate some special content (including a token).
If you check your Javascript console log, you will be able to find this message

Uncaught Error: Your key is invalid, as it contains whitespace. For more info, see https://stripe.com/docs/stripe.js 
So I edit your stripe configuration in order to remove the spaces beore and after the content.

Unfortunately after that, I tried to make a test order but the javascript script from stripe seems to enter an infinite loop and my browser crashed the tab.
For the rest of the tests ; I will recommend you to talk directly with the stripe support. I am able to fix some issues in HikaShop but what happen in the stripe library is out of my knowledge.

Kind regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 2 weeks ago #178543

Hi Jerome,
thanks for your support.

While I really don't understan why I have to contact Stripe's support for something developed by you... (this is really strange to me), anyway herewith you can find their answer:

Unfortunately, it's difficult for me to diagnose what could be going wrong here without seeing the code in question. To clarify, we have a large number of users using Stripe.js, and nobody else is having issues with an infinite loop causing the browser to crash. This leads me to believe that there is something specific to the integration, and not actually Stripe causing the problem. I would highly recommend you (or the Hikashop team) add instrumentation / logging to the integration so you can begin to debug what is going wrong here.

Sorry I don't have a better answer – but I hope this helps!


Actually I have to confirm that it works fine with Akeeba subscriptions extension. Really, with it I just entered the keys and it works like a charms.
I'm available to test (on another test site so we haven't any problems with tests).
Please, let me know how you want to proceed.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 weeks ago #178544

Hi,

Because even if we developed the implementation, your problem was a configuration issue (no bug in our plugin).
The javascript issue I got during my test was an issue with the javascript code from: js.stripe.com/v2/
That's why I asked you to make one test in HikaShop in order to see if you got the same issue than mine and asked more details to Stripe ; because we are not responsible of the code that we did not write :)

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 2 weeks ago #178634

Hi,
To be honest I don't like your reply at all.
js.stripe.com/v2/ is used to every (I mean, every) plugin to get an answer from Stripe. In your reply you are implicitly stating js.stripe.com/v2/ return error only when used by your plugin, so the problem is within js.stripe.com/v2/.

I repeat, js.stripe.com/v2/ is used even by akeeba subscription component and it works perfectly.

But for a moment, and only for a moment, let's say is js.stripe.com/v2/ to not work properly only with your plugin. So what? It's not even your interest to get your plugin working fine?

Stripe's support team is more than happy to give you the details you need to refine your plugin while I have not any idea where to start from.

So please, as there is not much to configure (there are only two alphanumeric strings to set and the same strings work perfectly on akeeba component), ask to Stripe's team what you need to know in order to fix this problem.
Thank you.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 2 weeks ago #178753

Hi,

First, as Jerome said, the plugin is working fine on other merchants website. So it seems to be some kind of conflict on your website.
Second, the problem happens after you click on the submit form of the credit card form and that part is handled by the javascript code of the Stripe javascript library that we're using in the plugin. We don't say that we don't want to fix the problem, but that the problem happens in a code that we don't know. That's why Jerome recommended that you contact the Stripe support so that they can look at the issue on your website (as it doesn't happens on our end, so we can't show the problem to them otherwise), so that they can analyze the issue and tell us if they have more information on the issue so that we can fix it, or tell you if it's something else on your website causing the problem, or fix the problem in the stripe library if it's something on their end (probably not).
We'll be happy to fix the problem if it's something which is fixable in the stripe plugin.

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 2 weeks ago #178819

Hi Nicolas,
Thank you for your reply.

I didn't received the "nested" message

nicolas wrote: ... so that they can analyze the issue and tell us if they have more information on the issue so that we can fix it.


Anyway, it is (to me, at least) clear that the more information (about something I've not developed) I have to report to a thirdy part service supplier the better. Otherwise they say the same of you "it works fine with every other plugins" and I'm not able to fix the problem.
The odd part is all the time we all spend to read the messages and reply to each while a your reply like "Please ask to Stripe's team to check A, B, C, D because we can't verify E, F, G in Stripe's library" would be much more help.
Just my 2cent point of view.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 2 weeks ago #179248

Hi,

So were you able to get any information from them regarding the problem with that payment method on your website ?

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 1
10 years 2 weeks ago #179273

Hi Nicolas,
Thanks for your reply.

Yes, I've got their check into your code but they didn't see anything wrong into it.
So, Your code is right, their class is right.

Below the line, I've a problem but not a solution. :silly:

I loooked into plugins list to disable someone could conflict with your code but I don't see anyone could do it as I have only two other components installed (more than Joomla's default installation) and once disabled them I have no more to test.

I should set up a test site clone of the original to made tests as long as I find which is the problem but only thinkng to install Falang and let it works with multi language/multi menu I die. Stéphane (at Faboba) worked very hard on my site to let Falang working fine and I'm not able to replicate his work, nor I can ask him to do it again only to set up a test site. So, there is not a solution with this condition.

Thank you anyway.

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum