I'm building a payment method where the user needs to POST a form with order data to the remote payment gateway, thereby leaving the Magento environment.
The workflow is:
- placeOrder (save order with status pending or new)
- POST custom order form to remote gateway, which also redirects the user there
- upon return, the order is updated (or via remote call in the background)
I'm stuck with the second step: redirecting the user AFTER saving the order first (we need the orderIncrementId). I found this outdated help:
What is the Magento 2 "proper way" to do this? Is there an official way?