If WooPayments captures the payment (charges the customer) but the request fails due to server issues or poor network conditions, we don't know whether the order has been paid for or not. In this case, the app first refreshes the order remotely again, and transitions to the success UI if the order is paid indeed. However, if the order refresh request fails like from poor network connections, we want to better inform the merchant about this error clearly so that the merchant does not end up undercharging or overcharging the customer.
Further improvements
After the initial implementation, there are a few further improvements:
UI/UX design updates based on Joe's latest error design, and potential additional design input in p1719952222271239/1719867296.442819-slack-C0354HSNUJH
Context
From the previous PR description https://github.com/woocommerce/woocommerce-ios/pull/13215:
Further improvements
After the initial implementation, there are a few further improvements:
Retry payment
triggers a retry directly, instead of the current behavior where the error message UI is gone on tap, and the merchant needs to tapCollect Payment
again (this might require some non-trivial changes to trigger closure fromCollect Payment
in theRetry payment
closure inCardPresentPaymentsAlertPresenterAdaptor
https://github.com/woocommerce/woocommerce-ios/pull/13215/files#diff-9241914a004dc7903b66fc9a786752c7515d87c7e61d6ebbce6d788c81342d6aR25-R28)