woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
298 stars 110 forks source link

[Woo POS] Make Processing and Complete states separate screen (PaymentsView?) to prevent strange reader-not-connected error #13876

Open joshheald opened 1 week ago

joshheald commented 1 week ago

Description

When the Reader is disconnected (by turning off Bluetooth on the iPad) while waiting for a card to be tapped, the reader error appears full screen. A correct behavior would be to appear in split screen, the same way as before initiating the payment.

image

When the Reader is disconnected (by turning off Bluetooth on the iPad) while processing payment or payment success we can get into weird states. Although these states seem functional and after re-connection, we transition to a payment state, we could make improvements for even more solid error handling. image image – p91TBi-c11-p2#comment-12991

When the reader gets disconnected, we could move back to the checkout stage.

However, if we do that from the Order Completed screen, or even the processing screen we risk people using a paid order a second time.

If they do that (change the contents and check out again) the order will succeed without a card being tapped.

This means we'd be risking merchants giving products away for free, if they got confused by this.

We should fix this in our architecture, by taking the post-card tap stages of payment out of TotalsView, into a new view. By doing that, we can have separate, simpler handling for reader disconnection on these screens.

dangermattic commented 1 week ago

Thanks for reporting! 👍