App Initialisation

TyroTapToPay(environment: TyroEnvironment, connectionProvider: ConnectionProvider)

Copy
Copied
public convenience init(
  environment: TyroTapToPaySDK.TyroEnvironment,
  connectionProvider: TyroTapToPaySDK.ConnectionProvider
) throws

Parameters

environment
required
TyroEnvironment

An enumeration representing the available environments for use with Embedded Payments.

Enum: "TyroEnvironment.sandbox" "TyroEnvironment.prod"
connectionProvider
required
ConnectionProvider

Your class that implements the Connection Provider interface which makes a call to your server to fetch the connectionSecret.

See TyroEnvironment for the different environments the SDK can be initialised with.

See ConnectionProvider for information about the provider you need to implement to return a connectionSecret.

Throws

TapToPaySDKError.tapToPayInitialisationError

Throws TapToPaySDKError.tapToPayInitialisationError if there was an issue determining the version of the SDK

See TapToPaySDKError for more information about errors.

tapToPaySdk.connect() async throws

Prepares the Tyro Embedded Payments SDK to communicate with your POS integration server and the reader device

Copy
Copied
public func connect() async throws
Copyright © Tyro Payments 2019-2024. All right reserved.