Do not use GET requests to make changes! Be RESTful ; use POST (or PUT), and the browser should warn the user not to restart the request. Redirecting ( using HTTP redirection ) to the receipt page using a regular GET request after a POST / PUT request will allow the page to refresh without receiving a warning about resending.
EDIT:
I assume that the user has somehow registered, and so you already have a way to track the user, for example. session or similar.
You can create a timestamp (or a random hash, etc.) by displaying a form that stores it as a hidden field (in addition to the anti-credential request marker, I'm sure you already have one), and into a session variable (which is safely stored on your server), when you receive a POST / PUT request for this form, you check that the timestamp is the same as in the session. If so, you set the timestamp in the session to something variable and hard to guess (a timestamp associated with some secret string, for example), then you can save the form data. If someone repeats the request now, you will not find the same value in the session variable and reject the request.
The problem with this is that the form is not valid if the user clicks back to change something, and can be a little tough unless you update the money. Therefore, if you have problems with "stupid" users who update and click the "back" button, thereby accidentally rearranging something, just using POST will remind them of this, and redirecting will make it less likely. If you have a problem with malicious users, you should use timestampt too much, although sometimes it will confuse users, if only if users intentionally publish the same message again and again, you will probably need to find a way to block them. Using POST, having a timestam, and even fully comparing the entire database to check for duplicate messages will not help at all if malicious users simply write a script to download the form and send random garbage automatically. (But securing a cross-site request makes this much more difficult)
Stein G. Strindhaug
source share