Handle the Centinel Lookup Response and SDK handle the Challenge UI - iOS - V 2.2.4






After the completion of the cmpi_lookup request, check the CMPI_Lookup_Response for the following fields : 

  • ThreeDSVersion = 2.X ( 2.0, 2.1, etc)
  • Enrolled = Y
  • PAResStatus = C

Upon validating the above fields, you will call [session continueWithTransactionId.. ] to hand control to SDK for performing the challenge between the user and the issuing bank. Use the code snippet below for completing the session's continue

cardinal session continue is updated without the hardcoded directoryServerID.

 [session continueWithTransactionId: @"[TRANSACTION_ID]" payload: @"[PAYLOAD]" directoryServerID: CCADirectoryServerIDVisa didValidateDelegate: self];

In continue for Quick Integration, a class conforming to a protocol CardinalValidationDelegate (and implement a method stepUpDidValidate) should be passed as a parameter. Following is the example of class conforming to CardinalValidationDelegate protocol.


 Objective-C
@interface YourViewController()<CardinalValidationDelegate>{ //Conform your ViewController or any other class to CardinalValidationDelegate protocol
    
}
@end
 
@implementation YourViewController
 
    /**
     * This method is triggered when the transaction has been terminated.This is how SDK hands back
     * control to the merchant's application. This method will
     * include data on how the transaction attempt ended and
     * you should have your logic for reviewing the results of
     * the transaction and making decisions regarding next steps.
     * JWT will be empty if validate was not successful
     *
     * @param session
     * @param validateResponse
     * @param serverJWT
     */
    -(void)cardinalSession:(CardinalSession *)session stepUpDidValidateWithResponse:(CardinalResponse *)validateResponse serverJWT:(NSString *)serverJWT{
        
    }
 
@end

If continue is being called in the same class then the following method is called to start StepUpFlow:

[session continueWithTransactionId: @"[TRANSACTION_ID]"
						   payload: @"[PAYLOAD]"
			   didValidateDelegate: self];
 Swift
class YourViewController:CardinalValidationDelegate {
 
    /**
     * This method is triggered when the transaction has been terminated.This is how SDK hands back
     * control to the merchant's application. This method will
     * include data on how the transaction attempt ended and
     * you should have your logic for reviewing the results of
     * the transaction and making decisions regarding next steps.
     * JWT will be empty if validate was not successful
     *
     * @param session
     * @param validateResponse
     * @param serverJWT
     */
    func cardinalSession(cardinalSession session: CardinalSession!, stepUpValidated validateResponse: CardinalResponse!, serverJWT: String!) {
       
    }

}

If continue is being called in the same class then the following method is called to start StepUpFlow:

session.continueWith(transactionId: "[TRANSACTION_ID]", payload: "[PAYLOAD]", validationDelegate: self)

Error rendering macro 'excerpt-include' : No link could be created for 'Handling the onValidated - iOS - V 2.2.4'.

ValidateResponse Object 


PropertiesTypeDescription

isValidated

BOOL

This value represents whether the transaction was successful or not.

errorNumber

NSInteger

Application error number. A non-zero value represents the error encountered while attempting the process the message request.

errorDescription

NSString

Application error description for the associated error number.

payment

CardinalPayment

Check CardinalPayment object for detailed information.

actionCode

CardinalResponseActionCode

The resulting state of the transaction. ENUM with the following possible values:

    CardinalResponseActionCodeSuccess,

    CardinalResponseActionCodeNoAction,

    CardinalResponseActionCodeFailure,

    CardinalResponseActionCodeError,

    CardinalResponseActionCodeCancel,

    CardinalResponseActionCodeTimeout