-
Initialize a new BTThreeDSecureClient instance.
Declaration
Swift
@objc(initWithAuthorization:) public init(authorization: String)Parameters
authorizationA valid client token or tokenization key used to authorize API calls.
-
Starts the 3DS flow using a BTThreeDSecureRequest.
Declaration
Swift
public func start(_ request: BTThreeDSecureRequest, completion: @escaping (BTThreeDSecureResult?, Error?) -> Void)Parameters
requestA BTThreeDSecureRequest request.
completionThis completion will be invoked exactly once when the 3DS flow is complete or an error occurs.
-
Creates a stringified JSON object containing the information necessary to perform a lookup.
Declaration
Swift
@objc(prepareLookup:completion:) public func prepareLookup( _ request: BTThreeDSecureRequest, completion: @escaping (String?, Error?) -> Void )Parameters
requestThe
BTThreeDSecureRequestobject where prepareLookup was called.completionThis completion will be invoked exactly once with the client payload string or an error.
-
prepareLookup(_:Asynchronous) Creates a stringified JSON object containing the information necessary to perform a lookup.
Throws
AnErrordescribing the failureDeclaration
Swift
public func prepareLookup(_ request: BTThreeDSecureRequest) async throws -> StringParameters
requestThe
BTThreeDSecureRequestobject where prepareLookup was called.Return Value
On success, you will receive a client payload string
-
Initialize a challenge from a server side lookup call.
Note
Majority of 3DS integrations do not need to use this method. Only for server-side 3DS integrations.Declaration
Swift
@objc(initializeChallengeWithLookupResponse:request:completion:) public func initializeChallenge( lookupResponse: String, request: BTThreeDSecureRequest, completion: @escaping (BTThreeDSecureResult?, Error?) -> Void )Parameters
lookupResponseThe JSON string returned by the server side lookup.
requestThe BTThreeDSecureRequest object where prepareLookup was called.
completionThis completion will be invoked exactly once when the payment flow is complete or an error occurs.
-
initializeChallenge(lookupResponse:Asynchronousrequest: ) Initialize a challenge from a server side lookup call.
Throws
AnErrordescribing the failureDeclaration
Swift
public func initializeChallenge( lookupResponse: String, request: BTThreeDSecureRequest ) async throws -> BTThreeDSecureResultParameters
lookupResponseThe JSON string returned by the server side lookup.
requestThe BTThreeDSecureRequest object where prepareLookup was called.
Return Value
On success, you will receive an instance of
BTThreeDSecureResult
View on GitHub