Hello @jaimepsf
We know that sometimes PayPal could do that and that Redsys is a bit tricky too, but to get a better picture i recommend you to install our Number Tools extension. After installing, you will see a new tab “Number tools” in the PDF invoice settings. If you go to this tab and click the “Invoice Numbers” section, you should see a list of all numbers assigned to orders since the last ‘reset’ of the next invoice number. Please share your findings.
-
This reply was modified 3 years, 10 months ago by alexmigf.
The plugin does not create many invoices, sometimes and I am not able to find the reason. This tool does not help me since I do not want to rename invoice numbers on a massive scale. Could it be something else?
https://ibb.co/vJ7mGNr
Plugin Contributor
Ewout
(@pomegranate)
The tool has renumber functionality, but there’s also a section “Invoice numbers” which shows you a log of invoice numbers, allowing you to track when numbers were assigned and to which order – hopefully this will provide insight into what happened with these invoice numbers, can you share your findings?
This part of the tool is very useful. I have checked an invoice that was created additional this morning and I have seen that it has been associated with an order canceled from May 25 … Now I am lost.
https://ibb.co/RytKMPs
https://ibb.co/mbbDL7K
Plugin Contributor
Ewout
(@pomegranate)
Thanks for sharing that! Since the invoice was created so much later than the order itself, I can only assume either of the following things happened:
- The order changed to a status yesterday afternoon that triggered the invoice creation, before being cancelled afterwards (you should be able to track status changes in the “Order notes” sidebar)
- An admin manually created the invoice via the backend (pressing a button)
- Depending on what your “My account” settings are (under Documents > Invoice), if it is set to “always” show, your client may have created the invoice by requesting it via the My Account page
If you want to prevent creation of an invoice for cancelled (and/or failed) orders entirely, you can include those statuses in the “Disable for:” setting (Documents > Invoice). Of course this doesn’t prevent a document from being created if it has a valid status before that, but it may still help.
I’m setting this topic to resolved now, but don’t hesitate to post if you have any further questions!
OK!
I give you the most common case. Two invoices are generated for the same order.
https://ibb.co/rcFqMmg
Plugin Contributor
Ewout
(@pomegranate)
What’s the payment gateway for this order? This order seems to have been completed twice at the very same second, a so called race condition, that is often triggered by the gateway.
Can you check the order notes for this particular order to see if you see any duplicate notes there too? If you have an email log/outbox, can you check if the email was sent twice to the customer?
They both belong to the same order. The order is the same, and two invoices are sent to the customer with the same order. Payment is by PayPal (But it has happened with a bank card through Redsys). I see duplicate the change of order status, which should be just when the invoice is generated … Attached image.
https://ibb.co/xJq0GhH
Plugin Contributor
Ewout
(@pomegranate)
Unfortunately this confirms my hunch and it means that we can’t do anything about this from our end π
The customer will have received the same email twice and if you have stock management disabled the stock probably reduced twice too.
Can you check in your PayPal settings whether you have enabled both IPN and the Identity token setting?
Since both methods do the same thing, only one of them should be enabled.
IPN is disabled and security token is included and enabled
Plugin Contributor
Ewout
(@pomegranate)
Was this the case at the time of this order too?
Or have you recently changed this setting in the PayPal gateway? I have only seen these duplicate confirmations happen when more than one PayPal method was enabled.
The settings were as I sent you when that request was made.
Plugin Contributor
Ewout
(@pomegranate)
I see… WooCommerce developers suggest using IPN and disabling PDT (the reverse of what you have done) in several of the (many) issue reports about this in github:
https://github.com/woocommerce/woocommerce/issues/15773
https://github.com/woocommerce/woocommerce/issues/13963
I don’t know if that makes a difference, but it’s worth trying.
I’m going to try it and keep you informed
Apparently it seems that this is solved, although I will continue to observe it. Thank you!