verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
96 stars 73 forks source link

Issue with redirect to entry after payment #2122

Closed Megafry closed 4 days ago

Megafry commented 1 week ago

Describe the bug

I noticed that the redirect option after form submission doesn’t work if the user is sent to an external payment page. This issue occurs with the TWINT payment method and possibly with 3D Secure as well (or is that now handled entirely by the payment modal?).

Ideally, processCallback() should redirect the user directly to the confirmation page or specified URL, rather than back to the form.

Steps to reproduce

  1. Create a form with Stripe payment.
  2. Enable Redirect to an entry as Action on Submit.
  3. Use a credit card or payment method that forces the user to go to an external payment page.
  4. After returning to the form, no redirect is performed.

Form settings

Craft CMS version

5.4.4

Plugin version

3.0.8

Multi-site?

No response

Additional context

No response

engram-design commented 1 week ago

I've tested with 3D Secure, which opens a modal window for you to continue offsite, and that's working. I don't have TWINT enabled for my Stripe account, but I can test a few other offsite providers like Afterpay for example. Looks like you're right that this isn't handled.

But the reason that we go back to the form after processCallback() is that some payments need to handle the callback on the front-end (Opayo). In the case of Stripe, the processing is all done server-side.

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.9".

engram-design commented 4 days ago

Fixed in 3.0.10