One easy trick is to use ajax call, so even if its reload the page, its only see the new status after the payment.
So what you do, you have a page that you show the current status of the payment, when the user click on the button to pay you send them request with ajax call - at the same time the button show a way message, after the end of the payment you reload the page, with the new information's.
In general you must have a unique number for each transaction, and a state flag of this transaction. You allow only one action per transaction. If the user press the key and go to the payment immediate you change the status of this transaction (using mutex to avoid the double submit even at that point) and after that you do not allow the same request aka reload the page.
The full process of payment is done in steps that are not allow to stop and go back (or repeat a step). In case that you need to go back you create a new process with new id and must repeat all the steps from the beginning. This way is done by paypal, amazon, google.