Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Femi

    (@femiyb)

    Hello @timixpatch

    Have you duplicated your site from staging to a live site or maybe restored a backup?

    The error DUPLICATE_INVOICE_ID error is a security feature from PayPal which aims to prevent accidental double-payments.

    PayPal Payments automatically sets an “invoice prefix” and then sends the WooCommerce order numbers in the pattern “invoice prefix+ordernumber” to PayPal.
    So when your prefix is set to “cfbdg-” and your order number is “123”, PayPal Payments sends the invoice ID “cfbdg-123” to PayPal.

    Now, when you restore a backup from your website, it is possible that the most recent WooCommerce orders do not exist anymore after the restore.
    So as soon as WooCommerce attempts to create a new order with the number 123 and the same invoice prefix, PayPal would throw this error to prevent accidental double payments because there is already a payment at PayPal with the same invoice ID.

    The “DUPLICATE_INVOICE_ID” error can also be caused by a plugin conflict and for this, you may want to perform a full conflict test to rule out eventual issues with the theme or a different plugin. We recommend temporarily activating the?default theme Storefront?and disabling all other plugins except for WooCommerce and PayPal Payments to see if the behavior persists. Here’s a guide that explains the steps in more detail:?How to test for conflicts

    Now for resolving the outcome of this possible conflict, you could also set up your account, so that it allows duplicate invoice ID, but this could lead to double payments and the need to refund some payments.
    However, if you want to do this, you can do:

    1. Log in to your Business PayPal account (https://www.paypal.com/businessmanage/preferences/payments)
    2. Go to the Payments Preferences section
    3. Under the “Block accidental payments:” section, select the option “No, allow multiple payments per invoice ID

    I hope this will help you resolve the issue or at least get to a working solution for now.
    Let me know if you need any further assistance or have additional questions.

    I hope this helps.

    Regards,
    Femi.

    Plugin Support Femi

    (@femiyb)

    Hello

    We have not heard back from you in a while, so I’m marking this thread as resolved.
    Hopefully, the above information helped you out.
    If you have any further questions, please feel free to reopen this topic or create a new one.

    Regards,
    Femi

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce paypal payment Error’ is closed to new replies.