| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- //
- // CardinalResponse.h
- // CardinalMobileSDK
- //
- // Copyright © 2018 CardinalCommerce. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- NS_ASSUME_NONNULL_BEGIN
- /// For further documentation: https://cardinaldocs.atlassian.net/wiki/spaces/CC/pages/98315/Response+Objects
- /*!
- * @typedef CardinalResponseActionCode
- * @brief List of resulting state of the transaction.
- * @constant CardinalResponseActionCodeSuccess The transaction resulted in success for the payment type used.
- * @constant CardinalResponseActionCodeNoAction The API calls to Centinel API were completed and there is no further actionable items to complete.
- * @constant CardinalResponseActionCodeFailure The transaction resulted in an error.
- * @constant CardinalResponseActionCodeError A service level error was encountered.
- * @constant CardinalResponseActionCodeCancel The transaction was cancelled by the user.
- * @constant CardinalResponseActionCodeTimeout The transaction was timed out.
- */
- typedef NS_ENUM(NSUInteger, CardinalResponseActionCode) {
- CardinalResponseActionCodeSuccess,
- CardinalResponseActionCodeNoAction,
- CardinalResponseActionCodeFailure,
- CardinalResponseActionCodeError,
- CardinalResponseActionCodeCancel,
- CardinalResponseActionCodeTimeout
- };
- // REVISIT: Turn these string values into enums for better type/value checking (wjf, 2018-02)
- @interface CardinalPaymentExtendedData : NSObject
- /*!
- * @property enrolled Enrolled
- * @brief Status of Authentication eligibility.
- * Possible Values:
- * Y = Yes- Bank is participating in 3D Secure protocol and will return the ACSUrl
- * N = No - Bank is not participating in 3D Secure protocol
- * U = Unavailable - The DS or ACS is not available for authentication at the time of the request
- * B = Bypass- Merchant authentication rule is triggered to bypass authentication in this use case
- */
- @property (nonatomic, readonly) NSString *enrolled;
- /*!
- * @property paResStatus PA Res Status
- * @brief Transaction status result identifier.
- * Possible Values:
- * Y – Successful Authentication
- * N – Failed Authentication
- * U – Unable to Complete Authentication
- * A – Successful Attempts Transaction
- */
- @property (nonatomic, readonly) NSString *paResStatus;
- /*!
- * @property signatureVerification Signature Verification
- * @brief Transaction Signature status identifier.
- * Possible Values:
- * Y - Indicates that the signature of the PARes has been validated successfully and the message contents can be trusted.
- * N - Indicates that the PARes could not be validated. This result could be for a variety of reasons; tampering, certificate expiration, etc., and the result should not be trusted.
- */
- @property (nonatomic, readonly) NSString *signatureVerification;
- /*!
- * @property cavv CAVV
- * @brief Cardholder Authentication Verification Value (CAVV)
- */
- @property (nonatomic, readonly) NSString *cavv;
- /*!
- * @property eciFlag ECIFlag
- * @brief Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically.
- */
- @property (nonatomic, readonly) NSString *eciFlag;
- /*!
- * @property xid XId
- * @brief Transaction identifier resulting from authentication processing.
- */
- @property (nonatomic, readonly) NSString *xid;
- + (instancetype)new NS_UNAVAILABLE;
- - (instancetype)init NS_UNAVAILABLE;
- @end
- // TODO: Turn these string values into enums for better type/value checking (wjf, 2018-02)
- @interface CardinalPayment : NSObject
- /*!
- * @property type Type
- * @brief The payment type of this transaction.
- * Possible Values:
- * CCA - Cardinal Consumer Authentication
- * Paypal
- * Wallet
- * VisaCheckout
- * ApplePay
- * DiscoverWallet
- */
- @property (nonatomic, readonly) NSString *type;
- /*!
- * @property processorTransactionId Processor Transaction Id
- * @brief The Transaction Identifier returned back from the Processor.
- * Possible Values:
- * CCA - Cardinal Consumer Authentication
- * Paypal
- * Wallet
- * VisaCheckout
- * ApplePay
- * DiscoverWallet
- */
- @property (nonatomic, readonly) NSString *processorTransactionId;
- /*!
- * @property extendedData Extended Data
- * @brief This will contain an extension object that corresponds to the Payment Type of this transaction.
- */
- @property (nullable, nonatomic, readonly) CardinalPaymentExtendedData *extendedData;
- + (instancetype)new NS_UNAVAILABLE;
- - (instancetype)init NS_UNAVAILABLE;
- @end
- /*!
- * @interface CardinalResponse Cardinal Response
- * @brief Response from the Cardinal after Validation.
- */
- @interface CardinalResponse : NSObject
- /*!
- * @property isValidated isValidated
- * @brief This value represents whether transaction was successfully or not.
- */
- @property (nonatomic, readonly) BOOL isValidated;
- /*!
- * @property payment Payment
- * @brief CardinalPayment object.
- * Check CardinalPayment object for detail information.
- */
- @property (nullable, nonatomic, readonly) CardinalPayment *payment;
- /*!
- * @property actionCode Action Code
- * @brief The resulting state of the transaction.
- * Check CardinalResponseActionCode enum for detail.
- */
- @property (nonatomic, readonly) CardinalResponseActionCode actionCode;
- /*!
- * @property errorNumber Error Number
- * @brief Application error number. A non-zero value represents the error encountered while attempting the process the message request.
- */
- @property (nonatomic, readonly) NSInteger errorNumber;
- /*!
- * @property errorDescription Error Description
- * @brief Application error description for the associated error number.
- */
- @property (nonatomic, readonly) NSString *errorDescription;
- + (instancetype)new NS_UNAVAILABLE;
- - (instancetype)init NS_UNAVAILABLE;
- @end
- NS_ASSUME_NONNULL_END
|