8

I am making a payment gateway and I need to redirect from the invoice page to an external url. Basically when an order is created at Magento I create an order in a 3rd party app with curl, then I get unique ID from that order which is used to redirect to an external invoice page.

The question is how do i make that external redirect? Most logical solution seems to override the checkout controller and in that controller I would call my model, model returns that unique ID and I make redirect to the invoice page.

Problem is I can't understand how to override the checkout controller.

  • Do I understand it correct that you want to redirect away from Magento to another source? At which point in the checkout do you want to redirect exactly? – Akif Aug 11 '16 at 14:46
  • 1
    i guess you creat your own payment method? If this is true, you can override the method getOrderPlaceRedirectUrl() in your Payment model and return your custom URL. – Pawel Aug 19 '16 at 12:04
  • 1
    i found this link github.com/magento/magento2/issues/2241[](https://github.com/… they say you should implement the redirection client-side just have a look at the paypal express implementation – Andy Sep 12 '16 at 10:07
2

I think there is no explicitly defined extension point for your scenario. However, you can override the default behavior by creating a plugin on \Magento\Checkout\Controller\Onepage\Success::execute method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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