I am using a payment service. This service want me to send a callBackUrl while starting payment process. And the service sends a post request to my callBackUrl after 3D security page. And I am checking some datas and return status. But, I need to redirect user directly to a custom url after my checkings. In short, how can I redirect to custom url inside a post method?
2
Answers
I solved my problem by sending response with 302 status code. You can see code below.
The answer would be specific to the payment gateway you are using. As @akseli has mentioned in comment, Payment Gateways has success and Cancel URL parameters.
Following code is implementation of Stripe for processing payment and you can define options while creating session.
Let us know if this works.