PCIPTokenizationDelegate
@objc(DTPCIPTokenizationDelegate)
public protocol PCIPTokenizationDelegate
Implement PCIPTokenizationDelegate to be notified when a tokenization ends. PCIPTokenizationDelegate will notify you about the success, error or cancel state of the processed tokenization.
-
This is called after a tokenization has been successfully completed. This callback provides details about the tokenization.
Declaration
Swift
func tokenizationDidFinish(_ tokenization: PCIPTokenization, result: PCIPTokenizationSuccess)
Parameters
tokenization
The object containing the information of the completed tokenization.
result
The result object containing the tokenization ID and other useful information, e.g. about the card.
-
This is called after a tokenization fails or encounters an error. Keep in mind that the SDK shows the error to the user before this is invoked. Therefore, this callback can be used to cancel any on-going process involving the tokenization.
You may also use the error details provided here and display it the way you want when suppressing the error message within the
PCIPTokenizationOptions
.Declaration
Swift
func tokenizationDidFail(_ tokenization: PCIPTokenization, error: PCIPTokenizationError)
Parameters
tokenization
The object containing the information of the failed tokenization.
error
The error that occurred.
-
This is called after a tokenization has been cancelled. This callback can be used to cancel any on-going process involving the tokenization.
Declaration
Swift
@objc optional func tokenizationDidCancel(_ tokenization: PCIPTokenization)
Parameters
tokenization
The object containing the information of the cancelled tokenization.