Appendix A: Header Definitions

This appendix lists the header files for public declarations:

<CommerceDataTypes/ECLConnectionType.h>

/// \brief Enum of all possible connection types.
typedef NS_ENUM(NSInteger, ECLConnectionType)
{
    ECLConnectionType_BT,
    ECLConnectionType_IP,
    ECLConnectionType_AUDIO
};

<CommerceDataTypes/ECLCurrencyCode.h>

/// \brief Enum of country currency codes (ISO 4217).
/// ECLCurrencyCode_Unset is unset value. ECLCurrencyCode_Unknown is unmatched value.
typedef enum
{
    ECLCurrencyCode_Unset = 0,
    ECLCurrencyCode_Unknown,
    ECLCurrencyCode_CAD,
    ECLCurrencyCode_EUR,
    ECLCurrencyCode_GBP,
    ECLCurrencyCode_PLN,
    ECLCurrencyCode_USD,
} ECLCurrencyCode;

<CommerceDataTypes/ECLMoney.h>

/// \brief Representation of monetary amounts with a currency code (ECLCurrencyCode - ISO 4217) and a value in minor units.
///
/// $10.95 USD would be specified as a minor units value of 1095 and a currency code of ECLCurrencyCode_USD.
///
/// $0.10 USD would be specified as a minor units value of 10 and a currency code of ECLCurrencyCode_USD.
///
/// $0.00 USD would be specified as a minor units value of 0 and a currency code of ECLCurrencyCode_USD.
@interface ECLMoney : NSObject

/// \brief Constructor for defining monetary amounts.
/// \param amount Amount in minor units. If negative, returns nil.
/// \param currencyCode Currency code as an value of ECLCurrencyCode
/// \return new instance of ECLMoney
- (id)initWithMinorUnits:(long)amount withCurrencyCode:(ECLCurrencyCode)currencyCode;

/// \brief Helper method that calculates the difference between an instance of ECLMoney and this instance
/// \param money ECLMoney instance to calculate from
/// \return the differnce between this instance and money if money is less than this instance, otherwise nil is returned
- (ECLMoney *)differenceIfGreaterThanOrEqualTo:(ECLMoney *)money;

/// \brief Helper method that compares minor units and currency code.
/// \param money ECLMoney instance to compare
/// \return YES if values are equal. NO if unequal.
- (BOOL)isEqual:(ECLMoney *)money;

/// \brief Helper method that returns if the minor units is greater than 0
/// \return YES if minor unit value is greater than 0. NO if less than or equal to 0.
- (BOOL)isGreaterThanZero;

/// \brief Helper method that determines if this ECLMoney instance holds greater amount
/// \param money ECLMoney instance to compare
/// \return NO if this ECLMoney instance holds less amount. YES if not
- (BOOL)isGreaterThanOrEqualTo:(ECLMoney *)money;

/// \brief Property that is the minor unit value. Cannot be negative.
/// \return Minor unit value
@property (readonly)long amount;

/// \brief Property that is the currency code
/// \return Currency code
@property (readonly)ECLCurrencyCode currencyCode;

@end

Reference

<CommerceDataTypes/ECLTax.h>

/// \brief Represents a tax object - holding the money as ECLMoney and the type as ECLTaxType
@interface ECLTax : NSObject

/// \brief Constructs the object with the specified money and a default type of ECLTaxTypeSaleGeneral
/// \param money ECLMoney object.
/// \return new instance of ECLTax
- (id)initWithMoney:(ECLMoney *)money;

/// \brief Constructs the object with the specified money and tax type
/// \param money ECLMoney object.
/// \param taxType the tax type.
/// \return new instance of ECLTax
- (id)initWithMoney:(ECLMoney *)money andTaxType:(ECLTaxType)taxType;

/// \brief Property that is the money
/// \return money
@property (readonly)ECLMoney *money;

/// \brief Property that is the tax type
/// \return Tax type
@property (readonly)ECLTaxType type;

@end

References

<CommerceDataTypes/ECLTaxType.h>

/// \brief Supported tax types. For the general case, ECLTaxTypeSaleGeneral should be used.
/// However, there are territories where different & multiple taxes are needed - for example Puerto Rico.
typedef NS_ENUM(NSInteger, ECLTaxType) {
    ECLTaxTypeSaleGeneral,          ///> General sales tax
    ECLTaxTypeIvuState,             ///> IVU State tax - Puerto Rico
    ECLTaxTypeIvuMunicipality       ///> IVU Municipality tax - Puerto Rico
};

<Commerce-Opayo/ECLAccountDelegate.h>

/// \brief A class which conforms to this protocol must be implemented to create a Commerce account.
@protocol ECLAccountDelegate <NSObject>
 
@required
 
/// \brief Notify that an account has been initialized and can be used for transactions, etc.
/// \param account The account which has been initialized
- (void)accountDidInitialize:(id<ECLAccountProtocol>)account;
 
/// \brief Notify that an account failed to initialize.
/// \param account The account which has not been initialized
/// \param error The error which indicates the reason for the failure
- (void)accountDidFailToInitialize:(id<ECLAccountProtocol>)account error:(NSError *)error;
 
/// \brief Notify the implementor that the currency supported for the account has changed.
///
/// If Commerce is able to get the currency after account initialization this will be called.
/// \param account The account which changed currency
/// \param defaultCurrencyCode ECLCurrencyCode. The currency of the account.
- (void)defaultCurrencyDidChange:(id<ECLAccountProtocol>)account defaultCurrencyCode:(ECLCurrencyCode)defaultCurrencyCode;
 
/// \brief Called when Commerce needs to know what server to communicate with.
/// \param account The account which needs to connect to a server
/// \return server to use. ECLServerType_Demo and ECLServerType_Production are available externally.
- (ECLServerType)serverType:(id<ECLAccountProtocol>)account;
 
@end

References

<Commerce-Opayo/ECLAccountInformation.h>

/// \brief Is gratuity supported for an account
typedef enum
{
    ECLGratuitySupported_No = 0,        ///< Not supported
    ECLGratuitySupported_Yes,           ///< Is Supported
    ECLGratuitySupported_Unknown,       ///< Unable to determine is supported
} ECLGratuitySupported;
 
/// \brief Information about an account. That we retrieve from the server at the time of account creation.
@interface ECLAccountInformation : NSObject
 
/// \brief The merchant name on the account
@property (readonly) NSString *name;
/// \brief The default currency for the account
@property (readonly) ECLCurrencyCode currencyCode;
/// \brief The first line of address for the account
@property (readonly) NSString *address1;
/// \brief Specifies the support of gratuity for the account. Gratuity is supported only if the market segment is service.
@property (readonly) ECLGratuitySupported gratuitySupported;
/// \brief Specifies whether CVV is enabled
@property (readonly) ECLTriState cvvEnabled;
 
@end

Reference

<Commerce-Opayo/ECLAccountInformationRetrievalDelegate.h>

/// \brief Delegate to get notifications when retrieving Account Information via '[account retrieveAccountInformation]'
@protocol ECLAccountInformationRetrievalDelegate <NSObject>

@required
/// \brief Notification that the account information retrieval has succeeded
/// \param account The account the retrieval request was done for
/// \param accountInformation The account information that was retrieved
- (void)accountInformationRetrievalDidSucceed:(id<ECLAccountProtocol>)account accountInformation:(ECLAccountInformation *)accountInformation;

/// \brief Notification that the account information retrieval has failed
/// \param account The account the retrieval request was done for
/// \param error NSError instance which indicates the reason for the failure. Use 'error.debugDescription' to get more information.
- (void)accountInformationRetrievalDidFail:(id<ECLAccountProtocol>)account error:(NSError *)error;

@end

References

<Commerce-Opayo/ECLAccountProtocol.h>

/// \brief Commerce account for transactions, receipts, transaction search, printers, and card readers
@protocol ECLAccountProtocol <NSObject>

@required

/// \brief Indicates the underlying host account type for this account (Converge(NA), Opayo(EU), etc.)
@property (readonly) ECLHostAccountType hostAccountType;

/// \brief Provides access to the processing of transactions
@property (readonly) id<ECLTransactionProcessorProtocol> transactionProcessor;

/// \brief Provides control of card readers
/// By default when doing a transaction if there is only one card reader, it will be used.
@property (readonly) id<ECLDevicesProtocol> cardReaders;

/// \brief Provides control of printers
@property (readonly) id<ECLDevicesProtocol> printers;

/// \brief Ensure that an account is properly configured and can authenticate with the server
/// \param delegate notification of success or failure to validate account.
- (void)validateAccount:(id<ECLAccountValidationDelegate>)delegate;

/// \brief Retrieve from server information about this account including default currency, name, address, etc
- (void)retrieveAccountInformation:(id<ECLAccountInformationRetrievalDelegate>)delegate;

/// \brief Call this method when any of the credentials or server type of the account change.
/// \param delegate notification of success or failure to validate account.
- (void)propertiesDidChange:(id<ECLAccountValidationDelegate>)delegate;

/// \brief Find all available devices (card readers, printers, etc.).
/// \param delegate The delegate to receive notifications during the process of finding available devices.
/// \param forceToDisconnect A flag that ensures that any connected devices are forgotten.
/// \param timeoutInSeconds Number of seconds until findDevices should abort the search process.
/// \return An error code that describes the results of findDevices. Returns nil for no error.
- (NSError *)findDevices:(id<ECLFindDevicesDelegate>)delegate forceToDisconnect:(BOOL)forceToDisconnect timeoutInSeconds:(int)timeoutInSeconds;

/// \brief Returns the NS_OPTION of server types supported
@property (readonly, nonatomic) ECLServerType supportedServerTypes;

@end

References

<Commerce-Opayo/ECLAccountValidationDelegate.h>

/// \brief Delegate to get notifications for account validation via the '[ECLAccountProtocol validateAccount:]'
@protocol ECLAccountValidationDelegate <NSObject>

@required

/// \brief Notification that the account was validated
/// \param account The account which was validated
- (void)accountDidValidate:(id<ECLAccountProtocol>)account;

/// \brief Notification that the account failed to be validated
/// \param account The account which was not validated
/// \param error Indicates the reason that the account was not validated. Use 'error.debugDescription' to get more information.
- (void)accountDidFailToValidate:(id<ECLAccountProtocol>)account error:(NSError *)error;

@end

Reference

<Commerce-Opayo/ECLCardReaderAttributes.h>

/// \brief Attributes for a card reader. Only values available will be set.
@interface ECLCardReaderAttributes : NSObject

/// \brief Card entries available for use
@property (readonly)ECLCardEntryType entryModes;

/// \brief Options available on card reader including doing gratuity and signature
@property (readonly)ECLCardReaderOption options;

/// \brief Model of the reader retrieved from card reader SDK
@property (readonly)NSString *model;

/// \brief Name of the reader retrieved from card reader SDK
@property (readonly)NSString *name;

/// \brief Manufacturer retrieved from card reader SDK
@property (readonly)NSString *manufacturer;

/// \brief Serial number of the reader retrieved from card reader SDK
@property (readonly)NSString *serialNumber;

/// \brief Specifies if this reader is capable of doing EMV transactions
- (BOOL)isEmvCardReader;

@end

Reference

<Commerce-Opayo/ECLCardReaderAttributesForInitializedCardReaderDelegate.h>

/// \brief Delegate for receiving the result of retrieving the card reader information

@protocol ECLCardReaderAttributesForInitializedCardReaderDelegate


/// \brief A callback used when card reader information retrieval succeeded

/// \param cardReader The target card reader

/// \param cardReaderAttributes The retrieved card reader information

- (void)cardReaderAttributesForInitializedCardReaderSuccess:(id<ECLCardReaderProtocol>)cardReader cardReaderAttributes:(ECLCardReaderAttributes *)cardReaderAttributes;


/// \brief A callback used when card reader information retrieval failed

/// \param cardReader The target card reader

/// \param error Cause of failure

- (void)cardReaderAttributesForInitializedCardReaderError:(id<ECLCardReaderProtocol>)cardReader error:(NSError *)error;


@end

References

<Commerce-Opayo/ECLCardReaderDelegate.h>

/// \brief Delegate to receive card reader notifications.
@protocol ECLCardReaderDelegate <NSObject>

- (void)cardReaderConnectedAndWillInitialize:(id<ECLCardReaderProtocol>)cardReader;
- (void)cardReaderInitialized:(id<ECLCardReaderProtocol>)cardReader;
- (void)cardReader:(id<ECLCardReaderProtocol>)cardReader erroredConnectingOrInitializating:(NSError *)error;
- (void)cardReaderWillUpdateConfiguration:(id<ECLCardReaderProtocol>)cardReader;
- (void)cardReaderUpdateSucceeded:(id<ECLCardReaderProtocol>)cardReader;
- (void)cardReader:(id<ECLCardReaderProtocol>)cardReader erroredUpdating:(NSError *)error;   // TODO do we need this or is error good enough?
- (void)cardReaderWillReboot:(id<ECLCardReaderProtocol>)cardReader;
- (void)cardReaderShouldManuallyReboot:(id<ECLCardReaderProtocol>)cardReader didUpdate:(BOOL)didUpdate;
- (void)cardReader:(id<ECLCardReaderProtocol>)cardReader erroredRebooting:(NSError *)error;
- (void)cardReaderWillReset:(id<ECLCardReaderProtocol>)cardReader;
- (void)cardReaderDidReset:(id<ECLCardReaderProtocol>)cardReader;
- (void)cardReader:(id<ECLCardReaderProtocol>)cardReader erroredResetting:(NSError *)error;
- (void)cardReaderDisconnected:(id<ECLCardReaderProtocol>)cardReader isStillTransacting:(BOOL)isStillTransacting reason:(ECLTransactionErrorCode)reason;
- (void)cardReader:(id<ECLCardReaderProtocol>)cardReader progress:(ECLTransactionProgress)progress;

@end

References

<Commerce-Opayo/ECLCardReaderProtocol.h>

/// \brief Card reader protocol. This is handled internally by Commerce.
@protocol ECLCardReaderProtocol <ECLDeviceProtocol>

@property (readonly, nonatomic)NSString *name;
@property (readonly, nonatomic)NSString *serialNumber;

- (BOOL)indicatesCannotConnect:(NSError *)error;

/// \brief Test to see if card reader is connected and initialized
/// \return result of the test
- (BOOL)isConnectedAndInitialized;

/// \brief If you want to receive connection related event callbacks, pass in a listener
/// \param delegate - the delegate which will receive callbacks
- (void)addConnectionDelegate:(id<ECLCardReaderDelegate>)delegate;

/// \brief This method lets you remove a callback listener to prevent future callbacks
/// \param delegate - the delegate which had been receiving callbacks
- (void)removeConnectionDelegate:(id<ECLCardReaderDelegate>)delegate;

/// \brief Connect and Initialize a card reader
/// \param updateIfNecessary - flag indicating whether to perform an update on a card reader if required. When the value is set to NO and there is an update, the card reader will be disconnected and no operation can be performed on it until the update is complete.
- (void)connectAndInitialize:(BOOL)updateIfNecessary;

/// \brief Disconnect the currently connected card reader
- (void)disconnect;

/// \brief Gets the latest status from card reader, including device connection status, battery level if applicable and if devics is be charged.
- (void)refreshStatus;

/// \brief Get card reader information
/// \param delegate to receive notifications related to this operation
- (void)attributesForInitializedCardReader:(id<ECLCardReaderAttributesForInitializedCardReaderDelegate>)delegate;

@end

References

<Commerce-Opayo/ECLCardTenderProtocol.h>

/// \brief Card Tender protocol used to pay transaction with card (debit, credit, emv, etc)
@protocol ECLCardTenderProtocol <ECLTenderProtocol>

@required

/// \brief The image of a customer's signature
///
/// Only if ECLTransactionProcessingDelegate's shouldProvideInformation is called and the tenderRequirements parameter has requiresDigitalSignature set to YES do you need to set this.
@property ECLSignatureData *digitalSignature;

/// \brief Presence of card required for manually entered card numbers
///
/// Only if ECLTransactionProcessingDelegate's shouldProvideInformation is called and the tenderRequirements parameter has requiresSpecifyingCardPresence set to YES do you need to set this. Or you can set when you are also setting that you want manual entry so you will not be called back.
@property ECCTriState cardPresent;

/// \brief Card Entry Types allowed for the transaction
///
/// For this release, if you have ECLCardEntryType_ManuallyEntered in the allowedCardEntryTypes it will only do manual as manual entry is exclusive. Otherwise we will use all supported entries for that transaction type. You do not have to set this if you want it to use the default. By default it is set to all except manual.
@property ECLCardEntryType allowedCardEntryTypes;

/// \brief Card Types allowed for the transaction
///
/// If you do not set this, it will include all types supported for the transaction.
/// If you do set it, only those you have set that are supported for the transaction will be used.
/// The most important time to set this is for linked refunds. It should be set to the same card type that was used for the original transaction. For other transactions you can leave as the default unless you want differently.
@property ECLCardType allowedCardTypes;

/// \brief Cancel signature requirement.
///
/// Only if ECLTransactionProcessingDelegate's shouldProvideInformation is called and the tenderRequirements parameter has requiresDigitalSignature set to YES do you need to set this. This will cause no signature to be sent to Converge server. If you print a receipt, a signature line will be printed that the customer can sign.
- (void)cancelSignature;

/// \brief Signature has been verified.
///
/// Only if ECLTransactionProcessingDelegate's shouldProvideInformation is called and the tenderRequirements parameter has requiresSignatureVerification set to ECLSignatureVerification_Required do you need to set this.
- (void)setSignatureVerificationHandledAndVerified;

/// \brief Signature has been unverified.
///
/// Only if ECLTransactionProcessingDelegate's shouldProvideInformation is called and the tenderRequirements parameter has requiresSignatureVerification set to ECLSignatureVerification_Required do you need to set this.
- (void)setSignatureVerificationHandledAndUnverified;

/// \brief Set voice approval code
///
/// Only if ECLTransactionProcessingDelegate's shouldProvideInformation is called and the tenderRequirements parameter has requiresVoiceReferral set to ECLVoiceReferral_Required do you need to set this.
/// \param authorizationCode Code that has been provided for authorization
- (void)setVoiceReferralHandledAndApproved:(NSString *)authorizationCode;

/// \brief Set that the voice referral was denied.
///
/// Only if ECLTransactionProcessingDelegate's shouldProvideInformation is called and the tenderRequirements parameter has requiresVoiceReferral set to ECLVoiceReferral_Required do you need to set this.
- (void)setVoiceReferralHandledAndDenied;

/// \brief Set you want voice approval to be required. You can either set setVoiceReferralHandledAndApproved or wait for the shouldProvideInformation callback.
- (void)setRequiresVoiceApproval;

/// \brief Set you want to allow partial approved transaction. This means the authorized amount may be less than the requested amount. Check the ECLTransactionOutcome to see the authorized amount in the ECLTransactionProcessingDelegate's transactionDidComplete.
- (void)setPartialApprovalAllowed;

@end

References 

<Commerce-Opayo/ECLCardTransactionOutcome.h>

// \brief Provides details about the result of a card transaction. Base class for ECLEmvCardTransactionOutcome
@interface ECLCardTransactionOutcome : ECLTransactionOutcome

/// \brief The state of the transaction (eg., committed, uncommitted, etc.)
@property (readonly) ECLTransactionState state;

/// \brief The authorization code, if any, for the transaction
@property (readonly) NSString *authCode;

/// \brief The masked PAN
@property (readonly) NSString *maskPan;

/// \brief The card scheme
@property (readonly) ECLCardTenderScheme cardScheme;

/// \brief The card holder's first name
@property (readonly) NSString *cardHoldersFirstName;

/// \brief The card holder's last name
@property (readonly) NSString *cardHoldersLastName;

/// \brief The value for a Authorization Response Code
@property (readonly) NSString *issuerResponseCode;

/// \brief Specifies if this was a EMV fallback transaction (Chip was unable to be read so customer swiped or tapped).
@property (readonly) BOOL fallback;

/// \brief Specifies if the transaction succeeded. If the states show there was an issue or transaction was declined, an error will be returned.
/// \return An NSError that indicates the reason for a failure or nil
- (NSError *)successful;

/// \brief Card entry type used for this transaction
@property (readonly)ECLCardEntryType cardEntryType;

/// \brief Card type used for this transaction
@property (readonly)ECLCardType cardType;

/// \brief For partial approval transactions this is the balance due
@property (readonly) ECLMoney *balanceDue;

/// \brief Amount requested for this transaction. See amountAuthorized in ECLTransactionOutcome to get amount that was authorized.
@property (readonly) ECLMoney *amountRequested;

@end

References

<Commerce-Opayo/ECLCashTenderProtocol.h>

/// \brief Provides access to details that may be required when using cash as tender
@protocol ECLCashTenderProtocol <ECLTenderProtocol>

@required

/// \brief The amount of cash that is tendered.  This is the amount of cash that the merchant received before issuing any change.  Therefore it may not equate with the final amount of the transaction.
///
/// Example:  A customer might hand the merchant $5 when she owes $3.20
@property (strong) ECLMoney *amountTendered;

@end

References

<Commerce-Opayo/ECLCommerce.h>

/// \brief The main interface and entry point into Commerce
@interface ECLCommerce : NSObject

/// \brief An account instance is required to use the features of Commerce to process transactions, etc
/// \param accountDelegate The delegate to receive notifications about the state of the account and for Commerce to query for required information such as account credentials
/// \param queue The dispatch queue which will be used for calling back to any delegates used with this account
/// \return None.  The delegate's accountDidInitialize will be called with the instance of ECLAccountProtocol once the account is initialized
+ (void)createAccount:(id<ECLAccountDelegate>)accountDelegate queue:(dispatch_queue_t)queue;

/// \brief An account instance is required to use the features of Commerce to process transactions, etc
/// \param accountDelegate The delegate to receive notifications about the state of the account and for Commerce to query for required information such as account credentials
/// \param queue The dispatch queue which will be used for calling back to any delegates used with this account
/// \param hostAccountType The type of the environment Commerce SDK operates on
/// \return None.  The delegate's accountDidInitialize will be called with the instance of ECLAccountProtocol once the account is initialized
+ (void)createAccount:(id<ECLAccountDelegate>)accountDelegate queue:(dispatch_queue_t)queue hostAccountType:(ECLHostAccountType)hostAccountType;

/// \brief Returns the version of Commerce
/// \return The version string
+ (NSString *)versionString;

/// \brief Initializes Commerce for use. Must be called before any other calls to Commerce.
/// \return Returns nil if no error. Non-nil if error occurred. Use [error debugDescription] to get information about the error.
+ (NSError *)initializeCommerce;

@end

References

<Commerce-Opayo/ECLCurrencyTransactionProtocol.h>

/// \brief Protocol for basic transactions that need tax, gratuity, discount, etc.
///
/// An instance conforming to this protocol is returned for ECLTransactionProcessorProtocol's createSaleTransaction and createPreAuthTransaction
@protocol ECLCurrencyTransactionProtocol <ECLTransactionProtocol>

@required

/// \brief The subtotal for the transaction without tax, gratuity, discount.
@property (readonly) ECLMoney *subtotal;

/// \brief The discount represented. By default it is set to nil.
@property ECLMoney *discount;

/// \brief The gratuity represented. By default it is not set and will be required to be set.
@property ECLMoney *gratuity;

/// \brief The total tax amount (adding up the tax amount for all the tax types set up for the transaction). By default it is set to nil.
@property ECLMoney *tax DEPRECATED_MSG_ATTRIBUTE("Use setTax(ECLMoney, ECLTaxType). Setting tax using this property is equivalent to calling setTax(ECLMoney, ECLTaxTypeSaleGeneral). Use totalTax to get the currently set total tax for this transaction.");

/// \brief An optional descriptive note about the transaction
@property NSString *note;

/// \brief An optional descriptive note about the transaction
@property NSString *merchantTransactionReference;

/// \brief Whether or not tax is inclusive (VAT) or exclusive (sales tax). By default it is NO.
@property BOOL isTaxInclusive;

/// \brief Whether or not gratuity on card reader is requested. By default it is NO.
@property BOOL isGratuityRequested;

/// \brief Optional flag as part of gratuity flow. If enabled, and a PIN Pad is utilized, the PIN Pad will allow for custom amount entry for the gratuity. By default it is NO.
@property BOOL isCustomAmountEntryAllowed;

/// \brief Optional call to override the default quick value options/percentages specified for the device. Defaults are 15, 18, 20%.
@property NSArray *gratuityQuickValues;

/// \brief Identifier for the original transaction if this transaction is associated with a previously completed transaction.
@property NSString *originalTransactionIdentifier;

/// \brief The total amount for the transaction. Takes into account subtotal, tax, gratuity.
- (ECLMoney *)total;

/// \brief The total amount without considering gratuity.
- (ECLMoney *)totalWithoutGratuity;

/// \brief Set the tax amount on a transaction together with the tax type. This is useful for the countries or regions where there are multiple types of taxes - for example Puerto Rico's IVU system
/// This will set the specified tax type in addition to other tax types that were potentially specified prior to this call.
/// Note: If the tax type in not supported by the region (i.e. setting IVU taxes in the US), the tax will not be set.
/// \param tax the tax amount
/// \param taxType the type of tax
- (void)setTax:(ECLMoney *)tax taxType:(ECLTaxType)taxType;

/// \brief Returns an array of taxes that are set up for the transaction.
- (NSArray<ECLTax *> *)taxes;

/// \brief Retrieve the total tax amount (adding up the tax amount for all the tax types set up for the transaction). Defaults to nil.
- (ECLMoney *)totalTax;

@end

References

<Commerce-Opayo/ECLDeviceBatteryChargeLevel.h>

/*! \file ECLDeviceBatteryChargeLevel.h
 \brief The battery charge level of a device.
 */

/*! ECLDeviceBatteryChargeLevelState */
typedef enum {
    ECLDeviceBatteryChargeLevelState_Unset = 0, /*!< Unset */
    ECLDeviceBatteryChargeLevelState_Unknown,   /*!< Unknown */
    ECLDeviceBatteryChargeLevelState_Full,      /*!< Battery level is full */
    ECLDeviceBatteryChargeLevelState_Good,      /*!< Battery level is good */
    ECLDeviceBatteryChargeLevelState_Low,       /*!< Battery level is low */
    ECLDeviceBatteryChargeLevelState_Critical,  /*!< Battery level is critical */
} ECLDeviceBatteryChargeLevelState;

@interface ECLDeviceBatteryChargeLevel : NSObject

/// \brief The battery charge level - value from 0 to 100
@property (readonly)NSNumber *chargeLevel;

/// \brief The battery charge level state - full, good, low, or critical
@property (readonly)ECLDeviceBatteryChargeLevelState chargeLevelState;

@end

<Commerce-Opayo/ECLDeviceConnectionStatus.h>

/*! \file ECLDeviceConnectionStatus.h
 \brief The connection status of a device.
 */

/*! ECLDeviceConnectionState */
typedef enum {
    ECLDeviceConnectionState_Unset = 0,             /*!< Unset */
    ECLDeviceConnectionState_Unknown,               /*!< Unknown */
    ECLDeviceConnectionState_Connected,             /*!< Device is connected */
    ECLDeviceConnectionState_Disconnected,          /*!< Device is disconnected */
    ECLDeviceConnectionState_ConnectedNotReady,     /*!< Device is connected but not fully functional*/
} ECLDeviceConnectionState;

@interface ECLDeviceConnectionStatus : NSObject

@property (readonly)ECLDeviceConnectionState deviceConnectionState;

@end

<Commerce-Opayo/ECLDevicePairingDelegate.h>

/// \brief Delegate for receiving callbacks related to device pairing.
@protocol ECLDevicePairingDelegate <NSObject>

/// \brief The pairing of the device succeeded
- (void)devicePairingSucceeded;

/// \brief The pairing of the device failed
- (void)devicePairingFailed;

/// \brief Bluetooth pairing is not supported for the device
- (void)devicePairingNotSupported;

@end

<Commerce-Opayo/ECLDevicePowerState.h>

/*! \file ECLDevicePowerState.h
 \brief The power state of a device.
 */

/*! ECLDeviceBatteryChargingState */
typedef enum {
    ECLDeviceBatteryChargingState_Unset = 0,    /*!< Unset */
    ECLDeviceBatteryChargingState_Unknown,      /*!< Unknown */
    ECLDeviceBatteryChargingState_Charging,     /*!< Device is connected to a power source and charging */
    ECLDeviceBatteryChargingState_ChargingUsb,  /*!< Device is connected to USB power source and charging */
    ECLDeviceBatteryChargingState_ChargingAc,   /*!< Device is connected to AC power source and charging */
    ECLDeviceBatteryChargingState_Discharging,  /*!< Device is disconnected from a power source and discharging */
} ECLDeviceBatteryChargingState;

@interface ECLDevicePowerState : NSObject

/// \brief The battery charge level of the device
@property (readonly)ECLDeviceBatteryChargeLevel *batteryChargeLevel;

/// \brief The battery charging state of the device
@property (readonly)ECLDeviceBatteryChargingState batteryChargingState;

@end

Reference

<Commerce-Opayo/ECLDeviceProtocol.h>

/// \brief Base protocol for printers and card readers
@protocol ECLDeviceProtocol <NSObject>

/// \brief Return if device name is equal to name
/// \param name Name to use for comparison
/// \return YES if name equals device name. NO if unequal
- (BOOL)isNameEqual:(NSString *)name;

/// \brief Add a delegate for receiving callbacks on the connection status of card reader (wired, wireless, or all)
/// \param delegate A delegate which will receive the status event callbacks
- (void)addStatusDelegate:(id<ECLDeviceStatusDelegate>)delegate;

/// \brief Remove a delegate for receiving callbacks on the connection status of card reader (wired, wireless, or all)
/// \param delegate A delegate which had been receiving the status event callbacks
- (void)removeStatusDelegate:(id<ECLDeviceStatusDelegate>)delegate;

/// \brief Get up to date connection status of card reader (wired, wireless, or all)
- (void)refreshStatus;

@end

Reference

<Commerce-Opayo/ECLDevicesProtocol.h>

/// \brief Provides access to devices (Card readers or printers depending on where the ECLDevicesProtocol is retrieved from).
@protocol ECLDevicesProtocol <NSObject>

/// \brief Searches for all available devices.
/// \param delegate A delegate for receiving callbacks on the progress of the search
/// \param forceToDisconnect flag indicating whether to disconnect already connected device first. True if need to discconect existing connection first
/// \param timeoutInSeconds After this many seconds, the search will stop
/// \return Returns NSError if search failed. Otherwise, will return Nil if search was successful.
- (NSError *)findDevices:(id<ECLFindDevicesDelegate>)delegate forceToDisconnect:(bool)forceToDisconnect timeoutInSeconds:(int)timeoutInSeconds;

/// \brief Returns true if the device searching process is still in progress. Otherwise, returns false.
- (BOOL)isSearchInProgress;

/// \brief Select a device to be used
/// \param device Name of device to use
/// \param connectionTypes Types of connections used to connect to this device
/// \return Protocol to the device that is set to use. nil if unable to find device with name and connection.
- (id<ECLDeviceProtocol>)selectDevice:(NSString *)device withConnectionTypes:(NSSet <NSNumber *> *)connectionTypes;

/// \brief The current selected device to be used.
/// \return Protocol to the device is being used.
- (id<ECLDeviceProtocol>)selectedDevice;

/// \brief Application should call this when his application moves to background in order to notify device to clear secure information and save battery.
- (void)applicationMovingToBackground;

/// \brief Application should call this when his application moves to foreground in order to notify device to check connection and be ready.
- (void)applicationMovingToForeground;

@end

References

<Commerce-Opayo/ECLDeviceStatusDelegate.h>

/// \brief Delegate for receiving device status.
@protocol ECLDeviceStatusDelegate <NSObject>

/// \brief Notification that the device connection status has changed
/// \param device The device we monitor
/// \param deviceConnectionState The current device connection status
- (void)deviceConnectionStateChanged:(id<ECLDeviceProtocol>)device deviceConnectionState:(ECLDeviceConnectionState)deviceConnectionState;

/// \brief Notification that the device power state has changed
/// \param device The device we monitor
/// \param devicePowerState The current device power state
- (void)devicePowerStateChanged:(id<ECLDeviceProtocol>)device devicePowerState:(ECLDevicePowerState *)devicePowerState;

/// \brief Notification that errors has occured
/// \param device The device we monitor
/// \param arrayOfNSErrors An array of NSError instances which indicate the reason(s) for the failure
- (void)refreshStatusDidFail:(id<ECLDeviceProtocol>)device errors:(NSArray *)arrayOfNSErrors;

/// \brief Notification that refreshStatus has completed, both connection status and battery info
- (void)refreshStatusDidComplete;

@end

References

<Commerce-Opayo/ECLEmvCardTransactionOutcome.h>

typedef enum {
    ECLIssuerScriptType_1,
    ECLIssuerScriptType_2,
    ECLIssuerScriptType_Unknown
} ECLIssuerScriptType;
 
/// \brief Issuer script returned for transaction
@interface ECLIssuerScript : NSObject
 
@property (readonly, nonatomic) ECLIssuerScriptType type;
@property (readonly, nonatomic) NSString *script;
 
@end
 
/// \brief Provides details about the result of an EMV card transaction
@interface ECLEmvCardTransactionOutcome : ECLCardTransactionOutcome
 
/// \brief Derive from Card verification method result
@property (readonly) ECLCardholderVerificationMethod iccCvmr;
 
/// \brief Application ID used
@property (readonly) NSString *iccApplicationId;
 
/// \brief Application Label used
@property (readonly) NSString *iccApplicationLabel;
 
/// \brief Terminal verification result
@property (readonly) NSString *iccTerminalVerificationResult;
 
/// \brief Transaction status information
@property (readonly) NSString *iccTransactionStatusInfo;
 
/// \brief The cryptogram value that is generated by the application in the chip card.
@property (readonly) NSString *iccApplicationCryptogram;
 
/// \brief The data sent to the chip card for online issuer authentication.
@property (readonly) NSString *iccArpc;
 
/// \brief Final Transaction status information
@property (readonly) NSString *iccFinalTsi;
 
/// \brief The incrementing counter value that is managed by the application in the chip card.
@property (readonly) NSString *iccAtc;
 
/// \brief The value is used to differentiate chip cards using the same (PAN).
@property (readonly) NSString *iccCsn;
 
/// \brief Issuer script returned for transaction
@property (readonly) ECLIssuerScript *iccIssuerScript;
 
/// \brief The value is used to send back to the POS in the authorization response message.
@property (readonly) NSString *iccIssuerScriptResults;
 
/// \brief The value for issuer's authorization
@property (readonly) NSString *iccIssuerAuthorization;
 
/// \brief Issuer application data for the transaction
@property (readonly) NSString *iccIssuerApplicationData;
 
/// \brief Specifies if the EMV transaction was reversed; e.g. signature canceled
@property (readonly) BOOL isReversed;
 
@end

References

<Commerce-Opayo/ECLError.h>

/// \brief A class which conforms to this protocol must be provided for the purposes of converting an NSError into a readable string. See +[ECLError setTranslator:]
@protocol ECLErrorTranslator

/// \brief Translate the error into a human-readable string, probably in the current locale
/// \param error The error to translate.  The error may or may not be an instance of ECLError
/// \return A readable string representing the error
- (NSString *)translateError:(NSError *)error;

@end

/// \brief Errors particular to Commerce
@interface ECLError : NSError

/// \brief Set the translator for converting errors to human-readable strings
/// \param translator The translator
+ (void)setTranslator:(id<ECLErrorTranslator>)translator;

/// \brief Instantiate a ECLError
/// \param code Indicates the reason for the error
/// \return Instance of ECLError
+ (ECLError *)error:(ECLTransactionErrorCode)code;

/// \brief Instantiate a ECLError
/// \param code Indicates the reason for the error
/// \param info Extra information about the error
/// \return Instance of ECLError
+ (ECLError *)error:(ECLTransactionErrorCode)code info:(NSDictionary *)info;

/// \brief Instantiate a ECLError
/// \param code Indicates the reason for the error
/// \param error A prior error which led to the ECLError
/// \return Instance of ECLError
+ (ECLError *)error:(ECLTransactionErrorCode)code withError:(NSError *)error;

/// \brief Instantiate a ECLError
/// \param code Indicates the reason for the error
/// \param errors Prior errors which led to the ECLError
/// \return Instance of ECLError
+ (ECLError *)error:(ECLTransactionErrorCode)code withErrors:(NSArray *)errors;

/// \brief Domain of the error. Can be "com.elavon.grove.commerce" or "ConvergeError".
/// \return Domain
+ (NSString *)domain;

/// \brief Determine if an error is a ECLError
/// \param error The NSError to test
/// \return YES if the error is a ECLError; NO otherwise
+ (BOOL)isCommerceError:(NSError *)error;

/// \brief Determine if an error with a specific code is a ECLError
    /// \return YES if the error is a ECLError with the specified code; NO otherwise
+ (BOOL)isCommerceError:(NSError *)error code:(ECLTransactionErrorCode)code;

/// \brief Instantiate an NSError that represents an error for the current backend
/// \param domain Name of domain
/// \param code Error code
/// \return Instance of NSError with domain and code
+ (NSError *)backEndError:(NSString *)domain code:(NSInteger)code;

/// \brief Instantiate an NSError that represents an error for the current backend
/// \param domain Name of domain
/// \param code Error code
/// \param debugErrorMessage Debug message to associate with error
/// \return Instance of NSError with domain, code, and debug  message
+ (NSError *)backEndError:(NSString *)domain code:(NSInteger)code debugErrorMessage:(NSString *)debugErrorMessage;

/// \brief If the error was created with nested errors, returns that. nil otherwise.
/// \return An array of NSError instances which led to the ECLError
- (NSArray *)nestedErrors;

/// \return YES if all errors indicate a problem with a signature (e.g., too small or otherwise rejected)
+ (BOOL)areAllSignatureErrors:(NSArray *)errors;

/// \return YES if a voice referral error is included
+ (NSError *)findVoiceReferralError:(NSArray *)errors;

/// \return YES if the error is a disconnected error; NO otherwise
- (BOOL)isDisconnectedError:(NSError *)error;

/// \return YES if the error is a disconnected error; NO otherwise
- (BOOL)containsDisconnectedError;

@end

Reference

<Commerce-Opayo/ECLFindDevicesDelegate.h>

/// \brief Delegate to get results of a device search.
@protocol ECLFindDevicesDelegate

/// \brief Called after a single device has been found, while searching for all available devices.
/// \param devices An instance implementing the ECLDevicesProtocol protocol.
/// \param name The name of the device model found during the device search process.
/// \param connectionType The specific connection type that can be used to connect to this device.
- (void)devicesSearchFound:(id<ECLDevicesProtocol>)devices name:(NSString *)name connectionType:(ECLConnectionType)connectionType;

/// \brief Called after the current device search process has completed (i.e. findDevices has completed).
/// \param devices An instance implementing the ECLDevicesProtocol protocol.
/// \param searchResults A list of all devices available after performing the device search process.
- (void)devicesSearchDone:(id<ECLDevicesProtocol>)devices searchResults:(NSArray<ECLFindDevicesSearchResult *> *)searchResults;

@end

References

<Commerce-Opayo/ECLFindDevicesSearchResult.h>

/// \brief Result of calling find devices operation.
@interface ECLFindDevicesSearchResult : NSObject

/// \brief Unique name for the available device
@property (readonly, copy) NSString *name;

/// \brief A set of {@link ECLConnectionType} that specify the different connection options available to this device.
@property (readonly) NSSet <NSNumber *> *connectionTypes;

/// \brief A set of {@link ECLDeviceType} that specifies whether this device can function as a card reader, printer, etc.
@property (readonly) NSSet <NSNumber *> *deviceTypes;

@end

<Commerce-Opayo/ECLGeneralOperationDelegate.h>

/// \brief Delegate for general operations.
@protocol ECLGeneralOperationDelegate <NSObject>

/// \brief Notification for any progress of the operation
/// \param progress the progress for the operation
- (void)progress:(ECLTransactionProgress)progress;

/// \brief Notification for the completion of the operation
/// \param success flag indicating whether the operation is successfully completed
/// \param error the specific error if the operation did not complete successfully
- (void)completed:(BOOL)success error:(NSError *)error;

@end

Reference

<Commerce-Opayo/ECLHostAccountType.h>

/// \brief The type of host account Commerce SDK operates with.
typedef NS_ENUM(NSInteger, ECLHostAccountType) {
    ECLHostAccountTypeUnset,          ///> Host account type is unset
    ECLHostAccountTypeConverge,       ///> Host account type is Converge
    ECLHostAccountTypeCreditCall,     ///> Host account type is CreditCall
    ECLHostAccountTypeOpayo           ///> Host account type is Opayo
};

<Commerce-Opayo/ECLLinkedRefundTransactionProtocol.h>

/// \brief Provides access to details which are necessary for a linked refund.  (A refund which is tied to an existing transaction.)
@protocol ECLLinkedRefundTransactionProtocol <ECLTransactionProtocol>
 
@required
 
/// \brief The id of the transaction which is being refunded
@property NSString *originalTransactionIdentifier;
 
/// \brief The amount for the transaction being refunded.
@property ECLMoney *amount;
 
@end

References

<Commerce-Opayo/ECLOpayoAccountDelegate.h>

/// \brief Implementing a class which conforms to this protocol is necessary for Opayo accounts
@protocol ECLOpayoAccountDelegate <ECLAccountDelegate>
 
@required
 
/// \brief The Merchant Id of the Opayo account to use for transactions.
/// \param account The account which requires the Merchant Id
/// \return ECCSensitiveData which contains the Merchant Id
- (ECCSensitiveData *)merchantId:(id<ECLAccountProtocol>)account;
 
/// \brief The Client Id of the Opayo account to use for transactions.
/// \param account The account which requires the Client Id
/// \return ECCSensitiveData which contains the Client Id
- (ECCSensitiveData *)clientId:(id<ECLAccountProtocol>)account;  
 
/// \brief The Password of the Opayo account to use for transactions.
/// \param account The account which requires the Password
/// \return ECCSensitiveData which contains the Password
- (ECCSensitiveData *)password:(id<ECLAccountProtocol>)account;
 
/// \brief The Operator PIN of the Opayo account to use for transactions.
/// \param account The account which requires the Operator PIN
/// \return ECCSensitiveData which contains the Operator PIN
- (ECCSensitiveData *)operatorPin:(id<ECLAccountProtocol>)account;  
 
@end

References

<Commerce-Opayo/ECLOpayoAccountProtocol.h>

/// \brief Commerce Opayo account protocol which provides access to methods specific to Opayo (Europe) gateway processing
@protocol ECLOpayoAccountProtocol <ECLAccountProtocol>
 
/// \brief Retrieve from server information about this account including default currency, name, address, etc and force an update of account configuration
/// \param delegate the delegate to receive the result
- (void)retrieveAccountInformationWithUpdate:(id<ECLAccountInformationRetrievalDelegate>)delegate;
 
/// \brief Pair with an available pinpad
/// \param delegate the delegate to receive the pairing result
- (void)pairWithPinPad:(id<ECLDevicePairingDelegate>)delegate;
 
/// \brief Query the available TIDs for a given MID
/// \param mid the MID for which TIDs are queried
/// \param delegate the delegate to receive the result
- (void)queryTIDs:(NSString *)mid delegate:(id<ECLTidQueryDelegate>)delegate;  
 
/// \brief Change the operator pin for the current account
/// \param pin the new operator pin
/// \param delegate the delegate to receive progress and result
- (void)changeOperatorPin:(ECCSensitiveData *)pin delegate:(id<ECLGeneralOperationDelegate>)delegate;
 
/// \brief Upload logs to server for troubleshooting
/// \param delegate the delegate to receive progress and result
- (void)uploadLogs:(id<ECLGeneralOperationDelegate>)delegate;
 
/// \brief Retrieve the type of TMS Update that needs to be performed.
/// After calling this method, you should perform the appropriate TMS update
/// \return the type of Tms Update required.
- (ECLOpayoTmsUpdateType)requiredTmsUpdateType;
 
/// \brief Perform a TMS Update. This will perform an update even if it isn't required.
/// \param tmsUpdateType The update type (FULL or NORMAL)
/// \param delegate the delegate for receiving updates and callbacks
- (void)performTmsUpdate:(ECLOpayoTmsUpdateType)tmsUpdateType delegate:(id<ECLTmsUpdateDelegate>)delegate;
 
@end

References

<Commerce-Opayo/ECLOpayoTmsUpdateType.h>

/// \brief Enumeration to represent Opayo (EU) TMS Update Type
typedef NS_ENUM(NSInteger, ECLOpayoTmsUpdateType) {
    ECLOpayoTmsUpdateTypeNone,
    ECLOpayoTmsUpdateTypeNormal,
    ECLOpayoTmsUpdateTypeFull
};

<Commerce-Opayo/ECLOpayoTransactionProcessingDelegate.h>

/// \brief Protocol to give notifications about processing of an Opayo (EU) transaction.
@protocol ECLOpayoTransactionProcessingDelegate <ECLTransactionProcessingDelegate>
 
/// \brief Notification that the password hash has updated for the account.
/// \param transaction the current transaction
/// \param tender the current tender
/// \param passwordHash the updated password hash
- (void)passwordHashUpdated:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender passwordHash:(ECCSensitiveData *)passwordHash;
 
@end

References

<Commerce-Opayo/ECLServerType.h>

/// \brief Available servers to use
typedef NS_OPTIONS(NSUInteger, ECLServerType)  {
    ECLServerType_Production       = 1 << 0,  ///< Live Production server
    ECLServerType_Demo             = 1 << 1,  ///< Demo server
};

<Commerce-Opayo/ECLStandaloneRefundTransactionProtocol.h>

/// \brief Represents a standalone refund transaction. One that is not linked to a previous transaction. Used to give credit to customer.
/// \code [account.transactionProcessor createStandaloneRefundTransactionWithTotal:money];" \endcode
@protocol ECLStandaloneRefundTransactionProtocol <ECLTransactionProtocol>

/// \brief the amount being refunded. This is the amount passed when creating the transaction
@property ECLMoney *amount;

/// \brief Note you want associated with the transaction
@property NSString *note;

@end

References

<Commerce-Opayo/ECLTenderProtocol.h>

/// \brief Provides access to basic details about the tender being used for a transaction
@protocol ECLTenderProtocol <NSObject>

@required

/// \brief The type of tender
@property (readonly) ECLTenderType type;

/// \return YES if this tender represents a card
- (BOOL)isCard;

/// \return YES if this tender represents a credit card
- (BOOL)isCreditCard;

/// \return YES if this tender represents a debit card
- (BOOL)isDebitCard;

/// \return YES if this tender represents a manually entered card
- (BOOL)isManualCardEntry;

/// \return YES if this tender represents a token
- (BOOL)isTokenizedCard;

/// \return YES if this tender represents a card with magstripe data
- (BOOL)hasMagStripeData;

/// \return YES if this tender represents a EMV card
- (BOOL)hasEmvData;

/// \return YES if avsField provided has a value set and is not empty
- (BOOL)hasAVSData:(ECLAVSField)avsField;

/// \brief set AVS field with value, which will be trimmed to remove extra whitespace
/// \param avsField Field to set
/// \param value Value for the Field
- (void)setAVSField:(ECLAVSField)avsField withValue:(NSString *)value;

@end

Reference

<Commerce-Opayo/ECLTenderRequirementsProtocol.h>

/// \brief Specifies the information which is required for a tender to be successfully used for a transaction
@protocol ECLTenderRequirementsProtocol <NSObject>
 
@required
 
/// \return Whether the physical presence of the card must be specified. If a card is not present then it is a card-not-present transaction
@property (readonly) BOOL requiresSpecifyingCardPresence;
 
/// \return The type of signature verification which is required
@property (readonly) ECLSignatureVerificationRequirement requiresSignatureVerification;
 
/// \return The type of voice referral verification which is required
@property (readonly) ECLVoiceReferralRequirement requiresVoiceReferral;
 
/// \return The phone number which should be used for voice referral, when applicable
@property (readonly) NSString *voiceReferralPhoneNumber;
 
 /// \ return An error, if applicable, for the last attempted signature submission
@property (readonly) NSError *lastSignatureError;
 
/// \return The error that last occurred when trying to continue the transaction after providing the voice referral authorization code
@property (readonly) NSError *lastVoiceReferralError;
 
@end

Reference

<Commerce-Opayo/ECLTidQueryDelegate.h>

/// \brief Delegate for receiving callbacks related to query TID operation.
@protocol ECLTidQueryDelegate <NSObject>

/// \brief Notification for the start of TID querying process
- (void)started;

/// \brief Notification for the end of TID querying process
/// \param success flag indicating whether the operation is successfully completed
/// \param mid the MID for which TIDs are queried
/// \param tids the list of TIDs under the MID
/// \param error the specific error if the operation did not complete successfully
- (void)completed:(BOOL)success mid:(NSString *)mid tids:(NSArray<NSString *> *)tids error:(NSError *)error;

@end

<Commerce-Opayo/ECLTmsUpdateDelegate.h>

/// \brief Delegate for receiving notifications about a TMS update.
@protocol ECLTmsUpdateDelegate <ECLGeneralOperationDelegate>
 
/// \brief Notification that multiple card readers were discovered and one needs to be selected to continue the TMS update.
/// \param availableCardReaders the available card readers
- (void)shouldSetCardReaderToUse:(NSArray<NSString *> *)availableCardReaders;
 
/// \brief Notification of the card reader selected to perform the TMS update.
/// \param selectedCardReader the name of the card reader to perform the TMS update on.
- (void)selectedCardReader:(NSString *)selectedCardReader;
 
@end

<Commerce-Opayo/ECLTransactionDefines.h>

/// \brief Tender types that can be used to pay for a transaction
typedef enum {
    ECLTenderType_Cash = 0,
    ECLTenderType_Card,
    ECLTenderType_ElectronicCheck,
    ECLTenderType_Unknown
} ECLTenderType;
 
/// \brief Transaction types
typedef enum {
    ECLTransactionType_Sale = 0,            ///< Standard Sale that can have tax, tip, discount, etc.
    ECLTransactionType_LinkedRefund,        ///< Refund that is linked to a previous sale transaction
    ECLTransactionType_StandaloneRefund,    ///< Refund that is not linked to a previous sale transaction.
    ECLTransactionType_Refund,              ///< Generic refund.  Converge doesn't provide a more specific subtype of refund.
    ECLTransactionType_Void,                ///< Void of a previous sale or refund transaction
    ECLTransactionType_PreAuth,             ///< PreAuthorization of sale transaction
    ECLTransactionType_PreAuthIncrement,    ///< Increment the transaction amount for an existing PreAuth transaction
    ECLTransactionType_PreAuthComplete,     ///< Completion of a previous preauth transaction
    ECLTransactionType_PreAuthDelete,       ///< Deletion of a previous preauth transaction
    ECLTransactionType_ForcedSale,          ///< For internal use only. Do not use when starting a transaction.  Used only when returning search results.
    ECLTransactionType_MoneyTransferOCT,    ///< Original Credit Transaction disbursement, payment method that enables direct transfers of funds to credit card users
    ECLTransactionType_OCTFunding,          ///< OCT (Original Credit Transaction) Funding, instantly fund transactions to a merchants debit account on file
    ECLTransactionType_TipAdjust,           ///< Tip adjustment post-authorization
    ECLTransactionType_BalanceInquiry,      ///< Debit balance inquiry for cardholder's checking or savings account
    ECLTransactionType_Unknown,
} ECLTransactionType;
 
/// \brief State of a transaction that will be returned after processing or in search results
typedef enum
{
    ECLTransactionState_Uncommitted = 0,
    ECLTransactionState_Committed,
    ECLTransactionState_PartiallyCommitted,
    ECLTransactionState_Void,
    ECLTransactionState_Hold,
    ECLTransactionState_UnderReview,
    ECLTransactionState_FailedDueToPostAuthRule,
    ECLTransactionState_FailedDueToPreAuthRule,
    ECLTransactionState_FailedDueToFraudPreventRule,
    ECLTransactionState_Unknown,
} ECLTransactionState;
 
/// \brief Possible supported receipt types.
typedef enum
{
    ECLReceiptType_Transaction = 0,             ///< Receipt for current transaction
    ECLReceiptType_Historical,                  ///< Receipt for specific transaction from a search result
    ECLReceiptType_HistoricalList,              ///< Receipt for full list of search result
} ECLReceiptType;
 
/// \brief Possible supported receipt output.
typedef enum
{
    ECLReceiptOutputType_Sms = 0,
    ECLReceiptOutputType_Email,
    ECLReceiptOutputType_Printer,
} ECLReceiptOutputType;
 
typedef enum {
    ECLSignatureVerification_NotRequired = 0,
    ECLSignatureVerification_Required,
} ECLSignatureVerificationRequirement;
 
typedef enum {
    ECLVoiceReferral_NotRequired = 0,
    ECLVoiceReferral_Required,
} ECLVoiceReferralRequirement;
 
typedef NS_OPTIONS(NSUInteger, ECLCardType)  {
    ECLCardType_None =      0,
    ECLCardType_Credit =    1 << 0,
    ECLCardType_Debit =     1 << 1,
};
 
typedef enum {
    ECLCardTenderScheme_Unknown = 0,
    ECLCardTenderScheme_Visa,
    ECLCardTenderScheme_MasterCard,
    ECLCardTenderScheme_Maestro,
    ECLCardTenderScheme_Amex,
    ECLCardTenderScheme_JCB,
    ECLCardTenderScheme_Diners,
    ECLCardTenderScheme_Discover,
    ECLCardTenderScheme_CarteBleue,
    ECLCardTenderScheme_CarteBlanc,
    ECLCardTenderScheme_Voyager,
    ECLCardTenderScheme_WEX,
    ECLCardTenderScheme_ChinaUnionPay,
    ECLCardTenderScheme_Style,
    ECLCardTenderScheme_Laser,
    ECLCardTenderScheme_PayPal,
    ECLCardTenderScheme_RPS,
    ECLCardTenderScheme_TorontoParkingAuthority,
    ECLCardTenderScheme_CityOfOttowa,
    ECLCardTenderScheme_DK12,
    ECLCardTenderScheme_GiftCard,
    ECLCardTenderScheme_MBNA,
    ECLCardTenderScheme_ValueLink,
    ECLCardTenderScheme_Interac
} ECLCardTenderScheme;
 
/// \brief Enum for all possible card entries
typedef NS_OPTIONS(NSUInteger, ECLCardEntryType)  {
    ECLCardEntryType_Unset                       = 0,
    ECLCardEntryType_Unknown                     = 1 << 0,
    ECLCardEntryType_Swipe                       = 1 << 1,           ///< Card was swiped using magnetic stripe
    ECLCardEntryType_MsdProximity                = 1 << 2,           ///< Card was tapped on card reader to get non-emv information
    ECLCardEntryType_ManuallyEntered             = 1 << 3,           ///< Card was manually entered on card reader
    ECLCardEntryType_EmvContact                  = 1 << 4,           ///< Card was inserted to get emv information
    ECLCardEntryType_EmvProximity                = 1 << 5,           ///< Card was tapped to get emv information
    ECLCardEntryType_Mobile                      = 1 << 6,           ///< Card was presented from a mobile application
    ECLCardEntryType_Token                       = 1 << 7,           ///< Card token was used
};
 
/// \brief Enum for Emv card entry type
typedef NS_OPTIONS(NSUInteger, ECLEmvCardEntryType)  {
    ECLEmvCardEntryType_Unset                       = 0,
    ECLEmvCardEntryType_Unknown                     = 1 << 0,
    ECLEmvCardEntryType_QuickChip                   = 1 << 1,           ///< Emv card was processed as QuickChip
};
 
/// \brief Enum for capabilities of a card reader
typedef NS_OPTIONS(NSUInteger, ECLCardReaderOption)  {
    ECLCardReaderOption_None                        = 0,
    ECLCardReaderOption_Gratuity                    = 1 << 0,       ///< Card reader supports entering gratuity
    ECLCardReaderOption_Signature                   = 1 << 1        ///< Card reader supports drawing signature
};
 
/// \brief result of a transaction
typedef enum {
    ECLTransactionResult_Unknown = 0,
    ECLTransactionResult_Approved,
    ECLTransactionResult_PartiallyApproved,
    ECLTransactionResult_SwipedSuccessfully,
    ECLTransactionResult_SecurityCodeFailure,
    ECLTransactionResult_Declined,
    ECLTransactionResult_VoiceReferral,
    ECLTransactionResult_Rejected,
    ECLTransactionResult_TemporarilyUnavailable,
    ECLTransactionResult_ExpiredCard,
    ECLTransactionResult_PreValidCard,
    ECLTransactionResult_FailedLuhnCheck,
    ECLTransactionResult_IssueNumberMissing,
    ECLTransactionResult_IssueNumberInvalid,
    ECLTransactionResult_UnknownAcquirer,
    ECLTransactionResult_AcquirerDisabled,
    ECLTransactionResult_UnknownMerchant,
    ECLTransactionResult_UnknownTerminal,
    ECLTransactionResult_MerchantDisabled,
    ECLTransactionResult_CardBlacklisted,
    ECLTransactionResult_CardBlocked,
    ECLTransactionResult_CardUsageExceededLimits,
    ECLTransactionResult_CardUsageExceededCount,
    ECLTransactionResult_CardSchemeUnknown,
    ECLTransactionResult_AmountMissing,
    ECLTransactionResult_AmountError,
    ECLTransactionResult_AmountTooSmall,
    ECLTransactionResult_AmountTooLarge,
    ECLTransactionResult_CurrencyCodeMissing,
    ECLTransactionResult_UnknownCurrencyCode,
    ECLTransactionResult_UnsupportedCurrencyCode,
    ECLTransactionResult_ApplTypeError,
    ECLTransactionResult_SystemError,
    ECLTransactionResult_IncorrectPin,
    ECLTransactionResult_InvalidCard,
    ECLTransactionResult_InvalidCAVV,
    ECLTransactionResult_InvalidRoutingNumber,
    ECLTransactionResult_InvalidServiceEntitlementNumber,
    ECLTransactionResult_MICR_ReadError,
    ECLTransactionResult_OpenBatchTooOld,
    ECLTransactionResult_SequenceError,
    ECLTransactionResult_ExceededNumberOfChecks,
    ECLTransactionResult_MaximumAmountLoadedOnCard,
    ECLTransactionResult_CardNotReloadable,
    ECLTransactionResult_TransactionNotAllowed,
    ECLTransactionResult_InvalidTransactionType,
    ECLTransactionResult_CardAlreadyActive,
    ECLTransactionResult_CardNotActive,
    ECLTransactionResult_DuplicateTransaction,
    ECLTransactionResult_InvalidBatchID,
    ECLTransactionResult_InvalidTender,
    ECLTransactionResult_InvalidData,
    ECLTransactionResult_DuplicateCheckNumber,
    ECLTransactionResult_MaximumVolumeReached,
    ECLTransactionResult_InvalidService,
    ECLTransactionResult_IssuerNeedsToBeContacted,
    ECLTransactionResult_EngineersTest,
    ECLTransactionResult_Offline_Not_Allowed,
    ECLTransactionResult_ReenterPin,
    ECLTransactionResult_DeclinedContactSupportCenter,
    ECLTransactionResult_DeclinedByCard,
    ECLTransactionResult_EMVPostAuthError,
    ECLTransactionResult_DeclinedDueToCommunicationError,
    ECLTransactionResult_AvsMismatch,
    ECLTransactionResult_ScheduledForSettlement,
    ECLTransactionResult_EmptyBatch,
    ECLTransactionResult_IssuerUnavailable,
    ECLTransactionResult_CashbackUnavailable,
    ECLTransactionResult_CashbackAmountLimitExceeded,
    ECLTransactionResult_PinEntryLimitExceeded,
    ECLTransactionResult_InvalidTransaction,
    ECLTransactionResult_InvalidSurcharge,
    ECLTransactionResult_WithdrawalLimitExceeded,
    ECLTransactionResult_RestrictedCard,
    ECLTransactionResult_DeclinedBlocked,
    ECLTransactionResult_DeclinedNonSufficientFunds,
    ECLTransactionResult_StopPayment,
    ECLTransactionResult_StopOrder,
    ECLTransactionResult_StopAllOrders,
} ECLTransactionResult;
 
/// \brief possible supported AVS fields
typedef enum{
    ECLAVS_CardholderFirstName,
    ECLAVS_CardholderLastName,
    ECLAVS_CardholderAddress,
    ECLAVS_CardholderCity,
    ECLAVS_CardholderState,
    ECLAVS_CardholderZip,
    ECLAVS_CardholderCountry,
    ECLAVS_CardholderEmail,
} ECLAVSField;
 
/// \brief mode for EMV card
typedef enum{
    ECLIccMode_None,
    ECLIccMode_ChipCard,            ///< chip was used
    ECLIccMode_FallbackToSwipe,     ///< Unable to use chip. EMV card was swiped
} ECLIccMode;
 
/// \brief Enum to tell how card holder was verified
typedef enum {
    ECLCardholderVerificationMethod_Unknown,
    ECLCardholderVerificationMethod_Failed,             ///< Failed verification
    ECLCardholderVerificationMethod_Pin,                ///< User entered PIN on card reader
    ECLCardholderVerificationMethod_Pin_And_Signature,  ///< User entered PIN and signed
    ECLCardholderVerificationMethod_Signature,          ///< User signed card reader or will sign receipt
    ECLCardholderVerificationMethod_No_CVM_Required,    ///< Not required
} ECLCardholderVerificationMethod;
 
 
typedef enum {
    ECLTrackDataFormat_Unspecified, ///< Track data used by the card reader is not specified. (Assume default format)
    ECLTrackDataFormat_Roam_Msd,    ///< Track data uses Roam's "MSD" track format
    ECLTrackDataFormat_Roam_Emv,    ///< Track data uses Roam's "EMV" track format
    ECLTrackDataFormat_Roam_Msd_Contactless, ///< Track data uses Roam's "MSD" contactless track format
    ECLTrackDataFormat_Ingenico_Rba_Track_Generic ///< Track data uses Ingenico generic
} ECLTrackDataFormat;
 
/// \brief Possible values for whether or not amount verification is required
typedef enum {
    ECLAmountVerification_NotRequired,
    ECLAmountVerification_Required,
    ECLAmountVerification_Done,
} ECLAmountVerification;
 
/// \brief Enum of card encryption formats.
typedef enum
{
    ECLCardEncryptionFormat_Unset = 0,
    ECLCardEncryptionFormat_Unknown,
    ECLCardEncryptionFormat_None,
    ECLCardEncryptionFormat_IngenicoGenericTdes,
    ECLCardEncryptionFormat_RoamGenericTdes,
} ECLCardEncryptionFormat;
 
typedef enum
{
    ECLCardReaderPinEntryCapability_Unset = 0,
    ECLCardReaderPinEntryCapability_Unknown,
    ECLCardReaderPinEntryCapability_Pin_Capable,
    ECLCardReaderPinEntryCapability_Pin_Incapable,
    ECLCardReaderPinEntryCapability_Pin_Capable_Mpos,
    ECLCardReaderPinEntryCapability_Pin_Pad_Not_Functional,
} ECLCardReaderPinEntryCapability;
 
typedef enum
{
    ECLMposAcceptanceDevice_Unset = 0,
    ECLMposAcceptanceDevice_Non_Mpos,
    ECLMposAcceptanceDevice_Mpos_With_Dongle,
    ECLMposAcceptanceDevice_Mpos_Standalone,
} ECLMposAcceptanceDevice;
 
@interface ECLTransactionDefines : NSObject
 
+ (BOOL)transactionResultIsApproved:(ECLTransactionResult)result;
+ (BOOL)transactionTypeIsRefund:(ECLTransactionType)type;
+ (BOOL)transactionTypeIsSale:(ECLTransactionType)type;
+ (BOOL)transactionTypeIsSaleOrPreAuth:(ECLTransactionType)type;
+ (BOOL)transactionTypeIsPreAuthBased:(ECLTransactionType)type;
+ (BOOL)transactionTypeIsPreAuthUpdate:(ECLTransactionType)type;
+ (BOOL)transactionStateIsCommitted:(ECLTransactionState)state;
 
@end
 
#endif

<Commerce-Opayo/ECLTransactionErrorCode.h>

#define ERROR_DOMAIN_COMMERCE       @"com.elavon.grove.commerce"
 
/// \brief Commerce error codes.
/// Best way to know what your error is for is to log 'error.debugDescription' as it will contain a description of the error as well description for nested errors
typedef enum
{
    ECLNone = 0,
     
    ECLTransactionDeclined = 5000,              ///< Transaction was declined
    ECLTransactionNotCommitted,                 ///< Transaction was not committed on server
    ECLTransactionNotApproved,                  ///< Transaction was declined
    ECLTransactionVoid,                         ///< Transaction was voided or had a hold put on it
    ECLTransactionCanceled,                     ///< Action was canceled due to a cancel request
    ECLTransactionUnsupportedTender,            ///< Tried to use tender type that is not supported
    ECLTransactionUnimplemented,                ///< Commerce failed to implement something. Will never happen in release.
    ECLTransactionUnavailable,                  ///< Tried to cancel or continue a transaction that is not in a state where that is possible
    ECLTransactionPropertyFailure,              ///< Not used for converge
    ECLTransactionFailure,                      ///< General error occurred. Check log.
    ECLTransactionUnsupportedTransactionType,   ///< Tried to use transaction type that is not supported
    ECLTransactionTokenGenerationFailure,       ///< Server was unable to generate token
    ECLTransactionStoreTokenFailure,            ///< Server was unable to store token for use in Card Manager in Converge web site
    ECLTransactionInvalidToken,                 ///< Invalid token was used for token transaction
    ECLTransactionSignatureRejected,            ///< Not used for converge
    ECLTransactionVoiceReferralRejected,        ///< Not used for converge
    ECLTransactionReceiptFailure,               ///< Not used for converge
    ECLTransactionReceiptNotSent,               ///< Unable to send request to Converge to email receipt
    ECLTransactionResponseWrongRecipient,       ///< Response from server was incorrectly processed
    ECLTransactionRequestBad,                   ///< Unable to send request to server
    ECLTransactionInsufficientCash,             ///< Not used for converge
    ECLTransactionUnsupportedCash,              ///< Cash transaction is not supported
    ECLTransactionSearchCanceled,               ///< Transaction search was canceled
    ECLTransactionSearchResponseBad,            ///< Not used
    ECLTransactionSearchResponseWrongRecipient, ///< Response from server was incorrectly processed by search handler
    ECLTransactionSearchRequestBad,             ///< Converge server returned that our search request contained invalid criteria. Use 'error.debugDescription' to see more
    ECLTransactionSearchFailure,                ///< General search error occurred. Check log.
    ECLTransactionAlreadyCompleted,             ///< Tried to use cancel, process, or continue a transaction that was already completed
    ECLTransactionAlreadyStarted,               ///< Tried to call processTransaction on a transaction that was already started
    ECLTransactionOtherTransactionBeingProcessed,   ///< Commerce can only process one transaction at a time and one is in progress
    ECLTransactionNoneInProgress,               ///< Tried to do something to a transction but none were in progress
    ECLTransactionBluetoothOff,                 ///< Not used for converge
    ECLTransactionValidationFail,               ///< Validation failed. Use 'error.debugDescription' to see more. Nested errors will contain reason.
    ECLTransactionValidationCardNumberTooLong,  ///< Not used
    ECLTransactionValidationSecurityCodeTooLong,///< Not used
    ECLTransactionValidationSignatureSmall,     ///< Signature does not have minimum width and/or height
    ECLTransactionValidationUnsupportedTransaction,///< Not used for converge
    ECLTransactionValidationWrongCurrency,      ///< Currency for tender does not match what the account can process
    ECLTransactionValidationStartDateAfterEnd,  ///< Transaction search criteria start date is after end date
    ECLTransactionValidationDateRangeTooWide,   ///< Transaction search criteria difference between start date and end date exceeds maximum
    ECLTransactionValidationLastFourWrongLength,///< Transaction search criteria last four digits is not 4 digits long
    ECLTransactionValidationFirstSixWrongLength,///< Transaction search criteria first six digits is not 6 digits long
    ECLTransactionValidationHasTransactionId,   ///< Transaction search criteria has a transaction ID and last 4, first 6, or card nunmber also set.
    ECLTransactionValidationRequiresTransactionDate,///< Transaction search criteria has a transaction ID but not transaction date
    ECLTransactionValidationHasCardNumber,      ///< Not used
    ECLTransactionValidationMissingAmount,      ///< Not used
    ECLTransactionSignatureMissing,             ///< Not used for converge
    ECLTransactionSignatureNotVerified,         ///< Not used for converge
    ECLTransactionValidationVoiceReferralTooLong,///< Not used for converge
    ECLTransactionValidationVoiceReferralTooShort,///< Not used for converge
    ECLTransactionValidationVoiceReferralWrongCharacters,///< Not used for converge
    ECLTransactionValidationRequired,           ///< Transaction search criteria missing at least one required property
    ECLTransactionValidationNotAvailable,       ///< Transaction search criteria contains property that is not available
    ECLTransactionReceiptValidationNoPhoneNumber,///< Trying to SMS receipt with no phone number. Not used for Converge
    ECLTransactionReceiptValidationNoEmailAddress,///< Trying to email receipt with no email address
    ECLTransactionReceiptValidationNoPrinterName,///< Not used
    ECLTransactionReceiptValidationUnsupportedOutputType,///< Trying to use ::ECLReceiptOutputType that is not supported
    ECLTransactionUnsupportedCurrency,          ///< Server returned that the currency is not supported for account or terminal
    ECLTransactionAmountInvalid,                ///< Server return that the amount was invalid, refund amount too much, or cash back amount was invalid. Use 'error.debugDescription' to see exact reason
    ECLTransactionAmountDoesNotApply,           ///< Not used
    ECLTransactionAmountNotConfirmed,           ///< Not used
    ECLTransactionTaxAmountExceedsBaseAmount,   ///< Tried to send base amount as tax inclusive, but tax amount exceeded base amount
    ECLTransactionEmvApplicationBlocked,        ///< Not used
    ECLTransactionEmvApplicationFailed,         ///< Not used
    ECLTransactionClientNeedsUpdate,            ///< Not used
    ECLTransactionInProgress,                   ///< Tried to use transaction in card reader state machine and one was already in progress
    ECLTransactionIncorrectContinuation,        ///< Card reader state machine received information that is not correct for state
    ECLTransactionFormTypeNotSupported,         ///< Not used
    ECLTransactionLoginBusy,                    ///< Not used for converge
    ECLTransactionReversalFailed,               ///< Reversal was needed for EMV transaction but commerce failed to reverse it.
    ECLTransactionOfflineNotSupported,          ///< Commerce does not support offlime authorization
    ECLTransactionCardRemoved,                  ///< EMV Card was removed in middle of transaction
    ECLTransactionCardNeedsRemoval,             ///< EMV Card needs to be removed
    ECLTransactionCardNotSupported,             ///< Card used is not supported
    ECLTransactionCardApplicationBlocked,       ///< EMV card application is blocked
    ECLTransactionCardApplicationExpired,       ///< EMV card application is expired
    ECLTransactionCardholderVerificationFailed, ///< Card holder verification failed
    ECLTransactionCardholderVerificationNotSpecified,///< No card holder verification. Unable to continue
    ECLTransactionInvalidCredentials,           ///< Server returned that credentials are invalid.
    ECLTransactionWrongRecipient,               ///< Not used for converge
    ECLTransactionResponseBad,                  ///< Server returned data we are unable to parse. Log 'error.debugDescription' to see more info
    ECLTransactionInvalidTransactionRequest,    ///< Server returned that our request contains invalid data. Log 'error.debugDescription' to see more info
    ECLTransactionInvalidTransactionForAccount, ///< Server returned that account or terminal is not configured for this transaction.
    ECLTransactionSignatureServerRejected,      ///< Server returned that signature was too large, already had signature, or not allowed for account's market segment. See nested error for specific error. Log 'error.debugDescription' to see more info
    ECLTransactionUninitializedDefaultCurrencyCode,///< Not used for converge
    ECLTransactionCardReaderNoneAvailable,      ///< Commerce is unable to find a card reader to use. Make sure reader is paired and connected.
    ECLTransactionCardReaderMultipleAvailable,  ///< Not used for converge
    ECLTransactionFailedDueToRule,              ///< Transaction state on server shows it failed to settle due to a fraud, pre-auth, or post-auth rule. See nested error for specific error. Log 'error.debugDescription' to see more info
    ECLTransactionEmailInvalid,                 ///< Not used for converge
    ECLTransactionEmailNotConfigured,           ///< Server returned that the account or terminal is not configured to send email receipts
    ECLTransactionSignatureCancelled,           ///< When commerce requested a signature, it was canceled
    ECLTransactionTipNotAllowedForAccount,      ///< Server returned market segment for account does not allow gratuity
    ECLTransactionInvalidCardNumber,            ///< Server returned card number provided is invalid
    ECLTransactionInvalidExpiry,                ///< Server returned expiration date for card is invalid.
    ECLTransactionMissingCvv2,                  ///< Server returned cvv2 is missing
    ECLTransactionInvalidCvv2,                  ///< Server returned cvv2 provided is invalid
    ECLTransactionInvalidCardPresentIndicator,  ///< Server returned that the card present indicator sent is invalid
    ECLTransactionDescriptionLimitExceeded,     ///< Server returned that the description (note) provided is too long
    ECLTransactionAvsZipCharLimitExceeded,      ///< Server returned that the AVS Zip provided is too long
    ECLTransactionAvsAddressCharLimitExceeded,  ///< Server returned that the AVS Address provided is too long
    ECLTransactionRequiresPin,                  ///< Server returned that a PIN is required for this card
    ECLTransactionSessionKeyRetrievalFailed,    ///< Failed to retrieve session keys (e.g., PIN and MAC) from server
    ECLTransactionPartiallyApprovedNotSupportedForEmvProximity, ///< Partial approvals are not supported for EMV proximity card entry type (use an alternate entry type such as EMV contact)
    ECLTransactionNotRefundable,                ///< Transaction is not refundable
    ECLTransactionRefundExceedsAmountAllowed,   ///< Transaction is not refundable because the amount being refunded exceeds the limit,
    ECLTransactionMoneyTransferOctNotSupported, ///< Transaction type of ECLTransactionType_MoneyTransferOCT is not supported under the operating account
    ECLTransactionOctRefNumberNotSet, ///< OCT reference number is either null or empty for a ECLTransactionType_MoneyTransferOCT transaction
    ECLTransactionOctRefNumberTooLong, ///< OCT reference number is over 16 bytes for a ECLTransactionType_MoneyTransferOCT transaction
    ECLTransactionOctCardNotEligible, ///< The card used in Money Transfer OCT is not eligible for this type of transaction
    ECLTransactionInvalidLaneNumber, ///< The lane number provided is invalid. Provide an 8-digit number for the lane number.
    ECLTransactionMerchantReferenceIdCharLimitExceeded, ///< Server returned merchant reference ID too long
    ECLTransactionPreAuthNotSupportedForServiceFeeEnabledTerminal, ///< Pre-auth transaction is not supported for service fee enabled terminal
    ECLTransactionForceSaleNotSupportedForServiceFeeEnabledTerminal, ///< Forced sale transaction is not supported for service fee enabled terminal
    ECLTransactionInvalidTransactionId, ///< A transaction ID was required for this transaction but was not provided or was invalid.
    ECLTransactionInvalidHealthcareAmountCalculation, ///< Total healthcare amount did not match the individual healthcare amounts provided.
    ECLTransactionInvalidTotalAmountForHealthcare, ///< Total transaction amount did not cover the healthcare amounts provided.
    ECLTransactionOctFundingNotSupported, ///< Transaction type of ECLTransactionType_OCTFunding is not supported under the operating account.
    ECLTransactionReceiptNotSupportedForOctFunding, ///< Receipt is not supported for OCT Funding.
     
    ECLPrinterOffline = 6000,                   ///< Unable to print due to printer being offline
    ECLPrinterCoverOpen,                        ///< Unable to print due to cover being open
    ECLPrinterPaperEmpty,                       ///< Unable to print due to no paper being available
    ECLPrinterUnableToOpenPort,                 ///< Unable to print due because Commerce cannot open port to printer
    ECLPrinterPortTimeOut,                      ///< Unable to print due because Commerce timed out opening port to printer
    ECLPrinterCommunicationFailure,             ///< Unable to print due because Commerce had communication problem with printer
    ECLPrinterBadFormatting,                    ///< Not used
 
    ECLCardReaderNotConnected = 7000,           ///< Card reader is not connected
    ECLCardReaderMustFind,                      ///< Not used
    ECLCardReaderCannotConfigure,               ///< Not used for converge
    ECLCardReaderCannotConnect,                 ///< Unable to connect to card reader
    ECLCardReaderConnectTimeout,                ///< Timed out connecting to card reader
    ECLCardReaderCannotSelect,                  ///< Not used for converge
    ECLCardReaderCommunicationProblem,          ///< Error communicating with card reader
    ECLCardReaderNoneSelected,                  ///< Not used
    ECLCardReaderRebootRequired,                ///< Card reader needs to be rebooted. Commerce was unable to automatically reboot it.
    ECLCardReaderRebootAutomatic,               ///< Card reader is automatically being rebooted and unable to continue transaction
    ECLCardReaderUnavailable,                   ///< Card reader is locked
    ECLCardReaderFailedToReadCard,              ///< Bad read of card on card reader
    ECLCardReaderAudioVolumeTooLow,             ///< Not used
    ECLCardReaderError,                         ///< General card reader error
    ECLCardReaderNotInitialized,                ///< Card reader has not initialized
    ECLCardReaderCannotInitialize,              ///< Not used
    ECLCardReaderDisconnecting,                 ///< Card reader disconnecting so unable to continue
    ECLCardReaderDisconnected,                  ///< Card reader disconnected so unable to continue
    ECLCardReaderUpdating,                      ///< Card reader updating so unable to continue
    ECLCardReaderUpdatingKeys,                  ///< Card reader updating keys so unable to continue
    ECLCardReaderNoCard,                        ///< Not used
    ECLCardReaderTerminated,                    ///< Not used
    ECLCardReaderNeedsUpdate,                   ///< Card reader does not meet minimum application version requirement
    ECLCardReaderEncryptionFailure,             ///< Card reader encryption failed
    ECLCardReaderCanceled,                      ///< On card reader, user pushed cancel or ui timed out
    ECLCardReaderInvalidPrompt,                 ///< Tried to display invalid form or prompt on card reader
    ECLCardReaderNoSignatureData,               ///< Not used
    ECLCardReaderSignatureError,                ///< Not used
    ECLCardReaderNotPaired,                     ///< Card reader not paired
    ECLCardReaderPinAccountMismatch,            ///< Account number mismatch for PIN on card reader
    ECLCardReaderPinNoAccount,                  ///< No cccount number provided for PIN on card reader
    ECLCardReaderPinInvalidKeyIndex,            ///< Invalid key index on card reader
    ECLCardReaderPinTooShort,                   ///< Too short PIN provided on card reader
    ECLCardReaderPinRequestDeclined,            ///< PIN request declined on card reader
    ECLCardReaderIsResetting,                   ///< Card reader is resetting so unable to continue
    ECLCardReaderInvalidMessage,                ///< Not used
    ECLCardReaderFormTypeNotSupported,          ///< Not used
    ECLCardReaderFormDeclined,                  ///< Not used
    ECLCardReaderFormError,                     ///< Not used
    ECLCardReaderAmountVerificationError,       ///< Not used
    ECLCardReaderAmountTooLarge,                ///< Transaction amount is too large for card reader (> 999999999L)
    ECLCardReaderAmountTooSmall,                ///< Not used
    ECLCardReaderInvalidConfigurationForUpdatingKeys, ///< Update keys data provided is invalid
    ECLCardReaderKeysUpdateNotProvided,         ///< Update keys data provided but there are no keys in data
    ECLCardReaderTimeout,                       ///< Card Reader timed out
    ECLCardReaderCannotAcceptCards,             ///< No entry modes are enabled on card reader
    ECLCardReaderCardDataInvalid,               ///< Card data provided is invalid (and maybe fallback is not allowed)
    ECLCardReaderUnsupportedFeature,            ///< An unsupported feature was tried for the card reader
    ECLCardReaderUnsupportedCardEntryType,      ///< An unsupported card entry mode was selected for card reader
    ECLCardReaderOperationInProgress,           ///< On Demand card reader operation is currently in progress
    ECLCardReaderSearchInProgress,              ///< findDevices was called when a search was already in progress
    ECLCardReaderConfigurationUpdateFailed,     ///< Error writing update to card reader
    ECLCardReaderMaxCardReadsExceeded,          ///< Maximum number of reads for this transaction tried
    ECLCardReaderEmvKeyNotFound,                ///< The EMV key for the application/card was not found on reader
    ECLCardReaderBatteryLow,                    ///< The card reader battery is too low to perform the operation
    ECLCardReaderMacValueCalculationFailed,     ///< MAC Value calculation failed (general error) on the card reader
    ECLCardReaderMacValueSecurityAppError,      ///< MAC Value calculation failed (security app error) on the card reader
    ECLCardReaderMacValueVerificationFailed,    ///< MAC Value calculation failed (general error) on the card reader
    ECLCardReaderMacSessionKeyNotLoaded,        ///< MAC Value calculation/verification failed (session key not loaded) on the card reader
    ECLCardReaderMacSessionKeyLengthInvalid,    ///< MAC Value calculation/verification failed (invalid session key length) on the card reader
    ECLCardReaderOriginalMacValueNotInvalid,    ///< Original MAC value for verification has invalid length
    ECLCardReaderUpdatingLanguageFailed,        ///< Card reader updating language so unable to continue
    ECLCardReaderCardFloorLimitExceeded,        ///< Base transaction amount exceeds amount allowed for the card
    ECLCardReaderCardProximityFloorLimitExceeded, ///< Base transaction amount exceeds amount allowed for the proximity/contactless card
    ECLCardReaderDisconnectApplicationInBackground,///< card reader disconnected because application in background
    ECLCardReaderRefreshStatusNotAllowed,       ///< OnDemand function Refresh Status for card reader is not allowed at the moment
    ECLCardReaderNoCardReadInProgress,          ///< No card read in progress on the card reader
    ECLCardReaderCancelCardReadFailed,          ///< Operation of cancelling ongoing card read failed
    ECLCardReaderDailyRebootTimeInvalid,        ///< Request to change V4 card reader daily reboot time failed because specified time is not between 0000 and 2359
    ECLCardReaderDailyRebootTimeNotSupportedForDevice, ///< Request to change V4 card reader reboot time failed because the device does not support it
    ECLCardReaderModelNotSupported,             ///< Card reader model is not supported
    ECLCardReaderRequireCertificateInfoUpdate,  ///< Card reader requires certificate info (key store and password) update
    ECLCardReaderDateUpateFailure,              ///< Failed to update date on card reader
 
    WebMisError_Failed = 8000,                  ///< Not used for converge
    WebMisError_Busy,                           ///< Not used for converge
    WebMisError_CouldNotCommunicate,            ///< Not used for converge
    WebMisError_ServerFailure,                  ///< Not used for converge
    WebMisError_NoResponseData,                 ///< Not used for converge
    WebMisError_UnknownResponse,                ///< Not used for converge
    WebMisError_LogOnRequired,                  ///< Not used for converge
    WebMisError_LogOnFailed,                    ///< Not used for converge
    WebMisError_LogOnDisabled,                  ///< Not used for converge
    WebMisError_LogOnLockedOut,                 ///< Not used for converge
    WebMisError_CommunicationTimeout,           ///< Not used for converge
    WebMisError_BadRequest,                     ///< Not used for converge
    WebMisError_InvalidLocale,                  ///< Not used for converge
    WebMisError_Cancelled,                      ///< Not used for converge
    WebMisError_ForgotPasswordUnknownError,     ///< Not used for converge
    WebMisError_InvalidEmailAddress,            ///< Not used for converge
    WebMisError_InvalidPassword,                ///< Not used for converge
    WebMisError_InvalidCurrentPassword,         ///< Not used for converge
    WebMisError_InvalidNewPasswordsDoNotMatch,  ///< Not used for converge
    WebMisError_InvalidNewPasswordNotComplex,   ///< Not used for converge
    WebMisError_InvalidNewPasswordPreviouslyUsed,///< Not used for converge
 
    ECLAccountValidationCanceled =  9000,       ///< Not used
    ECLDeviceRooted,                            ///< Not used for converge
    ECLMerchantRetrievalNotSent,                ///< Commerce failed to send request to server for account information retrieval
    ECLIllegalArgument,                         ///< Most likely a nil value was passed where not allowed. See logging.
    ECLUnableToInitialize,                      ///< Not used
    ECLTransportCommunicationFailure,           ///< Communication issue on server
    ECLSignatureTransactionFailed,              ///< Failed to send signature for transaction to server. May want to print receipt for customer to sign.
    ECLUnsupportedSignatureFormat,              ///< Server returned that the signature format is not supported.
    ECLNoAccount,                               ///< Tried to create an account with invalid type or passed nil for an account parameter
    ECLAccountInvalidCredentials,                    ///< Failed to provide merchant, pin, and/or userid for account
    ECLAccountInvalidVendorFields,                     ///< Failed to provide vendorId, vendorAppName, and/or vendorAppVersion
    ECLRequestCanceled,                         ///< Not used for converge
    ECLCannotVerifyPasswordExpiration,          ///< Not used for converge
    ECLUnsecure,                                ///< Device failed our security test
    ECLCommerceNotInitialized,                  ///< ECLCommerce::initialize has not been called
    ECLStringTablesNotFound,                    ///< No longer used
    ECLSensitiveDataLibraryNotInitialized,      ///< Unable to find/initialize encryption library
    ECLAccountRetrievalInProgress,              ///< Could not initiate request for account information while already in-progress
    ECLTransactionValidationItemQuantityMaxDecimalPlacesExceeded,  ///< decimal places for item count are more than 4 places which is max for Converge.
    ECLOperationNotAllowedUnsecuredChannel,     ///< Operation not allowed over unsecured channel
     
    // TODO :: asked for better error descriptions from Converge for following errors.
    ECLCatalogError,                            ///< Product Catalog error
    ECLCatalogProductError,                     ///< Product error
    ECLCatalogProductExists,                    ///< Product already exists in catalog
    ECLCatalogProductMissingField,              ///< missing required field for product catalog management
    ECLCatalogProductFieldExceedsMaxLength,     ///< catalog product field value exceeds max length
    ECLCatalogNotNumericError,                  ///< catalog value not numeric
    ECLCatalogProductNotFound,                  ///< no matching product found for the catalog
    ECLCatalogMinValueError,                    ///< min value error
     
    // ECLConnectionCriteria - Errors used to describe why the ECLConnectionConfiguration instance could not set the given search criteria
    ECLConnectionCriteriaInvalid,                                    ///< Generic error for invalid connection criteria, previous or default criteria will be used
    ECLConnectionCriteriaEmptyDeviceProviderTypes,                   ///< {@link ECLDeviceProviderType} set was empty
    ECLConnectionCriteriaEmptyConnectionTypes,                       ///< {@link ECLConnectionType} set was empty
    ECLConnectionCriteriaEmptyDeviceTypes,                           ///< {@link ECLDeviceType} set was empty
    ECLConnectionCriteriaInvalidConnectionTypesForProviderTypes,     ///< Enabled connection types not compatible with enabled provider types
    ECLConnectionCriteriaInvalidDeviceTypesForProviderTypes,         ///< Enabled device types not compatible with enabled provider types
    ECLConnectionCriteriaInvalidInetAddress,                         ///< InetAddress is invalid
    ECLSystemUnavailable,                                            ///<Converge system is not available to process request
     
     
    // Begin Opayo Errors
    ECLTmsUpdateFailure = 10000,        ///< Opayo TMS Update failed
    ECLPinUpdateFailure,                ///< Failed to update the pin
    // End Opayo Errors
     
} ECLTransactionErrorCode;

<Commerce-Opayo/ECLTransactionOutcome.h>

/// \brief Provides information about the outcome of a transaction. Base class for ECLCardTransactionOutcome.
@interface ECLTransactionOutcome : NSObject

/// \brief The result of the transaction
@property (readonly) ECLTransactionResult result;

/// \brief An unique identifier of the transaction
@property (readonly) NSString *identifier;

/// \brief The date and time which the server recorded for the transaction
@property (readonly) NSDate *dateTime;

/// \brief Specifies if the transaction was approved
@property (readonly)BOOL isApproved;

/// \brief Error that occured during completion of the transaction or nil if no error
@property (readonly) NSError *error;

/// \brief Error occurred sending the signature to the server or nil if no error. Transaction can still be approved even with signature error.
/// Merchant can print receipt to get signature if signatureError is not nil.
@property (readonly) NSError *signatureError;

/// \brief Indicates whether or not the transaction succeeded
/// For base transaction, this just returns error if transaction was not approved.
/// \return An NSError that indicates the reason for a failure or nil.
- (NSError *)successful;

/// \brief Used internally. Not for external use.
@property (readonly, getter=updateRequired)BOOL isUpdateRequired;

/// \brief Specifies if a signature was needed for this transaction
@property (readonly)BOOL signatureNeeded;

/// \brief Indicates that an attempt to send the signature was performed.
/// Check the signatureError to determine whether or not the signature was actually successfully sent
@property (readonly)BOOL signatureSent;

/// \brief Tender type used for the transaction
@property (readonly)ECLTenderType tenderType;

/// \brief Amount authorized for this transaction. In the case where partial approvals has been allowed, this amount may be less than the requested amount. In the case where an extra charge is applied (credit surcharge, service fee, etc.), this amount will include that extra charge.
@property (readonly)ECLMoney *amountAuthorized;

/// \brief Merchant reference id set in the transaction request
@property (readonly)NSString *merchantReferenceId;

/// \brief Note/Description set in the transaction request
@property (readonly)NSString *note;

/// \brief Note/Description set in the transaction request
@property (readonly)NSString *transactionDescription;

@end

References

<Commerce-Opayo/ECLTransactionProcessingDelegate.h>

/// \brief Protocol to give notifications about processing of a transaction.
@protocol ECLTransactionProcessingDelegate<NSObject>
 
@required
 
/// \brief Notification that the transaction has completed.
///
/// 'outcome.error' will be non-nill if an error took place. You can then look at the 'outcome.isApproved' to see if the transaction was approved.
///
/// \param transaction The transaction which completed
/// \param tender The tender which was used for the transaction
/// \param outcome The details of the successful transaction. Can be ECLEmvCardTransactionOutcome, ECLCardTransactionOutcome, or ECLTransactionOutcome instance depending on the type of tender and transaction. Can be ECLOctFundingTransactionOutcome if this was an OCT Funding transaction.
- (void)transactionDidComplete:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender outcome:(ECLTransactionOutcome *)outcome;
 
/// \brief Notification that the transaction has been cancelled
///
/// This might happen as a result of a call to -[ECLTransactionProtocol total] or, depending on the type of card reader being utilized, this also can happen if the user canceled the transaction on the reader.
/// \param transaction The transaction which was cancelled
/// \param tender The tender which was used for the transaction
- (void)transactionDidCancel:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender;
 
/// \brief Notification that the transaction has failed
/// \param transaction The transaction which failed
/// \param tender The tender which was used for the transaction
/// \param arrayOfNSErrors An array of NSError instances which indicate the reason(s) for the failure
- (void)transactionDidFail:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender errors:(NSArray *)arrayOfNSErrors;
 
/// \brief Notification that the type of transaction or tender requires more information to complete the transaction.  The required information is specified in the transactionRequires and tenderRequires parameters.
///
/// The transaction will remain in limbo until the required information has been provided by calling -[ECLTransactionProcessorProtocol continueProcessingTransaction:using:delegate:] or it is canceled by using -[ECLTransactionProcessorProtocol cancelTransaction:]
/// \param transaction The transaction which failed
/// \param tender The tender which was used for the transaction
/// \param transactionRequires Specifies which information, if any, the transaction requires to continue processing
/// \param tenderRequires Specifies which information, if any, the tender type requires to continue processing
- (void)shouldProvideInformation:(id<ECLTransactionProtocol>)transaction tender:(id<ECLTenderProtocol>)tender transactionRequires:(id<ECLTransactionRequirementsProtocol>)transactionRequires tenderRequires:(id<ECLTenderRequirementsProtocol>)tenderRequires;
 
/// \brief Notification that a card reader has not been specified for use and multiple card readers are available for selection.
///
/// Before the transaction can continue the following should happen:  one of the card readers should be selected by calling -[ECLDevicesProtocol selectDevice:] and then the transaction should be continued by calling -[ECLTransactionProcessorProtocol continueProcessingTransaction:using:delegate:].
 
/// \param transaction The transaction which is processing
/// \param tender The tender which is being used
/// \param cardReadersReadyForUse The list of card readers available. These might be used to populate the UI to allow the user to choose which reader should be used.  One of these readers should be passed to -[ECLDevicesProtocol selectDevice:] before continuing the transaction.
- (void)shouldSetCardReaderToUse:(id<ECLTransactionProtocol>)transaction tender:(id<ECLTenderProtocol>)tender cardReaders:(NSArray *)cardReadersReadyForUse;
 
@optional
 
/// \brief Notification that the current state of the transaction has changed
/// \param progress Indicates the current state of the transaction
/// \param transaction The transaction which is processing
/// \param tender The tender which is being used
- (void)transactionProgress:(ECLTransactionProgress)progress transaction:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender;
 
@end

References

<Commerce-Opayo/ECLTransactionProcessorProtocol.h>

/// \brief Provides access to create and process tenders and transactions.
///
/// Also provides what tender types and transaction types are supported.
@protocol ECLTransactionProcessorProtocol <NSObject>

@required

/// \brief Specifies which types of tender are supported.
///
/// \code for (NSNumber *tenderTypeNum in [transactionProcessor supportedTenders]) {
///     ECLTenderType tenderType = (ECLTenderType)[tenderTypeNum intValue];
///     .
///     .
/// } \endcode
/// \return An array of NSNumber, each with int of ::ECLTenderType.
- (NSArray *)supportedTenders;

/// \brief Specifies which types of tender are supported for transaction type.
///
/// \code for (NSNumber *tenderTypeNum in [transactionProcessor supportedTendersForTransaction:ECLTransactionType_Sale]) {
///     ECLTenderType tenderType = (ECLTenderType)[tenderTypeNum intValue];
///     .
///     .
/// } \endcode
/// \param transactionType ::ECLTransactionType that you want supported tender types for.
/// \return An array of NSNumber, each with int of ::ECLTenderType
- (NSArray *)supportedTendersForTransaction:(ECLTransactionType)transactionType;

/// \brief Specifies which types of transactions are supported.
///
/// \code for (NSNumber *transactionTypeNum in [transactionProcessor supportedTransactions]) {
///     ECLTransactionType transactionType = (ECLTransactionType)[transactionTypeNum intValue];
///     .
///     .
/// } \endcode
/// \return An array of NSNumber, each with int of ::ECLTransactionType
- (NSArray *)supportedTransactions;

/// \brief Specifies which types of cards (::ECLCardType) are supported for transaction type
/// \param transactionType ::ECLTransactionType that you want supported card types for.
///
/// \code ECLCardType cardTypes = [transactionProcessor supportedCardTypesForCardTransaction:ECLTransactionType_Sale]);
/// if ((cardType & ECLCardType_Credit) != 0) {
/// }
/// if ((cardType & ECLCardType_Debit) != 0) {
/// } \endcode
/// \return a NS_OPTIONS so ::ECLCardType are OR'ed together
- (ECLCardType)supportedCardTypesForCardTransaction:(ECLTransactionType)transactionType;

/// \brief Specifies which types of card entries (::ECLCardEntryType) are supported for transaction type.
/// \param transactionType ::ECLTransactionType that you want supported card entry types for.
///
/// \code ECLCardEntryType cardEntryTypes = [transactionProcessor supportedCardEntryTypesForCardTransaction:ECLTransactionType_Sale]);
/// if ((cardEntryTypes & ECLCardEntryType_Swipe) != 0) {
/// } \endcode
/// \return a NS_OPTIONS so ::ECLCardType are OR'ed together
- (ECLCardEntryType)supportedCardEntryTypesForCardTransaction:(ECLTransactionType)transactionType;

/// \brief Create a cash tender instance
///
/// To be used to process a transaction using cash.
/// \return ECLCashTenderProtocol The tender instance
- (id<ECLCashTenderProtocol>)createCashTender;

/// \brief Create a card tender instance
///
/// To be used to process a transaction using card.
/// \return ECLCardTenderProtocol The tender instance
- (id<ECLCardTenderProtocol>)createCardTender;

/// \brief Create a sale transaction if transaction processor supports this (see supportedTransactions).
///
/// Other properties can be set via the returned instance.
/// \param subtotal The subtotal amount for the transaction.
/// \return ECLCurrencyTransactionProtocol the instance
- (id<ECLCurrencyTransactionProtocol>)createSaleTransactionWithSubtotal:(ECLMoney *)subtotal;

/// \brief Create a linked refund transaction if transaction processor supports this (see supportedTransactions)
///
/// Other properties can be set via the returned instance.
/// \param total The total amount of the transaction being refunded.
/// \param transactionID ID of transaction to be refunded
/// \return ECLCurrencyTransactionProtocol the instance
- (id<ECLLinkedRefundTransactionProtocol>)createLinkedRefundTransactionWithTotal:(ECLMoney *)total transactionID:(NSString *)transactionID;

/// \brief Create a standalone refund transaction if transaction processor supports this (see supportedTransactions)
///
/// Other properties can be set via the returned instance.
/// \param total The total amount to refund.
/// \return ECLCurrencyTransactionProtocol the instance
- (id<ECLStandaloneRefundTransactionProtocol>)createStandaloneRefundTransactionWithTotal:(ECLMoney *)total;

/// \brief Begin processing a transaction
/// \param transaction The transaction to process
/// \param tender The tender to use to complete transaction
/// \param delegate The delegate with which to receive updates on the state and progress of the transaction
- (void)processTransaction:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender delegate:(id<ECLTransactionProcessingDelegate>)delegate;

/// \brief Continue processing a transaction which had previously required more information to continue.
/// \param transaction The transaction to continue processing
/// \param tender The tender to use
/// \param delegate The delegate with which to receive updates on the state and progress of the transaction
- (void)continueProcessingTransaction:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender delegate:(id<ECLTransactionProcessingDelegate>)delegate;

@end

References

<Commerce-Opayo/ECLTransactionProgress.h>

/// \brief Progress of current transaction
typedef enum
{
    ECLTransactionProgressStarting = 1,                      ///< Indicates the transaction has started.
    ECLTransactionProgressUndefined,                         ///< Indicates that the transaction is in-progress but its exact state is not known.  In practice this should not occur
    ECLTransactionProgressOnlineAuthorisation,               ///< Indicates the transaction is going online for authorisation.
    ECLTransactionProgressCardEntryPrompted,                 ///< Indicates card entry has been prompted on the card reader.
    ECLTransactionProgressBadCardEntryPrompted,              ///< Indicates card entry has been prompted on the card reader after unreadable/unusable card
    ECLTransactionProgressCardReadError,                     ///< Indicates that the card could not be read (if card source could not be determined)
    ECLTransactionProgressCardInsertError,                   ///< Indicates error occurred when inserting card
    ECLTransactionProgressSmartcardRemovePrompted,           ///< Indicates card removal has been prompted on the card reader.
    ECLTransactionProgressSmartcardRemoved,                  ///< Indicates the card has been removed from the card reader.
    ECLTransactionProgressSmartcardProcessing,               ///< Indicates that we are currently processing an EMV card
    ECLTransactionProgressSmartcardProcessingOnline,         ///< Indicates that the EMV request is being processed by the server and we are waiting on response
    ECLTransactionProgressSmartcardReversing,                ///< Indicates that a reversal is occurring
    ECLTransactionProgressCardEntryBypassed,                 ///< Indicates card entry on the card reader has been bypassed.
    ECLTransactionProgressCardEntryTimedOut,                 ///< Indicates card entry on the card reader has timed out.
    ECLTransactionProgressCardEntryAborted,                  ///< Indicates card entry on the card reader has been aborted.
    ECLTransactionProgressSmartcardInserted,                 ///< Indicates chip card was inserted
    ECLTransactionProgressSmartcardError,                    ///< Indicates that the ICC card could not be read
    ECLTransactionProgressCardSwiped,                        ///< Indicates a card has been swiped on the card reader.
    ECLTransactionProgressCardSwipeSmartcardRejected,        ///< Indicates that an ICC card was swiped but should be inserted
    ECLTransactionProgressCardSwipeError,                    ///< Indicates an error occurred when swiping a card on the card reader.
    ECLTransactionProgressLanguageSelectedManually,          ///< Indicates language selection on the card reader has been manually selected.
    ECLTransactionProgressLanguageSelectedAutomatically,     ///< Indicates language selection on the card reader has been automatically selected.
    ECLTransactionProgressLanguageSelectionStarted,          ///< Indicates language selection process on the card reader has been started.
    ECLTransactionProgressLanguageSelectionCompleted,        ///< Indicates language selection process on the card reader has been completed.
    ECLTransactionProgressApplicationSelectionStarted,       ///< Indicates application selection on the card reader has been started.
    ECLTransactionProgressApplicationSelectedManually,       ///< Indicates application selection on the card reader has been manually selected
    ECLTransactionProgressApplicationSelectedAutomatically,  ///< Indicates application selection on the card reader has been automatically selected
    ECLTransactionProgressApplicationSelectionAccepted,      ///< Indicates application selection on the card reader has been accepted
    ECLTransactionProgressApplicationSelectionRejected,      ///< Indicates application selection on the card reader has been rejected
    ECLTransactionProgressApplicationSelectionCompleted,     ///< Indicates application selection on the card reader has been completed.
    ECLTransactionProgressPinEntryStarted,                   ///< Indicates PIN entry on the card reader has been started.
    ECLTransactionProgressPinEntryOfflineAccepted,           ///< Indicates PIN entry on the card reader has been accepted offline.
    ECLTransactionProgressPinEntryOnlineAccepted,            ///< Indicates PIN entry on the card reader has been accepted online.
    ECLTransactionProgressPinEntryCompleted,                 ///< Indicates PIN entry on the card reader has been completed.
    ECLTransactionProgressPinEntryAborted,                   ///< Indicates PIN entry on the card reader has been aborted.
    ECLTransactionProgressPinEntryBypassed,                  ///< Indicates PIN entry on the card reader has been bypassed.
    ECLTransactionProgressPinEntryTimedOut,                  ///< Indicates PIN entry on the card reader has timed out.
    ECLTransactionProgressPinEntryIncorrect,                 ///< Indicates PIN entry on the card reader was incorrect.
    ECLTransactionProgressLastPinEntry,                      ///< Indicates PIN entry on the card reader was the last one.
    ECLTransactionProgressAmountConfirmationStarted,         ///< Indicates amount confirmation on the card reader has been started.
    ECLTransactionProgressAmountConfirmationCompleted,       ///< Indicates amount confirmation on the card reader has been completed.
    ECLTransactionProgressAmountConfirmationAborted,         ///< Indicates amount confirmation on the card reader has been aborted.
    ECLTransactionProgressAmountConfirmationBypassed,        ///< Indicates amount confirmation on the card reader has been bypassed.
    ECLTransactionProgressAmountConfirmationTimedOut,        ///< Indicates amount confirmation on the card reader has timed out.
    ECLTransactionProgressSignatureVerificationStarted,      ///< Indicates signature verification started.
    ECLTransactionProgressSignatureVerificationCompleted,    ///< Indicates signature verification completed.
    ECLTransactionProgressVoiceReferralStarted,              ///< Indicates voice referral started.
    ECLTransactionProgressVoiceReferralCompleted,            ///< Indicates voice referral completed.
    ECLTransactionProgressSignatureProcessingStarted,        ///< Indicates signature is being processed
    ECLTransactionProgressVoiceReferralProcessingStarted,    ///< Indicates voice referral is being processed
    ECLTransactionProgressKeysUpdateStarted,                 ///< Indicates update of keys has started which includes getting keys from server and installing on card reader
    ECLTransactionProgressKeysUpdateCompleted,               ///< Indicates update of keys on card reader has completed which includes getting keys from server and installing on card reader
    ECLTransactionProgressKeysUpdateAborted,                 ///< Indicates update of keys on card reader has aborted
    ECLTransactionProgressPinPadWaitingStarted,              ///< Indicates that we are starting to wait on a card reader
    ECLTransactionProgressPinPadWaiting,                     ///< Indicates that we are waiting on a card reader
    ECLTransactionProgressPinPadWaitingCompleted,            ///< Indicates that we are done waiting on a card reader
    ECLTransactionProgressPinPadInitializing,                ///< Indicates that the card reader is initializing
    ECLTransactionProgressAtmCardRejected,                   ///< Indicates that the card is an ATM only card
    ECLTransactionProgressCompleted,                         ///< Indicates that transaction has completed
    ECLTransactionProgressPinPadSignatureDrawingStarted,     ///< Indicates that signature drawing has started on card reader
    ECLTransactionProgressPinPadSignatureDrawingCompleted,   ///< Indicates that signature drawing has completed on card reader
    ECLTransactionProgressPinPadResetting,                   ///< Indicates that card reader is resetting
    ECLTransactionProgressPinPadRebooting,                   ///< Indicates that card reader is rebooting
    ECLTransactionProgressCardReaderTransactionStarted,      ///< Indicates that transaction started on card reader
    ECLTransactionProgressCardReaderTransactionCompleted,    ///< Indicates that transaction completed on card reader (we are only done on card reader).
    ECLTransactionProgressCardSwipeFallbackPrompted,         ///< Indicates card reader prompted to swipe card due to fallback on chip card
    ECLTransactionProgressCardFloorLimitExceeded,            ///< Indicates base transaction amount exceeds the amount allowed for the card
    ECLTransactionProgressCardProximityFloorLimitExceeded,   ///< Indicates base transaction amount exceeds the amount allowed for the proximity/contactless card
    ECLTransactionProgressAccountTypeSelectionStarted,       ///< Indicates selection of debit card account type has started on card reader
    ECLTransactionProgressAccountTypeSelectionCompleted,     ///< Indicates selection of debit card account type has completed on card reader
    ECLTransactionProgressGratuitySelectionStarted,          ///< Indicates gratuity has started on card reader
    ECLTransactionProgressGratuitySelectionCompleted,        ///< Indicates gratuity has completed on card reader
    ECLTransactionProgressCancelGratuityStarted,             ///< Indicates cancel of gratuity has started on card reader
    ECLTransactionProgressCancelGratuityCompleted,           ///< Indicates cancel of gratuity has completed on card reader
    ECLTransactionProgressSelectGratuityStarted,             ///< Indicates selection of gratuity has started on card reader
    ECLTransactionProgressSelectGratuityCompleted,           ///< Indicates selection of gratuity has completed on card reader
    ECLTransactionProgressEnterGratuityStarted,              ///< Indicates entering custom gratuity has started on card reader
    ECLTransactionProgressEnterGratuityCompleted,            ///< Indicates entering custom gratuity has completed on card reader
    ECLTransactionProgressConfirmGratuityStarted,            ///< Indicates confirming gratuity has started on card reader
    ECLTransactionProgressConfirmGratuityCompleted,          ///< Indicates confirming gratuity has completed on card reader
    ECLTransactionProgressSessionKeysRequestCompleted,       ///< Indicates completing the request for device session keys (e.g., Canada)
    ECLTransactionProgressSessionKeysRequestStarted,         ///< Indicates starting the request for device session keys (e.g., Canada)
    ECLTransactionProgressDeviceCheckCompleted,              ///< Indicates checking if card reader configuration and firmware is up to date has started
    ECLTransactionProgressDeviceCheckStarted,                ///< Indicates checking if card reader configuration and firmware is up to date has completed
    ECLTransactionProgressInstallingFirmwareCompleted,       ///< Indicates installing firmware on card reader has completed
    ECLTransactionProgressInstallingFirmwareStarted,         ///< Indicates installing firmware on card reader has started
    ECLTransactionProgressDeviceConfigurationUpdateCompleted,///< Indicates installing configuration on card reader has completed
    ECLTransactionProgressDeviceConfigurationUpdateStarted,  ///< Indicates installing configuration on card reader has started
    ECLTransactionProgressDeviceKeysUpdateStarted,           ///< Indicates update of keys has started on card reader
    ECLTransactionProgressDeviceKeysUpdateCompleted,         ///< Indicates update of keys has completed on card reader
    ECLTransactionProgressDeviceKeysUpdateAborted,           ///< Indicates update of keys has aborted on card reader
    ECLTransactionProgressMacValueCalculationStarted,        ///< Indicates MAC value calculation on the card reader has started.
    ECLTransactionProgressMacValueCalculationCompleted,      ///< Indicates MAC value calculation on the card reader has completed.
    ECLTransactionProgressMacValueCalculationAborted,        ///< Indicates MAC value calculation on the card reader been aborted.
    ECLTransactionProgressMacValueValidationStarted,         ///< Indicates MAC value validation on the card reader has started.
    ECLTransactionProgressMacValueValidationCompleted,       ///< Indicates MAC value validation on the card reader has completed.
    ECLTransactionProgressMacValueValidationAborted,         ///< Indicates MAC value validation on the card reader been aborted.
    ECLTransactionProgressSessionKeyLoadingStarted,          ///< Indicates Session Key(s) loading on the card reader has started.
    ECLTransactionProgressSessionKeyLoadingCompleted,        ///< Indicates Session Key(s) loading on the card reader has completed.
    ECLTransactionProgressSessionKeyLoadingAborted,          ///< Indicates Session Key(s) loading on the card reader been aborted.
    ECLTransactionProgressCardTapped,                        ///< Indicates card was tapped on reader for contactless magstripe read
    ECLTransactionProgressCardManuallyEnteredOnCardReader,   ///< Indicates card number was manually entered on card reader
    ECLTransactionProgressSmartCardTapped,                   ///< Indicates card was tapped on reader for contactless chip read
    ECLTransactionProgressMobileTapped,                      ///< Indicates mobile device was tapped on reader for (contactless) card read
    ECLTransactionProgressPaymentTypeSelectionStarted,       ///< Indicates selection of payment type (credit vs debit) has started on card reader
    ECLTransactionProgressPaymentTypeSelectionCompleted,     ///< Indicates selection of payment type (credit vs debit) has completed on card reader
    ECLTransactionProgressCardInsertPrompted,                ///< Indicates that card insertion should be performed
    ECLTransactionProgressCardSwipePrompted,                 ///< Indicates that card swipe should be performed
    ECLTransactionProgressCardReswipePrompted,               ///< Indicates card swipe should be performed after a bad read
    ECLTransactionProgressCardReinsertPrompted,              ///< Indicates card insert should be performed after a bad read
    ECLTransactionProgressCardEntryPrepareToPrompt,          ///< Indicates that card entry will soon be prompted on the card reader
    ECLTransactionProgressCardEntryCompleted,                ///< Indicates that card entry is completed
    ECLTransactionProgressCardInsertOrSwipePrompted,         ///< Indicates that card insertion or swipe should be performed
    ECLTransactionProgressChangeLanguageStarted,             ///< Indicates changing language has started on card reader
    ECLTransactionProgressChangeLanguageCompleted,           ///< Indicates changing language has completed on card reader
    ECLTransactionProgressTransactionQueryCompleted,         ///< Indicates the transaction query response has been handled
    ECLTransactionProgressSetDailyRebootTimeStarted,         ///< Indicates setting of V4 card reader daily reboot time was started
    ECLTransactionProgressSetDailyRebootTimeCompleted,       ///< Indicates setting of V4 card reader daily reboot time was completed
    ECLTransactionProgressCardTapPrompted,                   ///< Indicates that card tap should be performed
    ECLTransactionProgressCardInsertOrTapPrompted,           ///< Indicates that card insertion or tap should be performed
    ECLTransactionProgressCardSwipeOrTapPrompted,            ///< Indicates that card swipe or tap should be performed
    ECLTransactionProgressCheckContactlessPhone,             ///< Indicates contactless payment requires further instructions displayed on consumer's phone
    ECLTransactionProgressBinLookupStarted,                  ///< Indicates BIN lookup request was sent to Converge payment gateway
    ECLTransactionProgressBinLookupCompleted,                ///< Indicates BIN lookup response was received and deserialized
    ECLTransactionProgressSurchargeConfirmationStarted,      ///< Indicates Surcharge Confirmation form is displayed on card reader
    ECLTransactionProgressSurchargeConfirmationChangeCard,   ///< Indicates consumer pressed the 'Change Card' button on Surcharge Confirmation form displayed on card reader
    ECLTransactionProgressSurchargeConfirmationAccepted,     ///< Indicates consumer pressed the 'Accept' button on Surcharge Confirmation form displayed on card reader
    ECLTransactionProgressServiceFeeLookupStarted,           ///< Indicates service fee lookup request was sent to Converge payment gateway
    ECLTransactionProgressServiceFeeLookupCompleted,         ///< Indicates service fee lookup response was received and deserialized
    ECLTransactionProgressServiceFeeConfirmationStarted,     ///< Indicates Service Fee Confirmation form is displayed on card reader
    ECLTransactionProgressServiceFeeConfirmationAccepted,    ///< Indicates consumer pressed the 'Accept' button on Service Fee Confirmation form displayed on card reader
    ECLTransactionProgressZipCodeEntryStarted,               ///< Indicates zip code entry was started on card reader
    ECLTransactionProgressZipCodeEntryCompleted,             ///< Indicates zip code entry was completed on card reader
    ECLTransactionProgressDeviceApplicationUpdateStarted,    ///< Indicates installing applications on card reader has started
    ECLTransactionProgressLogUploadStarted,                  ///< Indicates log upload to server is started
    ECLTransactionProgressLogUploadCompleted,                ///< Indicates log upload to server is completed
    ECLTransactionProgressPinUpdateStarted,                  ///< Indicates pin update is started
    ECLTransactionProgressPinUpdateCompleted,                ///< Indicates pin update is completed
    ECLTransactionProgressTmsUpdateStarted,                  ///< Indicates TMS update started
    ECLTransactionProgressTmsUpdateCompleted,                ///< Indicates TMS update completed
    ECLTransactionProgressRequireCertificateInfo,            ///< Indicates CSDK requires new keystore and password
} ECLTransactionProgress;

<Commerce-Opayo/ECLTransactionProtocol.h>

/// \brief Base protocol for a transaction
@protocol ECLTransactionProtocol <NSObject>

@required

/// \brief The type of transaction.  Eg., ECLTransactionType_Sale
@property (readonly) ECLTransactionType type;

/// \brief Whether or not an attempt to cancel will be effective
- (BOOL)canCancel;

@end

Reference

<Commerce-Opayo/ECLTransactionRequirementsProtocol.h>

/// \brief Specifies the information which is required for a transaction to be processed
@protocol ECLTransactionRequirementsProtocol <NSObject>

@required

/// \brief Whether or not tax must be specified. Tax defaults to nil so this will never be YES.
@property (readonly) BOOL requiresTax;

/// \brief Whether or not gratuity must be specified. If you do not want gratuity set it to nil on the transaction.
@property (readonly) BOOL requiresGratuity;

/// \brief Whether or not a discount must be specified. Discount defaults to nil so this will never be YES.
@property (readonly) BOOL requiresDiscount;

@end

<ElavonCommon/ECCSensitiveData.h>

/// \brief Encrypts data so it can be securely passed around
@interface ECCSensitiveData : NSObject

/// \brief Tells if initialize has been called.
/// \return YES if initialized. NO if not.
+ (BOOL)isInitialized;

/// \brief Constructor for encrypting a string
- (id)init:(NSString *)data;

/// \brief Constructor for base64 encoding a string and then encrypting it
- (id)initWithEncodedString:(NSString *)data;

/// \brief Remove all the data
- (void)clear;

/// \brief Retrieve decrypted string. This should be used only when unable to use 'reader' method. This will cause the secure data to be in
/// \return decrypted string
- (NSString *)string;

/// \brief Retrieve decrypted string and base64 encode it
/// \return decrypted and base64 encoded string
- (NSString *)encodedString;

/// \brief Determine if object passed in is ECCSenstiveData object and encrypts the same data.
/// \return YES if equal. NO if not.
- (BOOL)isEqual:(id)object;

/// \brief Return length of decrypted string
/// \return length of descrypted string
- (NSUInteger)length;

@end

<ElavonCommon/ECCTriState.h>

typedef enum
{
    ECCTriState_Unknown,
    ECCTriState_Yes,
    ECCTriState_No,
} ECCTriState;