On our Magento 2.1.8 CE site we noticed random problems with orders where PayPal Express was used. Once the order is placed, it will not show up in the Magento admin. When we check in our PayPal dashboard we can see the transaction and it has an Invoice ID. When we look back in the Magento admin we can see that Order ID already exists.
For example today Customer A placed an order using PayPal Express at 9:21:47 AM PDT for $21.97. We can't see the order in the Magento admin. In the PayPal dashboard, we can see the transaction and it has an Invoice ID of 100004929 for $21.97. Back in the Magento admin we can see Order 100004929 was placed today at 9:21:14AM PDT but it's for Customer B. The order total is completely different and so is the email.
Some how certain PayPal orders are using existing Order IDs. We've had our dev team researching this issue for a couple of weeks but haven't been able to find a solution.
This problem does not happen to all PayPal orders.
We did have a problem about a month ago where somehow the customer table in the Magento database got dropped. Our dev team couldn't explain what caused that. We had to restore the database from the previous night's backup. I'm thinking that may have something to do with this problem but that is just speculation at this point.
Has anyone every ran into a problem like this before? Anyone have any ideas on where to look or what to try?