I use OsCommerce v2.2 RC2, PayPal Website Payments Standard (includes\modules\payment\paypal_standard.php).
"This invoice has already been paid" error has been haunting my shop since I started testing it with PayPal.
It turned out that there was really no error in code at all, it was just that I was using master sandbox e-mail as merchant e-mail address. Creating a test merchant and using this test e-mail solved the issue.
Please check the following thread:
http://www.oscommerce.com/forums/lofiversion/i...hp?t308569.html
Thanks.