/n software 3-D Secure V2 Android Edition

Questions / Feedback?

Challenge Status Receiver

ChallengeStatusReceiver is an interface used to obtain the result of the SDK challenge process. This should be implemented in the application and passed to the doChallenge method when Starting the Challenge. When the challenge process has finished, either successfully or in error, one of the following corresponding methods will be called:

NameDescription
completedCalled when the challenge process (that is, the transaction) is completed. When a transaction is completed, a transaction status will be available.
cancelledCalled when the cardholder selects the option to cancel the transaction on the challenge screen.
timedoutCalled when the challenge process reaches or exceeds the timeout interval that is specified during the doChallenge call.
protocolErrorCalled when the 3DS SDK receives an EMV® 3-D Secure protocol-defined error message from the ACS.
runtimeErrorCalled when the 3DS SDK encounters errors during the challenge process. These errors include all errors except those covered by the protocolError method.

Example implementations of these methods can be found below:

  @Override
  public void completed(CompletionEvent completionEvent) {
    showToast("Challenge completed with transactionStatus " + completionEvent.getTransactionStatus());
    closeTransaction();
  }

  @Override
  public void cancelled() {
    showToast("Challenge cancelled.");
    closeTransaction();
  }

  @Override
  public void timedout() {
    showToast("Challenge timed out.");
    closeTransaction();
  }

  @Override
  public void protocolError(ProtocolErrorEvent protocolErrorEvent) {
    showToast("Challenge protocolError: " +
        protocolErrorEvent.getErrorMessage().getErrorDescription() + "\t" +
        protocolErrorEvent.getErrorMessage().getErrorDetails());
    closeTransaction();
  }

  @Override
  public void runtimeError(RuntimeErrorEvent runtimeErrorEvent) {
    showToast("Challenge runtimeError: " + runtimeErrorEvent.getErrorMessage());
    closeTransaction();
  }

  // Helper method  
  public void closeTransaction() {
    if (sdkTransaction != null) {
      sdkTransaction.close();
      sdkTransaction = null;
    }
    sdkProgressDialog = null;
  }

Copyright (c) 2023 /n software inc. - All rights reserved.
/n software 3-D Secure V2 Android Edition - Version 2.2 [Build 8522]