Skip to main content

[SOLVED] Stripe Payments Failing

More
12 years 7 months ago - 12 years 6 months ago #145529 by trevsmiff
-- 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: 12 years 6 months ago by trevsmiff.

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

More
12 years 7 months ago - 12 years 7 months ago #145539 by Mohamed Thelji
Hi,
Can you show me through some screenshots how did you configured your Stripe payment method configuration page ?
Last edit: 12 years 7 months ago by Mohamed Thelji.

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

More
12 years 7 months ago #145541 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
Hi Mohamed
Here is a screenshot:
(I have disabled the plugin at the moment as the site is live.)

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

More
12 years 7 months ago #145839 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
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.

More
12 years 7 months ago #145873 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
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.

More
12 years 7 months ago - 12 years 7 months ago #145875 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
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: 12 years 7 months ago by trevsmiff.

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

More
12 years 7 months ago #146440 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
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.

More
12 years 6 months ago #147172 by Jerome
Replied by Jerome on topic Stripe Payments Failing
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
Code:
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:
Code:
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.

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

More
12 years 6 months ago #147181 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
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.

More
12 years 6 months ago #147182 by Jerome
Replied by Jerome on topic Stripe Payments Failing
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.

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

More
12 years 6 months ago - 12 years 6 months ago #147194 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
Hi Jerome

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

Trevor
Last edit: 12 years 6 months ago by trevsmiff.

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

More
12 years 6 months ago #147304 by Jerome
Replied by Jerome on topic Stripe Payments Failing
Hi,

Please replace
Code:
$doc->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js');
By
Code:
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.
The following user(s) said Thank You: trevsmiff

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

More
12 years 6 months ago #147353 by trevsmiff
Replied by trevsmiff on topic Stripe Payments Failing
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.

More
12 years 6 months ago #147354 by Jerome
Replied by Jerome on topic Stripe Payments Failing
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.

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

Time to create page: 0.314 seconds
Powered by Kunena Forum