closely related issues:
#2052755: Prevent orders from reversion to out-of-date revision, which causes loss of data after payment is made.
#2009326: "Recalculate shipping" button will update an order even after order is complete

Basically, if a user navigates away from a checkout pane in a new tab, and then checkouts out in the new tab, then comes back to the old tab with the order pane on it, they can modify an order, and revert its revision number, and then reload the page to make any other updates to the order, AFTER it is paid for... Any field data added in subsequent panes by Rules or any other method are lost because the revision number gets reverted to an older state.

I think perhaps this should be addressed in Commerce Core, per this issue:
#2052755: Prevent orders from reversion to out-of-date revision, which causes loss of data after payment is made.

But, it might be deemed a handle-by-module issue...

It's an edge case for sure, and would rarely happen. But, when you're dealing with payments, and (hopefully) a lot of them -- even 1 in 1000 is a customer that needs to be given 100% attention. If their order gets mangled and fulfillment is missed, they will not be happy if they end up not getting what they paid for.

Even if the extra validation should occur in Rules, there's still a chance of an "expired" order object being passed into the pane submit handler if it's submitted with AJAX on an "expired" form. This causes the reversion and breaks the order.

I have an idea of where to "refresh" the order, but I need to test more before making a patch. I'll post tomorrow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tmsimont’s picture

Status: Active » Needs review
FileSize
2.34 KB

patch

torgosPizza’s picture

Issue summary: View changes
Status: Needs review » Postponed