BTSEPADirectDebitClient
@objc
public class BTSEPADirectDebitClient : BTWebAuthenticationSessionClient
Used to integrate with SEPA Direct Debit.
-
Creates a SEPA Direct Debit client.
Declaration
Swift
@objc(initWithAPIClient:) public init(apiClient: BTAPIClient)
Parameters
apiClient
An instance of
BTAPIClient
-
Initiates an
ASWebAuthenticationSession
to display a mandate to the user. Upon successful mandate creation, tokenizes the payment method and returns a resultDeclaration
Swift
@objc(tokenizeWithSEPADirectDebitRequest:completion:) public func tokenize( _ request: BTSEPADirectDebitRequest, completion: @escaping (BTSEPADirectDebitNonce?, Error?) -> Void )
Parameters
request
a
BTSEPADebitRequest
completion
This completion will be invoked exactly once when tokenization is complete or an error occurs
-
tokenize(_:
Asynchronous) Initiates an
ASWebAuthenticationSession
to display a mandate to the user. Upon successful mandate creation, tokenizes the payment method and returns a resultThrows
AnError
describing the failureDeclaration
Swift
public func tokenize(_ request: BTSEPADirectDebitRequest) async throws -> BTSEPADirectDebitNonce
Parameters
request
a
BTSEPADebitRequest
Return Value
A
BTSEPADirectDebitNonce
if successful