We are building a custom payment app which is supposed to redirect users to our Hosted Payment Page. Before redirecting users to our HPP , we need to do some process on order data in order to generate Order Id for our own payment gateway. In order to accomplish this requirement, we have created a webhook route in our custom payment app and configure this webhook URL in one of the development store's webhook section on the event "Order Complete". We are also able to get Order Details in this webhook route when an order is placed on store.
Once processing the order info and getting the order Id from our payment gateway / provider, we want to redirect users to our HPP. But we find that redirection is not happening. We are using this line of code inside webhook route in our NodeJs custom payment app i.e.
In store, after Order is placed , we still remain order confirmation page (Not redirecting to HPP)
Can anyone please suggest what to do here for successful redirection to our HPP from webhook route? If we are approaching in right direction? I will appreciate you in advance for your support and guidance.