I have a simple "Pay Now" button, code created using the button maker, with the added "custom" hidden field to identify it. I wonder if there is any additional hidden field that I can add to tell PayPal that "this transaction should not be done twice."
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="custom" value="{MYUNIQUEID}">
<input type="hidden" name="hosted_button_id" value="{MYHOSTEDBUTTONID}">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif"
border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
As it is now unlikely that the client will be able to pay twice, but I noticed that when the sandbox crashed, I managed to pay the same transaction twice. Something that I absolutely want to avoid. Not only for a client who could receive a refund, of course, but also because I do not want my database to get corrupted, and I would like to avoid extensive coding in order to catch duplicate payments ...