woocommerce / woocommerce-ios

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

[Mobile Payments] Card reader connections from Payments menu during TTP reconnection can find the TTP reader. #13981

Open joshheald opened 1 month ago

joshheald commented 1 month ago

Description

When you try to connect a reader from the Manage card readers screen during a TTP auto-reconnection attempt, the system finds the TTP reader and offers to connect to it as if it were an external card reader. This will always fail, because we use the wrong connection method.

This does not happen if you try to connect from a payment flow, only the Manage card readers screen.

Repro

  1. Launch the app
  2. Take a payment using Tap to Pay on iPhone
  3. Background the app
  4. Launch the app again after a few seconds, then quickly go to Menu > Payments > Manage card reader
  5. Tap connect
  6. Observe that you're asked if you'd like to connect to a reader with a very long identifier, shown in small text – this is the TTP reader ID
  7. Try to connect - observe that it fails.

The Manage card reader screen should instead adopt the automatic reconnection, then disconnect it when it completes, before starting a card reader connection.

dangermattic commented 1 month ago

Thanks for reporting! 👍