Skip to content

supportsReaders TapToPay unsupported reason #336

@TomaszLizer

Description

@TomaszLizer

Summary

When requesting for Apple Tap to Pay production entitlemnts we were tasked with explicit handling of PaymentCardReaderError.osVersionNotSupported.
I was studying Stripe docs for information about this topic yet did not found any mention of PaymentCardReaderError or similar errors.
There are two things I have found in the docs:

Seems like all methods always return same error in case device is unsupported (unsupportedMobileDeviceConfiguration) and tells that os version is an issue.

Tested on two devices, both with missing support, one due to os, another due to hardware and os:

  • iPhone XR with iOS 16.1 (unsupported OS)
  • iPhone SE (1st gen) iOS 15.8.3 (unsupported OS and hardware)
Error Domain=com.stripe-terminal Code=2910 "Unsupported mobile device configuration. Ensure the device is running a supported version of iOS and it has the hardware capability you are attempting to use." UserInfo={com.stripe-terminal:ReaderMessage=OS version not supported, NSLocalizedDescription=Unsupported mobile device configuration. Ensure the device is running a supported version of iOS and it has the hardware capability you are attempting to use., com.stripe-terminal:Message=Unsupported mobile device configuration. Ensure the device is running a supported version of iOS and it has the hardware capability you are attempting to use.}

This might be confusing since we are not distinguishing between devices that needs OS update and those that cannot gain access to TapToPay.

At the same time method from ProximityReader API distinguishes those two devices.
Running PaymentCardReader.isSupported yields different results:

  • true for iPhone XR
  • false for iPhone SE

For the time being will be handling this issue outside of Stripe Terminal SDK, yet this seems to be internal issue of SDK itself.

Code to reproduce

try terminal.supportsReaders(
    of: .tapToPay,
    discoveryMethod: .tapToPay,
    simulated: false
).get()

iOS version

iPhone XR iOS 16.1
iPhone SE (1st gen) iOs 15.8.3

Installation method

Swift package through mirror: https://github.com/TomaszLizer/stripe-terminal-ios-spm

SDK version

4.1.0

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Tap to PayIssues with Tap to Pay using Apple hardware

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions