SCPLocalMobileConnectionConfiguration
Objective-C
@interface SCPLocalMobileConnectionConfiguration : SCPConnectionConfiguration
Swift
class LocalMobileConnectionConfiguration : ConnectionConfiguration
This class lets you set options that define local mobile reader behavior throughout a given reader-to-SDK connection session.
-
The ID of the Location which the reader should be registered to during connection. If the provided ID matches the location the reader is already registered to, the location field on the reader object will not be changed.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull locationId;
Swift
var locationId: String { get }
-
If your integration is creating destination charges and using
on_behalf_of
, you must provide theconnected_account_id
in theonBehalfOf
parameter as part of theSCPLocalMobileConnectionConfiguration
. Unlike other reader types which require this information on a per-transaction basis, the Apple Built-In reader requires this on a per-connection basis as well in order to establish a reader connection.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *onBehalfOf;
Swift
var onBehalfOf: String? { get }
-
Optional cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card. If this value is not provided, the merchant display name will be taken from the Terminal
Location.display_name
associated with the connection.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *merchantDisplayName;
Swift
var merchantDisplayName: String? { get }
-
In order to connect to a reader, merchant-specific terms of service may need to be accepted. Presenting the flow requires iCloud sign-in and an authorized individual. This attribute determines how the connection process should proceed if this situation is encountered.
- If YES, the terms the terms of service should be presented during connection. If accepted successfully, the connection process will resume. If not accepted succesfully, the connection will fail with an error.
If NO, the terms of service will not be presented and the connection will fail with an error.
See
SCPErrorAppleBuiltInReaderTOSNotYetAccepted
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readonly, getter=isTOSAcceptancePermitted) BOOL tosAcceptancePermitted;
Swift
var isTOSAcceptancePermitted: Bool { get }
-
Initialize ConnectionConfiguration with a location ID.
Declaration
Objective-C
- (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId;
Swift
convenience init(locationId: String)
Parameters
locationId
The ID of the location to be associated with the reader.
Return Value
A new instance of the receiver configured with a location ID.
-
Initialize ConnectionConfiguration with a location ID, custom merchant display name, and ‘on behalf of’ connected account ID.
Declaration
Objective-C
- (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId merchantDisplayName: (nullable NSString *)merchantDisplayName onBehalfOf:(nullable NSString *)onBehalfOf;
Swift
convenience init(locationId: String, merchantDisplayName: String?, onBehalfOf: String?)
Parameters
locationId
ID of the location to be associated with the reader.
merchantDisplayName
Cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card.
onBehalfOf
Connected account id that the merchant is taking payments on behalf of.
Return Value
A new instance of the receiver configured with a location ID, merchant display name, and the ‘on behalf of’ connected account ID.
-
Initialize ConnectionConfiguration with a location ID, custom merchant display name, ‘on behalf of’ connected account ID and terms of service acceptance configuration.
Declaration
Objective-C
- (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId merchantDisplayName: (nullable NSString *)merchantDisplayName onBehalfOf:(nullable NSString *)onBehalfOf tosAcceptancePermitted:(BOOL)tosAcceptancePermitted;
Swift
init(locationId: String, merchantDisplayName: String?, onBehalfOf: String?, tosAcceptancePermitted: Bool)
Parameters
locationId
ID of the location to be associated with the reader.
merchantDisplayName
Cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card.
onBehalfOf
Connected account id that the merchant is taking payments on behalf of.
tosAcceptancePermitted
Determines how to handle the situation where merchant-specific terms of service need to be presented in order to connect to a reader. @returns A new instance of the receiver configured with a location ID, merchant display name, ‘on behalf of’ connected account ID and terms of service acceptance configuration.