I recently found a problem where a customer can edit their cart and re-checkout after checkout has been completed and payment has been made. This results in a single order record (the latter one) and two payments.
Re-creation of this issue: 1. Start a cart 2. Open the cart in a second window (You should have two windows/tabs open with the same cart) 3. Checkout on the first screen 4. Once checkout is completed and payment has been made, remove or update an item in your cart using the second screen
This places the cart back in a Shopping Cart status (per Drupal Commerce rules) and you have the same order/cart number since they share a table (which is another problem for another day). You can now checkout again and you will have two order confirmation emails with the same order number. Drupal Commerce will show only one order (the second order) but two payments. There is no way to recover the first order.
This only happens when the customer leaves the shopping cart open in multiple window(s) and tries to edit it after checkout.
Is there a fix to dis-allow editing of a cart after it changes over to an order? I would like it to throw an error and force a refresh of the page causing it to create a new shopping cart.