VisaCTFHelper
public class VisaCTFHelper
The VisaCTFHelper is used to bind the visa provisioned token ID to the device and authenticate transactions.
Version
Version 3.0Since
Since 3.0-
createBinding(forVProvisionedTokenID:correlationID: deviceAuthenticationHandler: idvSessionHandler: completionHandler: ) This API binds the Visa token to the device. Using this API will reset the whole binding process. If this is applied on an already bound token, the token will be bound again with a potential new end user authentication.
Version
Version 3.0
Since
Since 3.0
Declaration
Swift
public func createBinding(forVProvisionedTokenID vProvisionedTokenID: String, correlationID: String, deviceAuthenticationHandler: @escaping (DeviceAuthentication) -> Void, idvSessionHandler: @escaping (VisaCTFHelper.IDVSession) -> Void, completionHandler: @escaping (VisaCTFHelper.IDVSession?, TMGError?) -> Void)Parameters
forVProvisonedTokenIDThe Visa provisioned token ID which is a mandatory input. This value is retrieved during the tokenization process.
correlationIDThe session ID generated by the app which is a mandatory input.
deviceAuthenticationHandlerA completion handler for the app to take action for Device Authentication where a
DeviceAuthenticationparameter is returned. This is a mandatory input.idvSessionHandlerA completion handler for app to take action for Token Binding process where a
IDVSessionparameter is returned. This is a mandatory input.completionHandlerA completion handler to notify the app that Token Binding is successful or failed with an error. This is a mandatory input.
- On success: Both
TMGErrorandIDVSessionwill be returned with anilvalue. - On app action required: An optional
IDVSessionand aTMGErrorwill be returned. - On failure: A
TMGErroris returned indicating the error encountered.- Possible errors:
deviceEnvironmentUnsafe(code:)invalidIdvMethodinvalidConfigParamsinvalidRequiredParamsinvalidOTPMessagetokenNotBoundtokenDeclinedissuerAuthenticationRequiredbiometricNotSupportedauthenticationFailure(reason:)authenticationKeyInvalidatedtokenAlreadyBoundinternalError(additionalMessage:)serverErrorIdvNotAvailableserverError(httpStatusCode:additionalMessage:)serverErrorCryptoErrorserverErrorInvalidTokenStateserverErrorNoSessionFoundserverErrorWrongOTPserverErrorExpiredOTPserverErrorRetryLimitExceededserverErrorTooManyRequestserverIsNotAccessible
- Possible errors:
- On success: Both
-
Continue with the token which is pending for activation. Use this method when resuming an ongoing binding session.
Version
Version 3.0
Since
Since 3.0
Declaration
Swift
public func resumeBinding(forVProvisionedTokenID vProvisionedTokenID: String, idvSessionHandler: @escaping (IDVSession) -> Void, completionHandler: @escaping (IDVSession?, TMGError?) -> Void)Parameters
forVProvisonedTokenIDThe Visa provisioned token ID which is a mandatory input.
idvSessionHandlerA completion handler for app to take action for Token Binding process where the
IDVSessionparameter is returned. This is a mandatory input.completionHandlerA completion handler to notify the app on whether Token Binding is successful. This is a mandatory input.
- On success: Both
TMGErrorandIDVSessionwill be returned with anilvalue. - On app action required: An optional
IDVSessionand aTMGErrorwill be returned. - On failure: A
TMGErroris returned indicating the error encountered.- Possible errors:
deviceEnvironmentUnsafe(code:)invalidIdvMethodinvalidConfigParamsinvalidRequiredParamsinvalidOTPMessagetokenAlreadyBoundissuerAuthenticationRequiredbiometricNotSupportedinternalError(additionalMessage:)serverErrorIdvNotAvailableserverError(httpStatusCode:additionalMessage:)serverErrorCryptoErrorserverErrorInvalidTokenStateserverErrorNoSessionFoundserverErrorWrongOTPserverErrorExpiredOTPserverErrorRetryLimitExceededserverErrorTooManyRequestserverIsNotAccessible
- Possible errors:
- On success: Both
-
Retrieves the binding status of a Visa provisioned token ID.
Version
Version 3.0
Since
Since 3..0
Declaration
Swift
public func bindingState(forVProvisionedTokenID vProvisionedTokenID: String) throws -> BindingStateParameters
forVProvisionedTokenIDThe Visa provisioned token ID which is a mandatory input.
Return Value
BindingState: The state of the Visa provisioned token ID.
-
Synchronises the binding state between
ServerandClient.Version
Version 3.0
Since
Since 3..0
Declaration
Swift
public func syncBindingState(forVProvisionedTokenID vProvisionedTokenID: String, correlationID: String, completionHandler: @escaping (VisaCTFHelper.BindingState, TMGError?) -> Void)Parameters
forVProvisionedTokenIDThe Visa provisioned token ID which is a mandatory input.
correlationIDThe session ID generated by the app which is a mandatory input.
completionHandlerA completion handler to notify the app of the state of a token upon completion.
- On success: Returns the binding state.
- On failure: Returns
BindingState.unboundand aTMGError.
-
Authenticates a transaction for a specified Visa provisioned token ID.
Version
Version 3.0
Since
Since 3.0
Declaration
Swift
public func authenticateTransaction(forVProvisionedTokenID vProvisionedTokenID: String, deviceAuthenticationHandler: @escaping (DeviceAuthentication) -> Void, completionHandler: @escaping (String?, TMGError?) -> Void)Parameters
forVProvisionedTokenIDThe Visa provisioned token ID which is a mandatory input.
deviceAuthenticationHandlerA completion handler for the app to take action for device authentication where a
DeviceAuthenticationparameter is returned. This is a mandatory input.completionHandlerA completion handler that provides the result of the transaction.
- On success: Returns a
String. - On failure: Returns a
TMGErrorindicating the error encountered.
- On success: Returns a
-
Removes the specified Visa provisioned token ID from the device.
Version
Version 3.0
Since
Since 3.0
Declaration
Swift
public func removeBinding(forVProvisionedTokenID vProvisionedTokenID: String, correlationID: String, completionHandler: @escaping (TMGError?) -> Void)Parameters
forVProvisionedTokenIDThe Visa provisioned token ID which is a mandatory input.
correlationIDThe session ID generated by the app which is a mandatory input.
completionHandlerA completion handler that provides the result of the removal process.
- On success: Returns a
nilvalue. - On failure: Returns a
TMGErrorindicating the error encountered.
- On success: Returns a
-
IDVMethoddefines the Visa IDV methods that are available to the end user.Version
Version 3.0See moreSince
Since 3.0Declaration
Swift
public struct IDVMethod -
The
BindingStateenum defines the current state of thevProvisionedTokenIDparameter.Version
Version 3.0See moreSince
Since 3.0Declaration
Swift
public enum BindingState : String -
The
OTPActivationStatusstruct captures the OTP activation status duringselectIDVMethodand sends it to the merchant application.Version
Version 3.0See moreSince
Since 3.0Declaration
Swift
public struct OTPActivationStatus -
The list of Identity and Verification method types in
IDVType.Version
Version 3.0See moreSince
Since 3.0Declaration
Swift
public enum IDVType : String -
IDVSessionis used to retrieve the vProvisionedTokenId session details with pending activation.Version
Version 3.0See moreSince
Since 3.0Declaration
Swift
public class IDVSession
VisaCTFHelper Class Reference