VisaCTFHelper
public protocol VisaCTFHelper
VisaCTFHelper is used to authenticate and bind vProvisionedTokenId with the device.
Version
Version 1.0Since
Since 1.0-
Bind Visa Token to Device. when using this API, the whole binding process will restart from scratch. If used on an already bound token, the token will be re-bound again with a potential new end user authentication.
Declaration
Swift
func createBinding(vProvisionedTokenId: String, deviceId: String, correlationId: String, deviceAuthenticationDelegate: DeviceAuthenticationDelegate, completion: ((_ pendingBindingSession: PendingBindingSession?, _ error: Error?) -> Void)?)Parameters
vProvisonedTokenIdvisa provision token id, this value is retrieved during tokenization process. Mandatory input
deviceIdDevice Identifier generated by App. Mandatory input
correlationIdSession Id generated by App. Mandatory input
deviceAuthenticationDelegateDevice authentication delegate. Mandatory input.
Return Value
pendingBindingSession: An object for App to start device authentication and continue withYellow Flowprocess if any. This object may need to be hold if theYellow Flowprocess will be continued on the other UI screen.error: When there’s something wrong in the process otherwisenil
-
Authenticate Transaction for
vProvisionedTokenId.Declaration
Swift
func authenticateTransaction(vProvisionedTokenId: String, deviceAuthenticationDelegate: DeviceAuthenticationDelegate, completion: ((_ visaPayload: String, _ error: Error?) -> Void)?)Parameters
vProvisionedTokenIdvisa provision token id. Mandatory input
deviceAuthenticationDelegateDevice authentication delegate. Mandatory input.
Return Value
visaPayload: if it is successful otherwise emptyStringwith anErrorerror: When there’s something wrong in the process otherwisenil
-
Get Token Activation Status.
Declaration
Swift
func bindingState(vProvisionedTokenId: String, completion: ((_ bindingState: BindingState, _ error: Error?) -> Void)?)Parameters
vProvisionedTokenIdVisa provision token id. Mandatory input.
Return Value
BindingState: If the successful otherwiseBindingState.unboundwitherrorerror: When there’s something wrong in the process otherwisenil
-
Removes the
vProvisionedTokenIdfrom device.Declaration
Swift
func removeBinding(vProvisionedTokenId: String, completion: ((_ error: Error?) -> Void)?)Parameters
vProvisionedTokenIdVisa provision token id. Mandatory input.
Return Value
error: When there’s something wrong in the process otherwisenil
-
Synchronize the binding state between
ServerandClient.Declaration
Swift
func syncBindingState(vProvisionedTokenId: String, completion: ((_ bindingState: BindingState, _ error: Error?) -> Void)?)Parameters
vProvisionedTokenIdvisa provision token id.
Return Value
bindingState: if the successful otherwiseBindingState.unboundwitherrorerror: When there’s something wrong in the process otherwisenil
-
Get Token which is Pending Activation
Declaration
Swift
func resumeBinding(vProvisionedTokenId: String, completion: ((_ pendingBindingSession: PendingBindingSession?, _ error: Error?) -> Void)?)Parameters
vProvisionedTokenIdVisa provision token id.
Return Value
pendingBindingSession: An object for App to start device authentication and continue withYellow Flowprocess if any. This object may need to be hold if theYellow Flowprocess will be continued on the other UI screen.error: When there’s something wrong in the process otherwisenil
VisaCTFHelper Protocol Reference