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

[Woo POS] Add new SwiftUI implementation of payment message UI

Open joshheald opened this issue 1 year ago • 4 comments
trafficstars

Now that payment messages will be shown inline, we should implement that UI instead of a modal alert.

These will generally be simple views, but in the case of errors, they do need to show buttons. We don't yet have final designs for these error states, but can use our best judgement for now.

Please note – most of these already have Views and all have ViewModels for the new POS – see:

  • Classes\POS\Presentation\Card Reader Connection\UI States\Reader Messages for Views (this hierarchy is wrong, feel free to move them to the folder below)
  • Classes\POS\Presentation\Card Present Payments\Reader Messages for ViewModels

States

  • [ ] preparingForPayment – uses a spinner in the existing modal implementation, has a cancel button, but probably doesn't need it in the new implementation.* Design WIP: TfaZ4LUkEwEGrxfnEFzvJj/WooCommerce-POS?node-id=1439-73824&t=Tk717tGAuZcHIbiT-4 Screenshot 2024-06-26 at 3 45 44 PM

  • [ ] tapSwipeOrInsertCard – should show the relevant payment types, which are provided by the service.* Design: TfaZ4LUkEwEGrxfnEFzvJj/WooCommerce-POS?node-id=1439-73824&t=Tk717tGAuZcHIbiT-0 Screenshot 2024-06-26 at 3 43 03 PM

  • [ ] processing

  • [ ] displayReaderMessage – should show the message provided, which will be localized by Stripe.

  • [ ] success – not really inline, this should move us to the payment complete screen. We should consider splitting this out. Screenshot 2024-06-26 at 3 44 44 PM

  • [ ] error – should show error details, with a retry button*

  • [ ] `nonRetryableError – should show error details*

  • [ ] cancelledOnReader – not possible with M2 readers, only WisePad/TTP, so can be minimally handled for now.

*: These messages have cancel buttons when shown modally in the existing app implementation. Does cancelling the payment make sense with the inl-ine presentation, especially with no option to pay by cash?

What should happen to the order after they cancel the payment? @joe-keenan, your thoughts here would be appreciated... but happy to chat about it sync if that would help.

Perhaps, to allow people to cancel a payment and use a different card (especially from errors) we should show the cancel button. Once cancellation is done, we can prepare the reader to take payment again, as we do when we first show the Totals/Checkout screen

joshheald avatar Jun 17 '24 09:06 joshheald

Thanks for reporting! 👍

dangermattic avatar Jun 17 '24 09:06 dangermattic

Blocked while awaiting designs especially for errors

joshheald avatar Jun 17 '24 13:06 joshheald

@joshheald is it ok for me to take this task as we discussed regarding the UI changes?

bozidarsevo avatar Jun 28 '24 12:06 bozidarsevo

@bozidarsevo Of course 😊

@malinajirka is going to set up a new project for the UI work anyway, so this is in a new sub-project now.

joshheald avatar Jun 28 '24 12:06 joshheald

I suppose we can close this one since we pretty much separated parts of this into different issues?

bozidarsevo avatar Aug 08 '24 15:08 bozidarsevo

@bozidarsevo, I think so. @joshheald, can we close this?

staskus avatar Aug 09 '24 15:08 staskus

Yes, the remaining checkboxes should all be picked up in #13481.

joshheald avatar Aug 12 '24 06:08 joshheald