BTSEPADirectDebitClient
@objc
@MainActor
public class BTSEPADirectDebitClient : BTWebAuthenticationSessionClient
Used to integrate with SEPA Direct Debit.
-
Creates a SEPA Direct Debit client.
Declaration
Swift
@objc(initWithAuthorization:) @MainActor public init(authorization: String)Parameters
authorizationA valid client token or tokenization key used to authorize API calls
-
Initiates an
ASWebAuthenticationSessionto display a mandate to the user. Upon successful mandate creation, tokenizes the payment method and returns a resultDeclaration
Swift
@objc(tokenizeWithSEPADirectDebitRequest:completion:) @MainActor public func tokenize( _ request: BTSEPADirectDebitRequest, completion: @escaping (BTSEPADirectDebitNonce?, Error?) -> Void )Parameters
requesta
BTSEPADebitRequestcompletionThis completion will be invoked exactly once when tokenization is complete or an error occurs
-
tokenize(_:Asynchronous) Initiates an
ASWebAuthenticationSessionto display a mandate to the user. Upon successful mandate creation, tokenizes the payment method and returns a resultThrows
AnErrordescribing the failureDeclaration
Swift
@MainActor public func tokenize(_ request: BTSEPADirectDebitRequest) async throws -> BTSEPADirectDebitNonceParameters
requesta
BTSEPADebitRequestReturn Value
A
BTSEPADirectDebitNonceif successful
View on GitHub