BTPayPalNativeCheckoutClient
@objc
public class BTPayPalNativeCheckoutClient : NSObject
Client used to collect PayPal payment methods. If possible, this client will present a native flow; otherwise, it will fall back to a web flow.
-
Initializes a PayPal Native client.
Declaration
Swift
@objc(initWithAPIClient:) public convenience init(apiClient: BTAPIClient)
-
Tokenize a PayPal request to be used with the PayPal Native Checkout flow.
On success, you will receive an instance of
BTPayPalNativeCheckoutAccountNonce
. On failure or user cancelation you will receive an error. If the user cancels out of the flow, the error code will equalBTPayPalNativeError.canceled.rawValue
.Declaration
Swift
@objc(tokenizeWithNativeCheckoutRequest:completion:) public func tokenize( _ request: BTPayPalNativeCheckoutRequest, completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void )
-
tokenize(_:
Asynchronous) Tokenize a PayPal request to be used with the PayPal Native Checkout flow.
On success, you will receive an instance of
BTPayPalNativeCheckoutAccountNonce
. On failure or user cancelation you will receive an error. If the user cancels out of the flow, the error code will equalBTPayPalNativeError.canceled.rawValue
.Throws
AnError
describing the failureDeclaration
Swift
public func tokenize(_ request: BTPayPalNativeCheckoutRequest) async throws -> BTPayPalNativeCheckoutAccountNonce
-
Tokenize a PayPal request to be used with the PayPal Native Vault flow.
On success, you will receive an instance of
BTPayPalNativeCheckoutAccountNonce
. On failure or user cancelation you will receive an error. If the user cancels out of the flow, the error code will equalBTPayPalNativeError.canceled.rawValue
.Declaration
Swift
@objc(tokenizeWithNativeVaultRequest:completion:) public func tokenize( _ request: BTPayPalNativeVaultRequest, completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void )
-
tokenize(_:
Asynchronous) Tokenize a PayPal request to be used with the PayPal Native Vault flow.
On success, you will receive an instance of
BTPayPalNativeCheckoutAccountNonce
. On failure or user cancelation you will receive an error. If the user cancels out of the flow, the error code will equalBTPayPalNativeError.canceled.rawValue
.Throws
AnError
describing the failureDeclaration
Swift
public func tokenize(_ request: BTPayPalNativeVaultRequest) async throws -> BTPayPalNativeCheckoutAccountNonce