1

I'm building a store with Drupal Commerce and creating my own off-site payment gateway. On the review page, after selecting payment method, the user can click the button to pay and finish the order. After that he's redirected to a page that tells him to wait to be redirected to the payment provider.

Is there a way to redirect the user to the payment provider without needing to go to this useless page ?

Thank you.

2
  • 1
    actually this is not a useless page, this page is in charge of building a from with hidden values which then submission of this form will cause redirecting to offsite payment along sending required information, in most cases a javascript will cause auto redirecting on page ready so it wont make much bother Feb 15, 2022 at 13:18
  • I think this page is useless as for the customer it serve no purpose, the url redirect should be done in the back and only show the payment page to the customer.
    – Mistraë
    May 11, 2022 at 9:39

1 Answer 1

0

If you already have a redirect link and doensn't need a page to have hidden values in a form, you can use the self::REDIRECT_GET instead of self::REDIRECT_POST in the buildConfigurationForm function of your payment method.

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.