I am integrating a payment gateway and all the code are executed by the backend.
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 Reactjs project.
Here is a scenario of my procedure.
My backend: backend.com
My front end: frontend.com
Payment request from front end to backend: backend.com/pay
Response url of the payment gateway to the backend: 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 React js for front end.