Copy link to clipboard
Copied
I have a checkout.php going to a payment gateway using a form and "process payment" button, as the user is sent to the payment gateway hosted page the orderID with other information is sent to the database. The trouble i am having is if the user hits the back button on the brower then returns back to the checkout.php then try and click process payment again the are given the duplicate key as this orderID has already been sent to the database
what options do i have for correcting this. i thought about having a refresh once script then killing the orderID on the checkout.php page. this way if they return to the page via the back button the page should refresh then kill the orderID.
is this a way of doing it or incorrect?
thanks in advance
Have something to add?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more