woocommerce / woocommerce-ios

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

[Mobile Payments] Tap on Mobile: initial setup flow #8088

Closed joshheald closed 1 year ago

joshheald commented 1 year ago

Connecting to the Tap on Mobile built in reader for the first time (for each store) involves accepting the terms and conditions.

This is handled by Stripe and Apple when we try to connect the reader for the first time.

We are required to tell Stripe (via a delegate callback) whether a user is authorised to accept the terms and conditions for the store. Apple/Stripe advise that this should be done by "an administrator".

At present, the app only supports users with the role Shop Manager or Administrator. We could limit this to Administrators only, but I think it is reasonable to expect that Shop Managers can also perform this. However, in future if there are other roles (e.g. Customer assistant?) which can take payments in the app, they should not be able to do first time set up. It would be good to check this role in the first iteration, if it is quick to do, so we don't forget to do it later.

There is no (currently known) way to unlink an Apple ID from the ToS acceptance. Apple provide a relinkAccount function to change the ToS ID, but we do not have the ability to call this directly without Stripe exposing it in their SDK, or providing us with a token.

It's difficult to know whether a user will see the ToS acceptance screens, but it may be possible for Stripe to tell us about a way to find this out. If it is, we could show an initial screen explaining what will happen here, and what Apple ID to use (it does not have to be the Apple ID on the device.)

We should also test this flow as best we can.

joshheald commented 1 year ago

Superseded by #8733: shop managers will not be able to accept ToS.