When an off-site payment gateway returns to checkout, we currently assume it will process the transaction and forward to checkout completion.

We should allow the return page to have a meta refresh that keeps the user on the page. This allows the payment gateway to wait for payment to come over the IPN.

This is required for Authorize.net Hosted Accept. It's also required for any blockchain based payment while the transaction settles.

This allows the payment gateway to act on transaction declines as well in an async matter.

Comments

mglaman created an issue.

mglaman’s picture

Instead of forcing the logic for refresh inside of payment gateways, we could add this in the payment gateway controller. If there is no error, keep reloading until a payment entity exists, bail after X amount of tries. This is better than automatically proceeding to checkout if there is an IPN that would be incoming.

If a payment entity is created during onReturn, no problems. Otherwise we automatically handle more async IPN