github stripe/stripe-terminal-ios v1.1.0

latest releases: 4.0.0, 3.9.1, 3.9.0...
4 years ago

1.1.0 2020-03-24

If you are using CocoaPods, update your Podfile:

pod 'StripeTerminal', '1.1.0'

This update introduces support for connecting to and making payments with the Verifone P400 countertop reader.

iOS connectivity to the Verifone P400 reader is currently in public beta. Not all capabilities of the iOS SDK are available when connected to the Verifone P400, and some features available in the JavaScript SDK are not yet available in the iOS SDK. Future versions of the Stripe Terminal iOS SDK will add these additional Verifone P400 capabilities. Make sure to watch our Github Releases page (RSS link) to get notified about these new updates.

The following iOS methods are not available when connected to a Verifone P400:

The following JavaScript SDK methods, which offer additional Verifone P400 functionality, are not available in the iOS SDK:

Migrating your iOS integration to support the Verifone P400

  • The verifoneP400 is a new SCPDeviceType enum value. To discover Verifone P400 devices you’ve registered to your Stripe account, you’ll need to specify both the verifoneP400 device type and the internet discovery method in your DiscoveryConfiguration.
  • We recommend using locations when working with the Verifone P400. Locations filter the readers registered to your account. When registering a reader, you can associate the reader with a specific location. DiscoveryConfiguration has a new locationId parameter, which can be used to filter readers by location ID.
  • The SDK’s Reader object now contains additional properties that match those on the Reader API object. Many of these new properties only apply to the Verifone P400 reader:
    • ipAddress: The IP address of the reader, used for establishing a connection on the local network.
    • locationId: The Location ID associated with the reader.
    • status: The network connectivity status of the reader, i.e. offline or online. Check that the reader’s status is online before attempting to connect.
    • label: A custom label that can be optionally be associated with the reader.
    • stripeID: A unique identifier for the reader.
  • discoverReaders returns all registered readers, including those that are offline. We recommend that you display offline readers in your app’s UX for discovering readers so your users know which readers are already registered.
  • We have added a new ConnectionConfiguration class (similar to DiscoveryConfiguration), which supports the failIfInUse option when connecting to the Verifone P400.
  • The TerminalDelegate.didReportUnexpectedReaderDisconnect method will be called when the SDK notices it has been disconnected from the Verifone P400 (for example, if the reader loses its connection or power for over a minute). You can test this in your app by turning off the reader. Refer to handling disconnects for more information.
  • Since the Verifone P400 has a built-in display, your application doesn’t need to display events from the payment method collection process to users. You can pass delegate: nil to collectPaymentMethod because the ReaderDisplayDelegate methods will not be called.
  • We introduced three new errors specific to connections with the Verifone P400:
    • SCPErrorUnknownReaderIpAddress: Returned when connecting to a reader that does not have an IP address on the Reader object.
    • SCPErrorInternetConnectTimeOut: connectReader completes with this error when connecting to an internet-enabled reader times out (for example, when connecting to a reader that is offline).
    • SCPErrorConnectFailedReaderIsInUse: Returned when the chosen reader is currently collecting a payment and failIfInUse is set to true. See the Connecting to the Verifone P400 section for more details.

Other Changes

  • Updated internal dependencies

Don't miss a new stripe-terminal-ios release

NewReleases is sending notifications on new releases.