thephpleague / omnipay-stripe

Stripe driver for the Omnipay PHP payment processing library
MIT License
184 stars 167 forks source link

Stripe confirming 3Ds PaymentIntent (with a failed authorization) gives wrong error #225

Open ixperiencenl opened 1 year ago

ixperiencenl commented 1 year ago

I am using version 3.2.0 and trying to implement PaymentIntents in a correct way.

First, I create a new payment, using the authorize function, provided with the following data: 'amount' => $amount, 'currency' => $currency, 'description' => $description, 'paymentMethod' => $paymethod_id, 'returnUrl' => $returnUrl, 'confirmation_method' => 'automatic', 'confirm' => true, On the front-end I enter a 3DS test key, which always requires authentication (4000002760003184) - I then get redirected to the Stripe page, here I choose 'Fail Authentication' - then I get redirected back to my application, the url provides a paymentIntent id.

Then, I call the following: confirm([ 'paymentIntentReference' => $paymentIntent, 'returnUrl' => $returnUrl ])->send(); Which results into the following error: You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method

This error should contain the error that the card was declined. Why is it showing this? I see I am missing the payment method, but how to provide this in this stadium?

When clicking on 'Complete authentication' in the Stripe screen, the payment verifies without any issues

Please help. I am at a loss here.

nowrap commented 1 year ago

We are facing the same problem in an aimeos shop system which is using "omnipay/stripe": "^3.2"

// edit in our case it was a problem on the aimeos side