I am integrating a payment gateway and all the code are executed by the backend. I send a post request from the front end to backend and the payment process starts. After the payment is complete, I get a post request from the payment gateway to the backend with the payment info. Then I validate the payment and update the database. The next step is to redirect the user to the /success route of my vuejs project. Here is a scenario of my procedure.
post
/success
backend.com
frontend.com
backend.com/pay
backend/success
I want to update the database and redirect my user to frontend.com/success with payment information when the payment is successful. I am using Laravel for backend and vuejs for front end.
frontend.com/success
After you send your POST request to the backend and receive a valid response, you can use Vue Router to redirect the user to the success page using $router.push('/success')
$router.push('/success')
2.1m questions
2.1m answers
60 comments
57.0k users