Card Change on HCE-based contactless payment

Hi,

I am integrating the HCE-based API into our SDK.

Ideal flow

It is bit tricky to support card change (step 3 below) after field-detect/double click due to NFC action sheet. Ideally, the flow is:

  1. User double-click.
  2. App launch
  3. "Hold near Reader" NFC instruction
  4. (optional) User change card
  5. User tap device to POS reader
  6. payment succeed.

Approach A

If I follow the code snippet in CardSession, where it calls startEmulation after readerDetected, I could change card before that. However, the "Hold near Reader" NFC instruction is shown very late, during tap.

  1. User double-click
  2. App launch
  3. (optional)User change card
  4. User tap device to POS reader
  5. "Hold near Reader" NFC instruction
  6. payment succeed.

Approach B

If I call startEmulation after sessionStarted, I could show "Hold near Reader" NFC. However, I could not provide the optional capability to change card anymore.

  1. User double-click
  2. App launch
  3. "Hold near Reader" NFC instruction
  4. User tap device to POS reader
  5. payment succeed.

Neither approach A or B provide optimal approach shown in Ideal flow.

Is this expected from CardSession that there is no option to startEmulation without the action sheet?

Is there a plan to improve startEmulation so that it could show "Hold near Reader" without the action sheet?

Thank you.

Answered by DTS Engineer in 788921022

The modal action sheet is part of calling startEmulation. This is also indicated in the documentation:

startEmulation() Start the card emulation and present a modal user interface to the person using the app.

and currently there is no option to turn this off. If you would like for Apple to consider adding support for such a feature, please submit your suggestion request via Feedback Assistant (https://feedbackassistant.apple.com)

Accepted Answer

The modal action sheet is part of calling startEmulation. This is also indicated in the documentation:

startEmulation() Start the card emulation and present a modal user interface to the person using the app.

and currently there is no option to turn this off. If you would like for Apple to consider adding support for such a feature, please submit your suggestion request via Feedback Assistant (https://feedbackassistant.apple.com)

Card Change on HCE-based contactless payment
 
 
Q