stepUpDidValidate is triggered when the transaction has been terminated. This is how the Cardinal Mobile SDK hands back control to the merchant's application. This event will include data on how the transaction attempt ended and should be where you review the results of the transaction and make decisions regarding the next steps. The field ActionCode should be used to determine the overall state of the transaction. On the first pass, we recommend that on an ActionCode of 'SUCCESS' or 'NOACTION' you send the response JWT to your backend for verification. There is more information on verifying JWT's in the next section.
Objective-C
-(void)cardinalSession:(CardinalSession *)session stepUpDidValidateWithResponse:(CardinalResponse *)validateResponse serverJWT:(NSString *)serverJWT{
switch (validateResponse.actionCode) {
case CardinalResponseActionCodeSuccess:
// Handle successful transaction, send JWT to backend to verify
break;
case CardinalResponseActionCodeNoAction:
// Handle no actionable outcome
break;
case CardinalResponseActionCodeFailure:
// Handle failed transaction attempt
break;
case CardinalResponseActionCodeError:
// Handle service level error
break;
case CardinalResponseActionCodeCancel:
// Handle transaction canceled by user
break;
case CardinalResponseActionCodeTimeout:
// Handle transaction timeout.
break;
}
}
Swift
func cardinalSession(cardinalSession session: CardinalSession!, stepUpValidated validateResponse: CardinalResponse!, serverJWT: String!) {
switch validateResponse.actionCode {
case .success:
// Handle successful transaction, send JWT to backend to verify
break
case .noAction:
// Handle no actionable outcome
break
case .failure:
// Handle failed transaction attempt
break
case .error:
// Handle service level error
break
case .cancel:
// Handle transaction canceled by user
break
case .timeout:
// Handle transaction timedout
break
}
}
Value
Description
SUCCESS
Authentication was completed successfully. You will have a CAVV, ECIFlag, and XID to send during authorization.
NOACTION
Authentication was not applicable and no service level errors were encountered. When the ErrorNumber is 0, generally this means you may move on to authorization, but be aware the transaction may not be eligible for liability shift.
FAILURE
Authentication resulted in a failure - this includes the end user failing authentication.
ERROR
An error was encountered. Refer to ErrorNumber and ErrorDescription for more details on the error. If a Payment object is present you may have additional details in the ReasonCode and ReasonDescription fields within the Payment object.