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
Cardinstance with the card data to be tokenized. After this class is initialized, you should define itsdelegate, theoptionsproperties and athemeif desired.Declaration
Swift
public init(merchantId: String, card: Card)Parameters
merchantIdYour merchantId.
cardCard 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, theoptionsproperties and athemeif desired.Declaration
Swift
public init(merchantId: String, paymentMethodTypes: [PaymentMethodType])Parameters
merchantIdYour merchantId.
paymentMethodTypesThe 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, theoptionsproperties and athemeif desired.Declaration
Swift
public init(merchantId: String, cvvOnlyCard: PCIPCVVOnlyCard)Parameters
merchantIdYour merchantId.
cvvOnlyCardPreviously 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, theoptionsproperties and athemeif desired.This initializer is for use from Objective-C only. Instead of
[PaymentMethodType], it takes[NSNumber]containingrawValues ofPaymentMethodType.Example:
[[DTPCIPTokenization alloc] initWithMerchantId:@"..." paymentMethodTypes:@[@(DTPaymentMethodTypeVisa), @(DTPaymentMethodTypeMasterCard)]];Declaration
Swift
public convenience init(merchantId: String, paymentMethodTypesObjc: [NSNumber])Parameters
merchantIdYour merchantId.
paymentMethodTypesObjcThe 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
presentingControllerUIViewControllerused to present the user interface during an on-going tokenization.
View on GitHub