0

I have created an offsite (redirect form) payment gateway Drupal 8 module for Opayo.co.uk. following drupal commerce documentation.

Issue: My custom off-site payment gateway module based on form redirect works perfectly fine on fresh Drupal 8 Commerce site with default checkout-flow. response from payment provider is received on these ends: /checkout/ORDER-ID/payment/return (on successful payment) /checkout/ORDER-ID/payment/cancel (on failure) -> But on an exisiting D8 commerce booking system (with overridden checkout-flow using a custom module) when user returns from payment providor with a response string there occurs a redirect loop between booking system and payment providers payment form. The response from provider does not reach my module's plugin where onReturn() and onCancel() functions will process the response. Redirect loop occurs on path /checkout/ORDER-ID/payment/ where user clicks finally "Pay and Complete Purchase" button and data is handled by "Payment process" pane.

-> I can find that a custom checkout module creates event subscriber which acts on every page load checks checkout url parameters.

Any help is highly appreciated, and thanks for reading this.

2
  • If it's an order of execution problem, try setting the module weight. Mar 11, 2022 at 0:51
  • Thank you for the tip. I have changed the weight in negative number. No luck. I am trying to get Order, and ability to upate payment status through a controller function on custom url implemented through my payment gateway module. Any idea how to access payment in a controller function and update the status to complete? Thanks.
    – Monsoonpk
    Mar 11, 2022 at 10:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.