- Issue created by @puidu
Hi,
I don't know if I'm missing something or if I'm misunderstanding how this should work (if so, please forgive me) but I experienced that, if the user cancel the payment, the order is completed anyway.
That seems because, unless the onReturn method on StripeKlarna.php throws an exception ( eg. if the payment is null), it returns a RedirectResponse that is actually ignored by the commerce Off-site endpoint controller ( PaymentCheckoutController), that redirects to next checkout step 'completed'.
Drupal core 9.5.11
Commerce 2.36
Commerce Stripe 1.1
In order to reproduce, close the klarna modal without completing the payment
Probably the payment gateway on onReturn should throw a dedicated exception in case the payment is canceled.
Active
1.1
Code