woocommerce-ios icon indicating copy to clipboard operation
woocommerce-ios copied to clipboard

[Mobile Payments] After editing an order, quickly using `Collect Payment` can result in the wrong total being shown for the card payment.

Open joshheald opened this issue 1 year ago • 0 comments

Description

Tapping Collect Payment rapidly after editing an order can cause payment to be collected before the edit is reflected in the app.

In that case, that the card payment messages all show the pre-edit total, but the card will be charged the post-edit total. That means the shopper could be charged an unexpected amount.

If you use Tap to Pay on iPhone, or the Wisepad3, the reader/payment screen shows the actual amount charged... but the M2 and Chipper readers don't have a screen, so the first indication of the higher amount is in the order notes after payment is taken.

Repro

  1. Launch the app on a store which can take IPP.
  2. Tap the Orders tab
  3. Select an order which is Pending Payment – note the order total.
  4. Edit the order
  5. Increase or decrease the quantity of a product to change the order total.
  6. Tap Done
  7. Quickly tap Collect Payment
  8. Select Card reader or Tap to Pay on iPhone
  9. Observe that the app's payment modals all show the original order total
  10. Complete the payment; if you're using TTP or a WisePad3, observe that the reader shows the post-edit total
  11. Pull to refresh the order details
  12. Observe that the notes show that the post-edit total was charged.

Expected Behaviour

Unsure. We should at least make sure the modals show the post-edit total, but perhaps even go further and fail the flow if the total changes between when it starts, and when the order is refreshed during the payment flow.

Screenshot

https://github.com/woocommerce/woocommerce-ios/assets/2472348/ca7c62e6-08be-4e9a-94da-5b2693f05458

joshheald avatar Jan 24 '24 12:01 joshheald