When I complete a payment, I am not showed the 'Thank you for your order' message: I get redirected to the /checkout/ID/complete page. But rather than showing that page, it stays blank and directly redirects to the /cart page. Which is of course empty. This is not good for customer experience, but from what I can find, it is a bug. As a 'payment complete' page seems to exist. However, I cannot find how to access this page.

When I add a hacky die() to the buildPaneForm in the CompletionMessage class (Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CompletionMessage), it turns out it [i]does[i] hit that code. But for some reason, some other code forces the redirect.

The redirect happens with a "Location: /cart" header.

It happens using both the Manual Payment Gateway and the commerce_mollie payment gateway:

  • Manual Payment: directly after pressing 'pay and complete' (second step off the checkout workflow) it triggers the redirect.
  • Mollie payment: I get redirected happens after the offsite payment.

As it happens in both these cases I'd guess it is not a configuration error by the payment provider.

Let me know if there's anything (eg. logging) I can do to help trace this issue.

Comments

RandomNeighbour created an issue. See original summary.

bojanz’s picture

Category: Bug report » Support request

There's no code on our side that redirects from checkout/ID/complete to /cart.
You will have to review custom code running on your site.

RandomNeighbour’s picture

Thanks for the comment. After struggling with it for two days, it seems I found it: I switched the commerce_stock module for commerce_simple_stock (for other reasons) and the redirect was gone. I will have to file the bug with them I guess.

bojanz’s picture

Status: Active » Fixed

Thanks for following up.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.