PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

PayPal: This invoice has already been paid. For more information, please contact

  1. webdevstudios
    Member

    I'm trying to test the donation piece and I keep getting this error from PayPal Sandbox:

    This invoice has already been paid. For more information, please contact the merchant.

    I did a little research and it sounds like the invoice number may not be unique.
    http://forums.oscommerce.com/topic/189451-paypal-this-invoice-has-already-been-paid/

    Posted 13 years ago on Wednesday December 22, 2010 | Permalink
  2. The invoice id is generated from the entry id, which should be unique as entry id's are unique in Gravity Forms. We haven't had anyone else report this issue.

    Can you do me a favor and try something for me?

    Open up paypal.php in the PayPal Add-On folder and search for $invoice and you'll see where the value is being set. Try changing this to generate a random unique number and then test to see if it works.

    We are unable to replicate the issue, everything works fine on our end, so we would have to debug with your site where the issue exists.

    Let me know how it goes.

    Posted 13 years ago on Wednesday December 22, 2010 | Permalink
  3. webdevstudios
    Member

    Yeah that fixed the issue. I set $invoice to a random number and PayPal accepted it

    Posted 13 years ago on Wednesday December 22, 2010 | Permalink
  4. webdevstudios
    Member

    I switched it back and tested again and received the invoice already paid error

    Posted 13 years ago on Wednesday December 22, 2010 | Permalink
  5. Very strange, the entry ID number should be unique. I'll get with Alex on this and we'll see what is going on. We were sticking with entry ID for the invoice ID but we may need to go to something more unique than that.

    For now you can change the PayPal code as I suggested if you need to work with it for the time being. It's odd that this is the first time it's popped up.

    Posted 13 years ago on Wednesday December 22, 2010 | Permalink
  6. webdevstudios
    Member

    For reference I just set this up on another site and am having the same issue. I'm using the donation feature

    Posted 13 years ago on Monday January 3, 2011 | Permalink
  7. We have placed a new version of the PayPal Add-On (Beta 4) on the Add-Ons download page. It updates the invoice number so it uses the entry id AND a random number so that it insures uniqueness, which is the issue. We include the entry id so that is still part of the number.

    We also added a hook to customize this so that you have control over how the invoice id is created. The hook can be found by viewing the changelog file.

    It also fixes a bug with the recurring interval for subscriptions.

    We haven't announced this release on the blog yet but will be doing so shortly.

    Posted 13 years ago on Monday January 3, 2011 | Permalink
  8. Just so you know, I have just received the same message when testing with Paypal sandbox.

    I am using products and services.

    I've looked at the suggested fix, but don't really understand it as I'm not a php programmer.

    My form page is http://www.asbestostesting.co.uk/paypal-test - I was only trying to see if all worked - it's not a live page.

    Posted 13 years ago on Tuesday January 4, 2011 | Permalink
  9. @david-uk Have you installed the latest Beta 4 version that is available on the Downloads page? It changes how the invoice id is generated. I would suggest you make sure you have that installed, if not install it and then try again.

    Posted 13 years ago on Tuesday January 4, 2011 | Permalink
  10. Yes Carl, that's the version I have installed along with Gravity Forms v1.5 RC2.5

    Posted 13 years ago on Tuesday January 4, 2011 | Permalink
  11. @david We are unable to replicate this issue locally. The only way to debug this is going to be to do so on your site using your setup. We would need a WordPress admin login for your site in order to take a look. You can send this to us via our Contact Us form.

    Posted 13 years ago on Tuesday January 4, 2011 | Permalink