The commerce_payment module depends on commerce_order, but not on commerce_checkout.
The default return/cancel URLs are checkout specific, which is fine.
However, they can't be overriden, which is not fine.
Anyone should be able to create a custom two-step form that uses an offsite gateway.

Solution:
The offsite form must get the redirect and cancel urls as arguments.
That way the embedding form can supply its own urls.
Then, move getReturnUrl() and getCancelUrl() from the gateway to the PaymentProcess checkout pane.

Comments

bojanz created an issue. See original summary.

  • bojanz committed 10032ee on 8.x-2.x
    Issue #2838978 by bojanz: Allow offsite gateways to be used without...
bojanz’s picture

Status: Active » Fixed

There we go.

Status: Fixed » Closed (fixed)

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