Hello Everyone, hope you’re all safe and doing well,
So here’s my problem :
I’m creating the checkout workflow for a payment gateway, so here’s how it works :
- When user chose this payment type, the app make an API call to the payment gateway sending this Infos: VendorID, amount (of current checkout) and a note (text), the call return a Token(we’ll call it payment-token) that I’ll be using when sending the user to their payment gateway.
By the meantime, I also store the payment-token in the localStorage, to retrieve it after the user return from the payment gateway. And add a payment in my DB, containing all necessary pieces of information, with “status”: “No”.
After that that the user get a payment button with a hidden form(Including an ok_url and a ko_url, containing the Infos I need to send to the payment gateway.
The user then is redirected to the payment gateway authentication page and if payment succeed is sent to my redirection page wich mission, is to verify if the said payment has been successfully paid, here’s the workflow :
- On Page load -> Extract the payment-token from localStorage -> API call to verify if payment token has been paid -> Do a search for payment whose token = payment-token and change status to “yes” Only when API call return “True” -> Redirect to thank you page
So i have a problem in the status change in the debugger it appears as changed, but when i verify in my DB, nothing has changed,
I tried many things, I can’t understand why the changes reflect in the debugger, but not in the DB, can you help me, please ?
Sorry if my english is bad, hope you have understood me