?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.?
?Under certain circumstances, for example 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.
?This feature can be disabled, though we usually recommend keeping it enabled. To disable it, follow these steps:?
Under the “Block accidental payments:” section, select the option “No, allow multiple payments per invoice ID“
With this feature disabled, PayPal would no longer complain when you submit an invoice number that already exists in the system.
But instead of disabling this feature, it would be better to figure out the true cause of this error. A buyer during the normal checkout process should normally not encounter this error.
WooCommerce Version 8.3.1 and WooCommerce PayPal Payments Version 2.4.2
This has happened multiple times in WooCommerce Version 8.3.1 and WooCommerce PayPal Payments Version 2.4.2 environments, I suspect that the problem is only occurring after my WooCommerce upgrade, is there a better way to detect the problem?
To assist you effectively, it would be beneficial if you could share the plugin logs with us. This will help us delve deeper into the order issues you are facing. To generate these logs, please activate ” Logging ” in your plugin settings. You can enable this feature from the “Connection” tab in your plugin settings.
Once you’ve activated “Logging,” every transaction will generate a log entry. These logs can be retrieved by navigating to WooCommerce > Status > Logs. There, select “woocommerce-paypal-payments-[…]” from the dropdown menu and click on ‘View’.
It’s important to note that if “Logging” wasn’t enabled prior to these issues, there won’t be any previous records of the transactions. In such a case, we would need to wait for new failed orders to generate fresh log entries.
Once you have these log entries, please upload them to our PrivateBin. After uploading, send us the link so we can review them in detail.
If you are not comfortable sharing these details on a public forum, I encourage you to open a ticket with our service desk. For guidance on submitting a support request, please visit: Request Support. Remember to add the URL of this thread in your ticket for reference.
1.I found the cause of the problem, my 2 sites use the same paypal account and the “Invoice prefix” is the same for both sites causing a conflict. 2.Is it possible for me to modify the Invoice prefix of one of the sites so that the Invoice prefixes of the two sites are not the same to solve the problem?
Yes, you should modify the Invoice prefix for one of your sites. Changing the invoice prefix will ensure that each site’s transactions are uniquely identified, thus resolving the conflict.
To do this, you can go to the ‘Connection’ tab in the plugin settings of one of your sites. There, you should find the option to change the invoice prefix. Just enter a new prefix that differs from the one used
Sorry, didn’t spot your message, i’ll post answer also here.
The error messages you’re encountering – “PAYER_CANNOT_PAY” – are not originating from our plugin, but rather from the payment method the customer is trying to use. These errors typically occur when the bank or PayPal declines the payment for some reason. The main causes for this can be low funds in the customer’s account, or the customer’s bank blocking the transaction due to their own security protocols. Unfortunately, these are issues that we, as the plugin provider, don’t have control over.