/n software 3-D Secure V2 iOS 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:

  func completed(_ completionEvent: CompletionEvent) {
    showToast("Challenge completed with transactionStatus " + completionEvent.getTransactionStatus())
    try? closeTransaction()
  }
  
  func cancelled() {
    showToast("Challenge cancelled.")
    try? closeTransaction()
  }
  
  func timedout() {
    showToast("Challenge timed out.")
    try? closeTransaction()
  }
  
  func protocolError(_ protocolErrorEvent: ProtocolErrorEvent) {
    showToast("Challenge protocolError: " +
      protocolErrorEvent.getErrorMessage().getErrorDescription() + "\t" +
      protocolErrorEvent.getErrorMessage().getErrorDetails());
    try? closeTransaction()
  }
  
  func runtimeError(_ runtimeErrorEvent: RuntimeErrorEvent) {
    showToast("Challenge runtimeError: " + runtimeErrorEvent.getErrorMessage());
    try? closeTransaction()
  }

  // Helper method
  func closeTransaction() throws {
    if sdkTransaction != nil {
      try sdkTransaction?.close()
      sdkTransaction = nil
    }
  }

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