• Resolved japtralian

    (@japtralian)


    Hi,

    This happens twice within 2 months. I understand that not frequent issue but very concerning if this issue persists.

    My team and I think duplicate Invoice ID were generated because two customers were making an order at the exact same time (perhaps).

    The issue happens only when customer contacts us saying he/she received two invoices attached on order confirmation email from us.

    When checking those invoices, they have the same invoice ID but different customer details and different Order Number (close order number eg. 166170 & 166171)

    Would this be very common issue?

    Any advice would be very helpful.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @japtralian,

    It is indeed a weird behavior. It could be related with a race condition but we need to further investigate to find the root source of this behavior.

    Please go to?WooCommerce > Status > System Status, click on?Get system report, then click on?Download for support, and finally attach the file to a reply to this message.

    Thread Starter japtralian

    (@japtralian)

    Hi Yordan,

    Thank you for your response. Sure, I have downloaded the report but I’m not sure how to upload / attach the file onto this page.

    Also would attaching the system report on public page be very risky? Our site just had cyber attack and we are very concerned of any data breach…

    any suggestions of this report file sharing securely?

    Best Regards,

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @japtralian,

    You can attach the file on?https://www.file.io/, and then paste the download link in a reply here (the file will be deleted after the first download).

    I will be looking forward to your reply, to download it quickly (and it is deleted online): I have email notifications on every reply in our forum ??

    Thread Starter japtralian

    (@japtralian)

    Hi, Yordan,

    Thank you for your advice.
    Here is the link that I uploaded the yesterday’s system file as requested. https://file.io/hOjEdzHxGkNY

    our website is currently on maintenance so I could not get the up to date system report but hope the yesterday’s one helps.

    Best Regards,

    Plugin Contributor Yordan Soares

    (@yordansoares)

    My apology for the late reply, @japtralian!

    Checking your system report, I realized that you’re using WooCommerce PayPal Payments.

    There is a known WooCommerce issue with a specific PayPal configuration and it affects more than just invoice creation. PayPal has two different methods for confirming payment of an order (name “PDT” and “IPN”). If you have enabled both of them, PayPal sends two notifications to WooCommerce at the same time. This results in what is called a “race condition”: the processes start in parallel (not being able to see the other yet), doing the same tasks. The client receives two emails for their order (each with an invoice), stock gets reduced twice and other processes might be duplicated as well. Because an order can only have one invoice, only one of them ‘survives’ after the processes have finished.

    IPN and PDT serve the exact same purpose so you only need one of them. Two options (choose one):

    1. To disable PDT, clear the “PayPal identity token” in the PayPal gateway settings in WooCommerce
    2. To disable IPN you will need to go to your PayPal merchant backend (where you can also disable PDT by the way).

    Let us know if this indeed solves your issue!

    Thread Starter japtralian

    (@japtralian)

    Hi,

    Thank you for your advice.

    I can confirm that when the second event happened, two of the orders were processed by PayPal.

    However, when the first event heppened, two orders were processed via Stripe (credit card). Do you think Stripe also have the similar setting?

    I will keep monitoring to see if the issue persists before making any changes. If the event caused by PayPal happened couple more times, I will mark as confirmed and make an change. ??

    please let me know about the Stripe.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Thanks for the feedback, @japtralian.

    We are not aware about a similar issue related with Stripe, but since there are several plugins for Stripe, always exists the possibility that a similar issue happens.

    Anyway, you could use the?Number Tools?extension to track the invoice logs. Please follow the steps below to do so:

    1. Download, install and active the last release of?Number Tools.
    2. Now go to WooCommerce > PDF Invoices > Number tools > Document Numbers, select Invoice en click on View button.
    3. Here, you will be able to track the invoice number sequence by date and order number.

    As you can see, with Number Tools, you can debug your invoice numbers, tracking when and in which order an invoice number is assigned, also, if there is a race condition, you can find out where the issue is produced and find easily the root source of it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Duplicate Invoice IDs are generated’ is closed to new replies.