Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.0
-
Fix Version/s: 5.0.3
-
Component/s: None
-
Labels:None
Description
We've received several reports along these lines "Stripe Payments is failing when paying on the order form, but it works when paying through the client interface." It is possible that the order form error does not occur with a saved payment account.
{
"error": {
"code": "payment_intent_unexpected_state",
"doc_url": "https://stripe.com/docs/error-codes/payment-intent-unexpected-state",
"message": "This PaymentIntent could not be captured because it has a status of requires_confirmation. Only a PaymentIntent with one of the following statuses may be captured: requires_capture.",
—
UPDATE
This is caused by a jquery event which is not being set properly. To fix edit stripe_payments/views/default/payment_confirmation.pdt starting at line 10 and change:
$(document).ready(function() {
// Handle form submission.
$('#stripe-error-box').closest('form').one('submit', submitPayment);
});
To
// Handle form submission.
$('#stripe-error-box').closest('form').one('submit', submitPayment);
For those applying the fix manually, the full path is:
/components/gateway/merchant/stripe_payments/views/default/payment_confirmation.pdt