Transaction.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // Transaction.h
  3. // CardinalEMVCoSDK
  4. //
  5. // Copyright © 2018 Cardinal Commerce. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import "AuthenticationRequestParameters.h"
  9. #import "ProgressDialog.h"
  10. #import "ChallengeStatusReceiver.h"
  11. #import "ChallengeParameters.h"
  12. /**
  13. * An object that confronts to Transaction protocol hold parameters that the 3DS Server requires to create AReq messages and to perform the Challenge Flow.
  14. */
  15. @protocol Transaction <NSObject>
  16. /**
  17. * Returns device and 3DS SDK information to the 3DS Requestor App.
  18. * @return AuthenticationRequestParameters
  19. */
  20. - (nonnull AuthenticationRequestParameters*) getAuthenticationRequestParameters;
  21. /**
  22. * Initiates the challenge process.
  23. * @param challengeParameters ACS details (contained in the ARes) required by the 3DS SDK to conduct the challenge process during the transaction
  24. * @param challengeStatusReceiver Callback object for notifying the 3DS Requestor App about the challenge status.
  25. * @param timeOut Timeout interval (in minutes) within which the challenge process must be completed. The minimum timeout interval should be 5 minutes.
  26. * @param error Reference to NSError for exception handling
  27. */
  28. - (BOOL) doChallengeWithChallengeParameters: (ChallengeParameters *_Nonnull) challengeParameters
  29. challengeStatusReceiver: (id<ChallengeStatusReceiver>_Nonnull) challengeStatusReceiver
  30. timeOut: (int) timeOut
  31. error: (NSError *_Nullable*_Nullable)error __attribute__((swift_error(nonnull_error))) NS_SWIFT_NAME(doChallenge(_:challengeStatusReceiver:timeOut:));
  32. /**
  33. * Returns an instance of Progress View (processing screen) that the 3DS Requestor App uses.
  34. * @return ProgressDialog
  35. */
  36. - (ProgressDialog *_Nonnull) getProgressView;
  37. /**
  38. * Cleans up resources that are held by the Transaction object.
  39. */
  40. - (void) close;
  41. @end