[SOLVED] Stripe Payments Failing

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #145529

-- url of the page with the problem -- : www.wendy-brown-art.co.uk
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.2
-- PHP version -- : 5.3.8
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : Error charge : You must supply either a card or a customer id

I am trying to set up Swipe as a payment method but get the following error:

Error charge : You must supply either a card or a customer id

Looking at the log in the Stripe Dashbord it reports:

Parsed Request POST Body
{
amount: "5350"
currency: "GBP"
description: "Order number : 77"
}

Response body
{
error:
type: "invalid_request_error"
message: "You must supply either a card or a customer id"
}

I am using Stripe in test mode and SSL is installed on the domain.

Regards
Trevor

Last edit: 10 years 8 months ago by trevsmiff.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #145539

Hi,
Can you show me through some screenshots how did you configured your Stripe payment method configuration page ?

Last edit: 10 years 9 months ago by Mohamed Thelji.

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #145541

Hi Mohamed
Here is a screenshot:
(I have disabled the plugin at the moment as the site is live.)

Attachments:

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #145839

A few days ago I added GBP as a currency to plugins/hikashoppayment/stripe/stripe.php Perhaps there is something else I should have changed as well?

Trevor

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #145873

I removed the change I made to plugins/hikashoppayment/stripe/stripe.php and switched the shop over to USD and tried to make a transaction using Swipe but it failed with the same error.

Trevor

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #145875

Update. . .

I have downloaded and updated to com_hikashop_business_2.3.0_2014-02-26.tar.gz which now has the updated supported currencies but the error still occurs when I try a transaction!

Trevor

Last edit: 10 years 9 months ago by trevsmiff.

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 8 months ago #146440

Still can't get the Stripe payments to work.
Is anyone using this payment method successfully?

Trevor

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 8 months ago #147172

Hi,

I think that you have a javascript error in the checkout end page.
Can you please edit the file "plugins/hikashoppayment/stripe/stripe_end.php" and replace

	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();
		}
	};
By:
	var stripeResponseHandler = function(status, response)
	{
		var $form = jQuery("#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(jQuery("<input type=\'hidden\' name=\'stripeToken\' />").val(token));
			$form.get(0).submit();
		}
	};
The stripe plugin have been validate in a client website but I think that his environment was quite different than yours.

I hope that this modification will fix your problem.

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: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 8 months ago #147181

Hi Jerome

Thanks getting back to me.

I have made the changes to stripe_end.php but it returns the same message:

Error charge : You must supply either a card or a customer id


Trevor

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 8 months ago #147182

Hi,

Could you please add the payment method access to my user "jerome@hikashop" so I will be able to test it and see if there are some javascript troubles.
But I really think that the problem is linked to that. The javascript code generate the input hidden "stripeToken" which is read in the payment notification. This value is used for the "card".

So, the problem is around that.

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: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 8 months ago #147194

Hi Jerome

I have activated the Stripe payment method for you.
btw. Stripe is in test mode.

Trevor

Last edit: 10 years 8 months ago by trevsmiff.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 8 months ago #147304

Hi,

Please replace

$doc->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js');
By
hikashop_loadJsLib('jquery');
in the stripe_end.php file.

You have some mootools scripts in the page which create javascript errors with jQuery (which is included without noConflict).

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.
The following user(s) said Thank You: trevsmiff

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
10 years 8 months ago #147353

Hi Jerome

Thanks for looking into that, it has solved the problem and the payment system is working.

Best regards
Trevor

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 8 months ago #147354

Hi,

Good to know.
I will patch the plugin in HikaShop to include these modification.

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.

Time to create page: 0.094 seconds
Powered by Kunena Forum