BTLocalPaymentClient
@objcMembers
@MainActor
public class BTLocalPaymentClient : BTWebAuthenticationSessionClient
-
Initialize a new
BTLocalPaymentClient
instance.Declaration
Swift
@objc(initWithAPIClient:) @MainActor public init(apiClient: BTAPIClient)
Parameters
apiClient
An API client
-
Starts a payment flow using a
BTLocalPaymentRequest
Declaration
Swift
@MainActor public func startPaymentFlow(_ request: BTLocalPaymentRequest, completion: @escaping (BTLocalPaymentResult?, Error?) -> Void)
Parameters
request
A
BTLocalPaymentRequest
request.completion
This completion will be invoked exactly once when the payment flow is complete or an error occurs.
-
startPaymentFlow(_:
Asynchronous) Starts a payment flow using a
BTLocalPaymentRequest
Throws
AnError
describing the failureDeclaration
Swift
@MainActor public func startPaymentFlow(_ request: BTLocalPaymentRequest) async throws -> BTLocalPaymentResult
Parameters
request
A
BTLocalPaymentRequest
request.Return Value
A
BTLocalPaymentResult
if successful