SCPTapToPayConnectionConfigurationBuilder

Objective-C


@interface SCPTapToPayConnectionConfigurationBuilder
    : SCPBuilder <SCPTapToPayConnectionConfiguration *>

Swift

class TapToPayConnectionConfigurationBuilder : SCPBuilder<TapToPayConnectionConfiguration>

A builder class for SCPTapToPayConnectionConfiguration.

  • Declaration

    Objective-C

    - (nonnull instancetype)initWithDelegate:
                                (nonnull id<SCPTapToPayReaderDelegate>)delegate
                                  locationId:(nonnull NSString *)locationId;

    Swift

    init(delegate: any TapToPayReaderDelegate, locationId: String)

    Parameters

    delegate

    The TapToPayReaderDelegate to use for the connection to this reader.

    locationId

    ID of the location to be associated with the reader.

  • Note

    This is a required attribute of the connection configuration and cannot be nil or empty.

    Declaration

    Objective-C

    - (nonnull SCPTapToPayConnectionConfigurationBuilder *)setLocationId:
        (nonnull NSString *)locationId;

    Swift

    func setLocationId(_ locationId: String) -> TapToPayConnectionConfigurationBuilder

    Parameters

    locationId

    ID of the location to be associated with the reader.

  • Declaration

    Objective-C

    - (nonnull SCPTapToPayConnectionConfigurationBuilder *)setOnBehalfOf:
        (nullable NSString *)onBehalfOf;

    Swift

    func setOnBehalfOf(_ onBehalfOf: String?) -> TapToPayConnectionConfigurationBuilder

    Parameters

    onBehalfOf

    Connected account id that the merchant is taking payments on behalf of.

  • Declaration

    Objective-C

    - (nonnull SCPTapToPayConnectionConfigurationBuilder *)setMerchantDisplayName:
        (nullable NSString *)merchantDisplayName;

    Swift

    func setMerchantDisplayName(_ merchantDisplayName: String?) -> TapToPayConnectionConfigurationBuilder

    Parameters

    merchantDisplayName

    Cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card.

  • Note

    If not set, defaults to YES.

    Declaration

    Objective-C

    - (nonnull SCPTapToPayConnectionConfigurationBuilder *)
        setTosAcceptancePermitted:(BOOL)tosAcceptancePermitted;

    Swift

    func setTosAcceptancePermitted(_ tosAcceptancePermitted: Bool) -> TapToPayConnectionConfigurationBuilder

    Parameters

    tosAcceptancePermitted

    Determines how to handle the situation where merchant-specific terms of service need to be presented in order to connect to a reader.

  • Declaration

    Objective-C

    - (nonnull SCPTapToPayConnectionConfigurationBuilder *)
        setReturnReadResultImmediatelyEnabled:
            (BOOL)returnReadResultImmediatelyEnabled;

    Swift

    func setReturnReadResultImmediatelyEnabled(_ returnReadResultImmediatelyEnabled: Bool) -> TapToPayConnectionConfigurationBuilder

    Parameters

    returnReadResultImmediatelyEnabled

    When possible the card read results are returned as early as possible, prior to the complete dismissal of card reader UI.

  • When set to true, the Terminal SDK will attempt a tap to pay auto-reconnection on any unexpected disconnect. Implement the reader:didStartReconnect: and related callbacks for your application to respond accordingly to reconnection attempts.

    When set to false, the SDK will immediately surface any disconnection through ReaderDelegate.

    Defaults to true.

    Declaration

    Objective-C

    - (nonnull SCPTapToPayConnectionConfigurationBuilder *)
        setAutoReconnectOnUnexpectedDisconnect:
            (BOOL)autoReconnectOnUnexpectedDisconnect;

    Swift

    func setAutoReconnectOnUnexpectedDisconnect(_ autoReconnectOnUnexpectedDisconnect: Bool) -> TapToPayConnectionConfigurationBuilder
  • Unavailable

    Use initWithLocationId:

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Use initWithLocationId:

    Declaration

    Objective-C

    + (nonnull instancetype)new;