PCIPTokenization
public class PCIPTokenization: NSObject
Use this class to start a PCI Proxy tokenization.
After the tokenization has been completed - regardless if
successful or not - delegate
will be called with some basic
information about the success or failure.
Warning
Only use this API if you are a PCI Proxy customer. UseTransaction
if you want to register a saved payment method.
-
This delegate will be notified after a tokenization has been finished, successfully or not.
Declaration
Swift
public weak var delegate: PCIPTokenizationDelegate?
-
The available options for how a tokenization is handled by the mobile SDK.
Declaration
Swift
public var options = PCIPTokenizationOptions()
-
The theme to be used by the SDK.
Declaration
Swift
public var theme = ThemeConfiguration()
-
Use this init method if you use your own UI and already have a
Card
instance with the card data to be tokenized. After this class is initialized, you should define itsdelegate
, theoptions
properties and atheme
if desired.Declaration
Swift
public init(merchantId: String, card: Card)
Parameters
merchantId
Your merchantId.
card
Card object to tokenize.
-
Use this init method to allow the user to enter the card data to be tokenized. After this class is initialized, you should define its
delegate
, theoptions
properties and atheme
if desired.Declaration
Swift
public init(merchantId: String, paymentMethodTypes: [PaymentMethodType])
Parameters
merchantId
Your merchantId.
paymentMethodTypes
The allowed credit or debit card types.
-
Use this init method to tokenize the CVV of an already tokenized card. After this class is initialized, you should define its
delegate
, theoptions
properties and atheme
if desired.Declaration
Swift
public init(merchantId: String, cvvOnlyCard: PCIPCVVOnlyCard)
Parameters
merchantId
Your merchantId.
cvvOnlyCard
Previously tokenized card for which the CVV should be entered.
-
Use this init method to allow the user to enter the card data to be tokenized. After this class is initialized, you should define its
delegate
, theoptions
properties and atheme
if desired.This initializer is for use from Objective-C only. Instead of
[PaymentMethodType]
, it takes[NSNumber]
containingrawValue
s ofPaymentMethodType
.Example:
[[DTPCIPTokenization alloc] initWithMerchantId:@"..." paymentMethodTypes:@[@(DTPaymentMethodTypeVisa), @(DTPaymentMethodTypeMasterCard)]];
Declaration
Swift
public convenience init(merchantId: String, paymentMethodTypesObjc: [NSNumber])
Parameters
merchantId
Your merchantId.
paymentMethodTypesObjc
The allowed credit or debit card types.
-
Starts the SDK and displays any needed user interface using the provided
presentingController
. Note that a tokenization can only be started once. For SwiftUI, useView.datatrans(startWithPCIPTokenization:)
instead.Declaration
Swift
public func start(presentingController: UIViewController)
Parameters
presentingController
UIViewController
used to present the user interface during an on-going tokenization.