Skip to content

Conversation

@joshheald
Copy link
Contributor

@joshheald joshheald commented Nov 16, 2022

Closes: #8116

Description

In #8115, we started to use waitingForInput as the trigger to show the Reader is ready alert. When I checked the code, the waitingForInput message is accompanied by the types of input which can be used, and these should be presented to the user.

There was no way for the waitingForInput action to pass on the specific instruction from the SDK, e.g. insert card. It's likely that we used the default string of Tap, insert or swipe card to pay because when we first added IPP, we only supported readers with all three modes.

Beyond the existing message, this PR adds specific messages for Tap or insert card to pay (used by the WisePad 3 in Canada, which has no swipe facility) and Tap or Insert alone, in case of specific requests for these payment methods, e.g. by Tap to Pay, or a case when the chip is required..

Testing instructions

Using a US store with a M2 or Chipper reader

  1. Navigate to Menu > Payments > Collect payment
  2. Set an amount and tap Take payment
  3. Tap Card
  4. Wait for the reader to connect, and observe that the Reader is ready message is shown with Tap, insert or swipe as mentioned payment methods.

Using a CA store with a WisePad 3 reader

Repeat steps 1-4 above, but observe that the message shows only Tap or insert payment methods

Screenshots

payments-with-variable-payment-method-messages.mp4

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

This modal was identical to the TapOrInsert modal, so can be removed.
@joshheald joshheald added type: bug A confirmed bug. feature: mobile payments Related to mobile payments / card present payments / Woo Payments. labels Nov 16, 2022
@joshheald joshheald added this to the 11.3 milestone Nov 16, 2022
Previously, we did not take account of the ReaderInputOptions returned to us by the Stripe Terminal API, instead we always displayed “Tap, insert, or swipe to pay”, even when those options were not supported, or the SDK was requesting a different method.

This change passes the ReaderInputOptions to the View Model concerned with showing this message to the merchant, and converts the various supported options into specific localized strings, along with a (currently unused) default of “Present card to pay”.

To see this in action, compare the messages shown when using a US card reader (M2 or chipper, which both support swipe reads) to a CA reader (which only supports tap or insert reads.)
@joshheald joshheald force-pushed the issue/8116-restore-ability-to-display-reader-messages branch from 44d4e53 to 95f5e23 Compare November 16, 2022 16:10
@joshheald joshheald changed the base branch from trunk to task/update-StripeTerminal-to-2.14 November 16, 2022 16:11
@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8136-95f5e23 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@joshheald joshheald marked this pull request as ready for review November 16, 2022 17:06
@joshheald joshheald requested a review from toupper November 16, 2022 17:07
@toupper toupper self-assigned this Nov 16, 2022
@toupper
Copy link
Contributor

toupper commented Nov 16, 2022

Hi @joshheald, I used a CA store, but still I see Tap, insert or swipe to pay, same as with an American store:

@joshheald
Copy link
Contributor Author

joshheald commented Nov 17, 2022

Hi @joshheald, I used a CA store, but still I see Tap, insert or swipe to pay, same as with an American store:

@toupper thanks for the review

It's more down to the reader than the country... CA is just because we use WisePad 3 there.

Are you using a real WisePad 3, or the simulated reader?

Edit – I've updated the testing instructions to specify this

@peril-woocommerce
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@toupper
Copy link
Contributor

toupper commented Nov 17, 2022

@joshheald Now I could test it with the physical readers and it works as expected. LGTM! :shipit:

Base automatically changed from task/update-StripeTerminal-to-2.14 to trunk November 18, 2022 11:27
@joshheald joshheald merged commit c0439fa into trunk Nov 18, 2022
@joshheald joshheald deleted the issue/8116-restore-ability-to-display-reader-messages branch November 18, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: mobile payments Related to mobile payments / card present payments / Woo Payments. type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mobile Payments] Restore ability to show tap/insert/swipe card prompt

4 participants