VisaCTFHelper

public protocol VisaCTFHelper

VisaCTFHelper is used to authenticate and bind vProvisionedTokenId with the device.

Version

Version 1.0

Since

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

    vProvisonedTokenId

    visa provision token id, this value is retrieved during tokenization process. Mandatory input

    deviceId

    Device Identifier generated by App. Mandatory input

    correlationId

    Session Id generated by App. Mandatory input

    deviceAuthenticationDelegate

    Device authentication delegate. Mandatory input.

    Return Value

    • pendingBindingSession : An object for App to start device authentication and continue with Yellow Flow process if any. This object may need to be hold if the Yellow Flow process will be continued on the other UI screen.
    • error : When there’s something wrong in the process otherwise nil

  • Authenticate Transaction for vProvisionedTokenId.

    Declaration

    Swift

    func authenticateTransaction(vProvisionedTokenId: String,
                                       deviceAuthenticationDelegate: DeviceAuthenticationDelegate,
                                       completion: ((_ visaPayload: String,
                                                     _ error: Error?) -> Void)?)

    Parameters

    vProvisionedTokenId

    visa provision token id. Mandatory input

    deviceAuthenticationDelegate

    Device authentication delegate. Mandatory input.

    Return Value

    • visaPayload : if it is successful otherwise empty String with an Error
    • error : When there’s something wrong in the process otherwise nil

  • Get Token Activation Status.

    Declaration

    Swift

    func bindingState(vProvisionedTokenId: String,
                            completion: ((_ bindingState: BindingState,
                                          _ error: Error?) -> Void)?)

    Parameters

    vProvisionedTokenId

    Visa provision token id. Mandatory input.

    Return Value

  • Removes the vProvisionedTokenId from device.

    Declaration

    Swift

    func removeBinding(vProvisionedTokenId: String,
                             completion: ((_ error: Error?) -> Void)?)

    Parameters

    vProvisionedTokenId

    Visa provision token id. Mandatory input.

    Return Value

    • error: When there’s something wrong in the process otherwise nil

  • Synchronize the binding state between Server and Client.

    Declaration

    Swift

    func syncBindingState(vProvisionedTokenId: String,
                                completion: ((_ bindingState: BindingState,
                                              _ error: Error?) -> Void)?)

    Parameters

    vProvisionedTokenId

    visa provision token id.

    Return Value

    • bindingState: if the successful otherwise BindingState.unbound with error
    • error: When there’s something wrong in the process otherwise nil

  • Get Token which is Pending Activation

    Declaration

    Swift

    func resumeBinding(vProvisionedTokenId: String,
                             completion: ((_ pendingBindingSession: PendingBindingSession?,
                                           _ error: Error?) -> Void)?)

    Parameters

    vProvisionedTokenId

    Visa provision token id.

    Return Value

    • pendingBindingSession: An object for App to start device authentication and continue with Yellow Flow process if any. This object may need to be hold if the Yellow Flow process will be continued on the other UI screen.
    • error: When there’s something wrong in the process otherwise nil