@aptos-scp/scp-component-rn-device-services 0.0.1 → 0.0.4-hm
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +47 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +164 -0
- package/android/gradlew.bat +90 -0
- package/android/src/main/AndroidManifest.xml +10 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/RNMapper.java +212 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/VendorPaymentTerminal.java +46 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/VendorPaymentTerminalPackage.java +33 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/adyen/AdyenPaymentTerminal.java +122 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/aurus/AurusPaymentTerminal.java +54 -0
- package/ios/AurusEnterpriseSDK.framework/AurusEnterpriseSDK +0 -0
- package/ios/AurusEnterpriseSDK.framework/Headers/AurusEnterpriseSDK.h +97 -95
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/Info.plist +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/VersionInfo.plist +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.2.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.3.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.omo +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.8.6.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.9.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAccountData.h +26 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAdditionalDataRequest.h +38 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAmount.h +16 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAppData.h +26 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYBalance.h +13 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCashTransactionRequest.h +35 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYConstants.h +688 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCurrency.h +33 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDevice.h +308 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceData.h +52 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceManagerDelegate.h +66 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceRegistry.h +125 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDynamicCurrencyConversionData.h +22 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYErrors.h +153 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCard.h +41 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceRequest.h +50 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceResponse.h +38 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequest.h +78 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequestDelegate.h +25 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadResponse.h +31 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardMask.h +31 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardRequest.h +13 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLocationManager.h +14 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLoginDelegate.h +80 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYPrintReceiptRequest.h +57 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceipt.h +33 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceiptLine.h +92 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReferralRequest.h +16 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYRefundData.h +54 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYServerSynchronization.h +18 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSignatureRequest.h +117 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSpecialTransactionRequest.h +63 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYToneGenerator.h +45 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionData.h +416 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionDetails.h +45 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionProcessorDelegate.h +279 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionRequest.h +108 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYUIKit.h +30 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/Adyen.h +591 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit-umbrella.h +59 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit.h +79 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSData+ADY.h +31 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSString+ADY.h +19 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/adylog.h +176 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Info.plist +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Modules/module.modulemap +6 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.h +40 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.m +28 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.h +23 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.m +15 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.h +19 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.m +31 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.h +19 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.m +26 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.h +26 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.m +148 -0
- package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.h +19 -0
- package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.m +457 -22
- package/ios/SCPRNDeviceServices/AurusPaymentTerminal.m +96 -11
- package/ios/SCPRNDeviceServices/VendorPaymentTerminal.m +1 -1
- package/ios/SCPRNDeviceServices.xcodeproj/project.pbxproj +56 -0
- package/lib/AdyenDevice/AdyenDevice.d.ts +56 -0
- package/lib/AdyenDevice/AdyenDevice.js +349 -0
- package/lib/AdyenDevice/AdyenDevice.js.map +1 -0
- package/lib/AdyenDevice/constants.d.ts +12 -0
- package/lib/AdyenDevice/constants.js +228 -0
- package/lib/AdyenDevice/constants.js.map +1 -0
- package/lib/AdyenDevice/index.d.ts +1 -0
- package/lib/AdyenDevice/index.js +7 -0
- package/lib/AdyenDevice/index.js.map +1 -0
- package/lib/AdyenDevice/interfaces.d.ts +175 -0
- package/lib/AdyenDevice/interfaces.js +3 -0
- package/lib/AdyenDevice/interfaces.js.map +1 -0
- package/lib/AurusDevice/AurusDevice.d.ts +102 -0
- package/lib/AurusDevice/AurusDevice.js +730 -0
- package/lib/AurusDevice/AurusDevice.js.map +1 -0
- package/lib/AurusDevice/constants.d.ts +85 -33
- package/lib/AurusDevice/constants.js +115 -37
- package/lib/AurusDevice/constants.js.map +1 -1
- package/lib/AurusDevice/index.d.ts +1 -1
- package/lib/AurusDevice/index.js +1 -1
- package/lib/AurusDevice/index.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/AESDKRegistration.d.ts +10 -9
- package/lib/AurusDevice/sdk-interface/AESDKRegistration.js +0 -6
- package/lib/AurusDevice/sdk-interface/AESDKRegistration.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.d.ts +5 -5
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js +143 -107
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/Barcode.d.ts +16 -0
- package/lib/AurusDevice/sdk-interface/Barcode.js +3 -0
- package/lib/AurusDevice/sdk-interface/Barcode.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/ByPassScreen.d.ts +25 -0
- package/lib/AurusDevice/sdk-interface/ByPassScreen.js +9 -0
- package/lib/AurusDevice/sdk-interface/ByPassScreen.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/CancelTransaction.d.ts +11 -10
- package/lib/AurusDevice/sdk-interface/CancelTransaction.js +0 -6
- package/lib/AurusDevice/sdk-interface/CancelTransaction.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/GetCardBinRequest.d.ts +14 -12
- package/lib/AurusDevice/sdk-interface/PLCCApplication.d.ts +12 -11
- package/lib/AurusDevice/sdk-interface/PLCCApplication.js +0 -6
- package/lib/AurusDevice/sdk-interface/PLCCApplication.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/TransactionRequest.d.ts +44 -48
- package/lib/AurusDevice/sdk-interface/TransactionRequest.js +0 -6
- package/lib/AurusDevice/sdk-interface/TransactionRequest.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/Upgrade.d.ts +23 -0
- package/lib/AurusDevice/sdk-interface/Upgrade.js +9 -0
- package/lib/AurusDevice/sdk-interface/Upgrade.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/XmlElementString.d.ts +3 -0
- package/lib/AurusDevice/sdk-interface/XmlElementString.js +3 -0
- package/lib/AurusDevice/sdk-interface/XmlElementString.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/index.d.ts +3 -0
- package/lib/PaymentDeviceFactory.d.ts +5 -5
- package/lib/PaymentDeviceFactory.js +16 -22
- package/lib/PaymentDeviceFactory.js.map +1 -1
- package/lib/PaymentDeviceService.d.ts +13 -12
- package/lib/PaymentDeviceService.js +114 -71
- package/lib/PaymentDeviceService.js.map +1 -1
- package/lib/ScannerDeviceFactory.d.ts +11 -0
- package/lib/ScannerDeviceFactory.js +27 -0
- package/lib/ScannerDeviceFactory.js.map +1 -0
- package/lib/ScannerDeviceService.d.ts +13 -0
- package/lib/ScannerDeviceService.js +110 -0
- package/lib/ScannerDeviceService.js.map +1 -0
- package/lib/configs/inversify/inversify.config.d.ts +3 -0
- package/lib/configs/inversify/inversify.config.js +15 -0
- package/lib/configs/inversify/inversify.config.js.map +1 -0
- package/lib/constants/constants.d.ts +62 -38
- package/lib/constants/constants.js +64 -42
- package/lib/constants/constants.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/interfaces/IDeviceStatus.d.ts +1 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/payment/IPayment.d.ts +17 -18
- package/lib/interfaces/payment/messages/requests.d.ts +2 -3
- package/lib/interfaces/payment/messages/responses.d.ts +13 -6
- package/lib/interfaces/scanner/IScanner.d.ts +23 -0
- package/lib/interfaces/scanner/IScanner.js +3 -0
- package/lib/interfaces/scanner/IScanner.js.map +1 -0
- package/lib/interfaces/scanner/index.d.ts +1 -0
- package/lib/interfaces/scanner/index.js +3 -0
- package/lib/interfaces/scanner/index.js.map +1 -0
- package/package.json +12 -9
- package/types/react-native-xml2js/index.d.ts +5 -0
- package/lib/AurusDevice/AurusPaymentDevice.d.ts +0 -77
- package/lib/AurusDevice/AurusPaymentDevice.js +0 -473
- package/lib/AurusDevice/AurusPaymentDevice.js.map +0 -1
- package/types/money-works/index.d.ts +0 -49
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYTransactionData.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/23/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "ADYUIKit.h"
|
|
11
|
+
#import "ADYConstants.h"
|
|
12
|
+
|
|
13
|
+
@class ADYReceipt;
|
|
14
|
+
@class ADYDeviceData;
|
|
15
|
+
@class CLLocation;
|
|
16
|
+
|
|
17
|
+
// deprecated, definition at end of file
|
|
18
|
+
@class ADYCancelInfo;
|
|
19
|
+
@class ADYDeclineInfo;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
static NSString *ADYTransactionFailureDomain = @"TransactionFailureDomain";
|
|
23
|
+
|
|
24
|
+
typedef NS_ENUM(NSInteger, ADYTransactionFailureCode) {
|
|
25
|
+
|
|
26
|
+
ADYTransactionFailureCodeUnknown = 40000,
|
|
27
|
+
|
|
28
|
+
ADYTransactionFailureCodeInitializationError = 40001,
|
|
29
|
+
|
|
30
|
+
// cancel
|
|
31
|
+
ADYTransactionFailureCodeCardRemoved = 40002,
|
|
32
|
+
ADYTransactionFailureCodeShopperCancelled = 40003,
|
|
33
|
+
ADYTransactionFailureCodeMerchantCancelled = 40004,
|
|
34
|
+
ADYTransactionFailureCodeShopperDidNotPresentCard = 40014,
|
|
35
|
+
|
|
36
|
+
// error
|
|
37
|
+
ADYTransactionFailureCodeTechnicalProblem = 40005,
|
|
38
|
+
ADYTransactionFailureCodeFailedToPrintReceipt = 40006,
|
|
39
|
+
ADYTransactionFailureCodeCardReadFailed = 40007,
|
|
40
|
+
ADYTransactionFailureCodeConnectionLost = 40008,
|
|
41
|
+
|
|
42
|
+
//decline
|
|
43
|
+
ADYTransactionFailureCodeCardDeclined = 40009,
|
|
44
|
+
ADYTransactionFailureCodeRequestReferral = 40010,
|
|
45
|
+
ADYTransactionFailureCodeInsufficientFunds = 40011,
|
|
46
|
+
ADYTransactionFailureCodePinDeclined = 40012,
|
|
47
|
+
ADYTransactionFailureCodeCardDeclinedOnline= 40015,
|
|
48
|
+
|
|
49
|
+
ADYTransactionFailureCardSwappedMidTransaction = 40013,
|
|
50
|
+
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Data made available about a transaction when it is complete.
|
|
55
|
+
* Inspect the `finalState` property to see if the transaction succeeded or not.
|
|
56
|
+
*/
|
|
57
|
+
@interface ADYTransactionData : NSObject
|
|
58
|
+
|
|
59
|
+
@property (nonatomic, strong) NSString *mid;
|
|
60
|
+
@property (nonatomic, strong) NSString *tid;
|
|
61
|
+
@property (nonatomic, strong) NSString *posEntryMode;
|
|
62
|
+
@property (nonatomic, strong) NSString *txRef;
|
|
63
|
+
@property (nonatomic, strong) NSString *tenderReference;
|
|
64
|
+
@property (nonatomic, strong) NSString *shopperReference;
|
|
65
|
+
@property (nonatomic, strong) NSString *shopperEmail;
|
|
66
|
+
@property (nonatomic, assign) ADYTransactionType transactionType;
|
|
67
|
+
|
|
68
|
+
@property (nonatomic, strong) NSNumber *amountValue; // originalAmount
|
|
69
|
+
@property (nonatomic, strong) NSString *amountCurrency; // originalAmountCurrency
|
|
70
|
+
@property (nonatomic, strong) NSNumber *adjustedAmountValue; // usually a discount (negative) amount for loyalty programs etc (added to amountValue)
|
|
71
|
+
@property (nonatomic, strong) NSString *adjustedAmountCurrency;
|
|
72
|
+
@property (nonatomic, strong) NSNumber *gratuityAmountValue; // the amount given as gratuity (added to amountValue)
|
|
73
|
+
@property (nonatomic, strong) NSString *gratuityAmountCurrency;
|
|
74
|
+
@property (nonatomic, strong) NSNumber *additionalAmountValue; // the sum of adjustedAmount and gratuityAmount
|
|
75
|
+
@property (nonatomic, strong) NSString *additionalAmountCurrency;
|
|
76
|
+
@property (nonatomic, strong) NSNumber *authAmountValue; // the amount that was authorised by Adyen, can be converted to different currency (dcc)
|
|
77
|
+
@property (nonatomic, strong) NSString *authAmountCurrency; // can be in a different currency than amountCurrency due to dcc
|
|
78
|
+
|
|
79
|
+
@property (nonatomic, readonly) NSNumber *finalAmountValue; // final amount of transaction for the merchant, including gratuity etc
|
|
80
|
+
@property (nonatomic, readonly) NSString *finalAmountCurrency; // final amount currency for the merchant (same as amountCurrency)
|
|
81
|
+
|
|
82
|
+
@property (nonatomic, strong) NSString *aidCode;
|
|
83
|
+
@property (nonatomic, strong) NSString *applicationPreferredName;
|
|
84
|
+
@property (nonatomic, strong) NSString *merchantReference;
|
|
85
|
+
@property (nonatomic, strong) NSNumber *taxPercentage;
|
|
86
|
+
@property (nonatomic, strong) NSString *cardType;
|
|
87
|
+
@property (nonatomic, strong) NSString *cardNumber;
|
|
88
|
+
@property (nonatomic, strong) NSString *cardSeq;
|
|
89
|
+
@property (nonatomic, strong) NSString *cardHolderName;
|
|
90
|
+
@property (nonatomic, strong) NSString *cardExpiryYear;
|
|
91
|
+
@property (nonatomic, strong) NSString *cardExpiryMonth;
|
|
92
|
+
@property (nonatomic, strong) NSString *cardEffectiveYear;
|
|
93
|
+
@property (nonatomic, strong) NSString *cardEffectiveMonth;
|
|
94
|
+
@property (nonatomic, strong) NSString *cardAlias;
|
|
95
|
+
@property (nonatomic, strong) NSString *paymentVerificationData;
|
|
96
|
+
@property (nonatomic, strong) NSString *issuerCountry;
|
|
97
|
+
@property (nonatomic, strong) NSString *cardBin;
|
|
98
|
+
@property (nonatomic, strong) NSString *applicationLabel;
|
|
99
|
+
@property (nonatomic, strong) NSString *cardHolderVerificationMethodResults;
|
|
100
|
+
@property (nonatomic, strong) NSString *txDate;
|
|
101
|
+
@property (nonatomic, strong) NSString *txTime;
|
|
102
|
+
@property (nonatomic, strong) NSString *iso8601TxDate; // ISO8601 date time format, Ex: `2015-07-23T09:42:44.0000311+0000`
|
|
103
|
+
@property (nonatomic, strong) NSString *posResultCode;
|
|
104
|
+
|
|
105
|
+
@property (nonatomic, strong) NSString *paymentMethodVariant;
|
|
106
|
+
@property (nonatomic, strong) NSString *paymentMethod;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Detailed explanation of the final state.
|
|
110
|
+
*/
|
|
111
|
+
@property (nonatomic, assign) ADYTenderResultCode resultCode;
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@property (nonatomic, strong) NSString *refundReason;
|
|
115
|
+
|
|
116
|
+
@property (nonatomic, strong) NSMutableDictionary *additionalData;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The scheme of the card used.
|
|
120
|
+
* This can be one of:
|
|
121
|
+
*
|
|
122
|
+
* - `ADYCardSchemeError`
|
|
123
|
+
* - `ADYCardSchemeVisaVisa`
|
|
124
|
+
* - `ADYCardSchemeVisaElectron`
|
|
125
|
+
* - `ADYCardSchemeVisaVPay`
|
|
126
|
+
* - `ADYCardSchemeVisaPlus`
|
|
127
|
+
* - `ADYCardSchemeVisaDankort`
|
|
128
|
+
* - `ADYCardSchemeMasterCardDebit`
|
|
129
|
+
* - `ADYCardSchemeMasterCardMaestro`
|
|
130
|
+
* - `ADYCardSchemeMasterCardMaestroUK`
|
|
131
|
+
* - `ADYCardSchemeMasterCardMasterCard`
|
|
132
|
+
* - `ADYCardSchemeAmericanExpress`
|
|
133
|
+
* - `ADYCardSchemeJCB`
|
|
134
|
+
* - `ADYCardSchemeDinersClub`
|
|
135
|
+
* - `ADYCardSchemeDankort`
|
|
136
|
+
* - `ADYCardSchemeDiscover`
|
|
137
|
+
* - `ADYCardSchemeLaser`
|
|
138
|
+
* - `ADYCardSchemeBCMC`
|
|
139
|
+
* - `ADYCardSchemeSolo`
|
|
140
|
+
* - `ADYCardSchemeBijenkorf`
|
|
141
|
+
*/
|
|
142
|
+
@property (nonatomic, assign) ADYCardScheme cardScheme;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Human-readable form of the `cardScheme` property.
|
|
146
|
+
*/
|
|
147
|
+
@property (readonly) NSString *cardString;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Indicates if the card was inserted into the payment device, meaning it would have to be removed
|
|
151
|
+
* when the transaction is finished. It can be used to check if a "please remove card" notification
|
|
152
|
+
* should be shown.
|
|
153
|
+
*/
|
|
154
|
+
@property (readonly) BOOL cardNeedsToBeRemovedAfterTransaction;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The final state of the transaction.
|
|
158
|
+
* This can be one of:
|
|
159
|
+
*
|
|
160
|
+
* - `ADYFinalTenderStateNotFinal`: transaction has not reached a final state yet
|
|
161
|
+
* - `ADYFinalTenderStateApproved`: the payment was approved
|
|
162
|
+
* - `ADYFinalTenderStateDeclined`: the payment was declined. More info is available
|
|
163
|
+
* in the `declineInfo` property.
|
|
164
|
+
* - `ADYFinalTenderStateCancelled`: the payment was cancelled. More info is available
|
|
165
|
+
* in the `cancelInfo` property.
|
|
166
|
+
* - `ADYFinalTenderStateError`: there was an error. More info is available in the
|
|
167
|
+
* `errorInfo` property.
|
|
168
|
+
* - `ADYFinalTenderStateUnknown`: Could not determine transaction result. Please verify by other means. Final state `Unknown` replaces `Error` state related to network lost.
|
|
169
|
+
*/
|
|
170
|
+
@property (nonatomic, assign) ADYFinalTenderState finalState;
|
|
171
|
+
|
|
172
|
+
/** Provides a human-readable version of the `finalState` property. */
|
|
173
|
+
@property (nonatomic, assign) NSString *finalStateString;
|
|
174
|
+
|
|
175
|
+
/** Indicates the current state of processing of this transaction. It could be in progress, processed, being reversed, etc */
|
|
176
|
+
@property (nonatomic, assign) ADYProcessingState processingState;
|
|
177
|
+
|
|
178
|
+
@property (nonatomic, strong) NSString *pspAuthCode;
|
|
179
|
+
@property (nonatomic, strong) NSString *pspReference;
|
|
180
|
+
|
|
181
|
+
@property (nonatomic, strong) NSDate *dateSubmitted;
|
|
182
|
+
|
|
183
|
+
@property (nonatomic, strong) NSString *terminalId;
|
|
184
|
+
@property (nonatomic, strong) NSString *signatureData;
|
|
185
|
+
@property (nonatomic, strong) CLLocation *location;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* If the transaction did not end in final state APPROVED, the abstract reason of failure can be found here.
|
|
189
|
+
* The raw and more detailed reason can be found in the `rawFailureReason` property.
|
|
190
|
+
*/
|
|
191
|
+
@property (nonatomic, assign) ADYTransactionFailureCode failureReasonCode;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* If the transaction did not end in final state APPROVED, this will hold the raw failure reason code and
|
|
195
|
+
* message from the payment device or the reason the payment device could not start a transaction.
|
|
196
|
+
* This code and/or message should be reported to Adyen when asking for support.
|
|
197
|
+
*/
|
|
198
|
+
@property (nonatomic, strong) NSError *rawFailureReason;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Sometimes a transaction will be declined by the card issuer because they want the card holder
|
|
202
|
+
* to contact them by phone to discuss the transaction. This case is called a `REFERRAL`. If the issuer
|
|
203
|
+
* and the card holder come to the conclusion that the transaction can be approved, the issuer will
|
|
204
|
+
* give the card holder a authorisation code.
|
|
205
|
+
*
|
|
206
|
+
* This property indicates that the transaction needs a referral authorisation code before it will be
|
|
207
|
+
* approved. The code can be sent using the `authoriseWithCode:` function.
|
|
208
|
+
*/
|
|
209
|
+
@property (readonly) BOOL needsReferralAuthorisation;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The logo to be used on the receipt (provided in the `ADYTransactionRequest`)
|
|
213
|
+
*/
|
|
214
|
+
@property (nonatomic, strong) NSString *logoReceipt;
|
|
215
|
+
@property (nonatomic, readonly) ADYImageClassName *logoImage; // logoReceipt converted to an UImage (base64 decode)
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* All details of the device used for this transaction as it was when the transaction
|
|
219
|
+
* was performed. The up-to-date information can be retrieved by examining the
|
|
220
|
+
* `deviceData` property of the `ADYDevice` used to initiate the `ADYTransactionRequest`.
|
|
221
|
+
*
|
|
222
|
+
* This property will only be set at the end of a transaction. It is not persisted and
|
|
223
|
+
* won't show up if the transaction is fetched at a later time.
|
|
224
|
+
*/
|
|
225
|
+
@property (nonatomic, copy) ADYDeviceData *deviceData;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The refunds that were completed for this transaction, encapsulated by ADYRefundData
|
|
229
|
+
* objects. The sum of all refunds can never be more than the original transaction amount.
|
|
230
|
+
*/
|
|
231
|
+
@property (nonatomic, strong) NSArray *refunds;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The number of receipts in this transaction.
|
|
235
|
+
*/
|
|
236
|
+
@property (readonly) NSUInteger receiptCount;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Returns the receipt of the indicated type at the indicated index.
|
|
240
|
+
* @param receiptIndex An integer greater than or equal to 0, and
|
|
241
|
+
* smaller than `receiptCount`.
|
|
242
|
+
* @param receiptType Use `ADYReceiptTypeMerchant` to get the merchant copy,
|
|
243
|
+
* or `ADYReceiptTypeCardholder` to get the cardholder copy.
|
|
244
|
+
*/
|
|
245
|
+
- (ADYReceipt *)getReceiptForIndex:(NSUInteger)receiptIndex
|
|
246
|
+
andType:(ADYReceiptType)receiptType;
|
|
247
|
+
|
|
248
|
+
@property (nonatomic, strong) NSMutableArray *cardHolderReceipts;
|
|
249
|
+
|
|
250
|
+
////////////////////////////
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Only set in case `finalState` is `ADYFinalTenderStateCancelled`; provides
|
|
254
|
+
* the reason for cancellation.
|
|
255
|
+
*
|
|
256
|
+
* @deprecated
|
|
257
|
+
*/
|
|
258
|
+
@property (nonatomic, strong) ADYCancelInfo *cancelInfo;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Only set in case `finalState` is `ADYFinalTenderStateDeclined`; provides
|
|
262
|
+
* the reason the transaction was declined.
|
|
263
|
+
*
|
|
264
|
+
* @deprecated
|
|
265
|
+
*/
|
|
266
|
+
@property (nonatomic, strong) ADYDeclineInfo *declineInfo;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Only set in case `finalState` is `ADYFinalTenderStateError`; provides additional
|
|
270
|
+
* info about the error that occurred. The error-code is one of the codes
|
|
271
|
+
* of the `Adyen` error-domain (which can be found in the reference of the `Adyen` class).
|
|
272
|
+
*
|
|
273
|
+
* @deprecated
|
|
274
|
+
*/
|
|
275
|
+
@property (nonatomic, strong) NSError *errorInfo;
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
@end
|
|
280
|
+
|
|
281
|
+
#pragma mark - DEPRECATED
|
|
282
|
+
|
|
283
|
+
typedef NS_ENUM(NSUInteger, ADYCancelCode) {
|
|
284
|
+
ADYCancelCodeShopperCancelledAppSelection = 30000,
|
|
285
|
+
ADYCancelCodeShopperCancelledDuringPINEntry = 30001,
|
|
286
|
+
ADYCancelCodeMerchantCancelled = 30002,
|
|
287
|
+
ADYCancelCodeDeviceTimedOutCardEntry = 30003,
|
|
288
|
+
ADYCancelCodeFailedToPrintReceipt = 30004,
|
|
289
|
+
ADYCancelCodeMerchantDisapprovedSignature = 30005,
|
|
290
|
+
ADYCancelCodeCardRemoved = 30006,
|
|
291
|
+
ADYCancelCodeShopperCancelledTransaction = 30007,
|
|
292
|
+
ADYCancelCodeEmvError = 30008,
|
|
293
|
+
ADYCancelCodeSapiError = 30009,
|
|
294
|
+
ADYCancelCodeFailedToRetrieveAdditionalData = 30010,
|
|
295
|
+
ADYCancelCodeUnknown = 30999
|
|
296
|
+
} ;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Class for objects providing information about the reason
|
|
300
|
+
* a transaction was cancelled.
|
|
301
|
+
*/
|
|
302
|
+
@interface ADYCancelInfo : NSObject
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* A code identifying the reason for cancellation.
|
|
306
|
+
*
|
|
307
|
+
* Possible values are:
|
|
308
|
+
*
|
|
309
|
+
* - `ADYCancelCodeShopperCancelledAppSelection` (30000): The shopper cancelled
|
|
310
|
+
* the transaction while app selection was performed by the terminal.
|
|
311
|
+
* - `ADYCancelCodeShopperCancelledDuringPINEntry` (30001): The shopper cancelled
|
|
312
|
+
* the transaction when he was requested to enter his pincode.
|
|
313
|
+
* - `ADYCancelCodeMerchantCancelled` (30002): The transaction was cancelled by the
|
|
314
|
+
* merchant.
|
|
315
|
+
* - `ADYCancelCodeDeviceTimedOutCardEntry` (30003): The shopper did not insert a
|
|
316
|
+
* card in time.
|
|
317
|
+
* - `ADYCancelCodeFailedToPrintReceipt` (30004): The receipt for the transaction
|
|
318
|
+
* could not be printed.
|
|
319
|
+
* - `ADYCancelCodeMerchantDisapprovedSignature` (30005): The merchant did not
|
|
320
|
+
* approve the signature of the shopper.
|
|
321
|
+
* - `ADYCancelCodeCardRemoved` (30006): The card was removed before the transaction
|
|
322
|
+
* could be completed.
|
|
323
|
+
* - `ADYCancelCodeShopperCancelledTransaction` (30007): The shopper cancelled the
|
|
324
|
+
* transaction by pressing the cancel button.
|
|
325
|
+
* - `ADYCancelCodeEmvError` (30008): An error occured while communicating with the
|
|
326
|
+
* EMV payment device.
|
|
327
|
+
* - `ADYCancelCodeSapiError` (30009): SAPI error.
|
|
328
|
+
* - `ADYCancelCodeFailedToRetrieveAdditionalData` (30010): The additional data
|
|
329
|
+
* for this transaction could not be retrieved.
|
|
330
|
+
* - `ADYCancelCodeUnknown` (30999): Unknown cancellation reason.
|
|
331
|
+
*/
|
|
332
|
+
@property (nonatomic, readonly) ADYCancelCode code;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Human-readable message containing the reason for cancellation.
|
|
336
|
+
*/
|
|
337
|
+
@property (readonly) NSString *message;
|
|
338
|
+
|
|
339
|
+
- (instancetype)initWithCode:(ADYCancelCode)code;
|
|
340
|
+
|
|
341
|
+
- (instancetype)initWithUnknownReason:(NSString *)unknownReason;
|
|
342
|
+
@end
|
|
343
|
+
|
|
344
|
+
typedef NS_ENUM(NSUInteger, ADYDeclineCode) {
|
|
345
|
+
|
|
346
|
+
ADYDeclineCodePSPCouldNotDetermineVariant = 31000,
|
|
347
|
+
ADYDeclineCodePSPDoesNotSupportPaymentDetails = 31001,
|
|
348
|
+
ADYDeclineCodeDeviceSignatureFailed = 31002,
|
|
349
|
+
ADYDeclineCodeAcquirerDeclined = 31003,
|
|
350
|
+
ADYDeclineCodeAcquirerReferral = 31004,
|
|
351
|
+
ADYDeclineCodeAcquirerError = 31005,
|
|
352
|
+
ADYDeclineCodeAcquirerBlockCard = 31006,
|
|
353
|
+
ADYDeclineCodeAcquirerCardExpired = 31007,
|
|
354
|
+
ADYDeclineCodeAcquirerInvalidAmount = 31008,
|
|
355
|
+
ADYDeclineCodeAcquirerInvalidCard = 31009,
|
|
356
|
+
ADYDeclineCodeAcquirerIssuerUnavailable = 31010,
|
|
357
|
+
ADYDeclineCodeAcquirerNotSupported = 31011,
|
|
358
|
+
// ADYDeclineCodeAcquirerNot3DAuthenticated = 31012,
|
|
359
|
+
ADYDeclineCodeAcquirerNotEnoughBalance = 31013,
|
|
360
|
+
ADYDeclineCodeAcquirerPending = 31014,
|
|
361
|
+
ADYDeclineCodeAcquirerFraud = 31015,
|
|
362
|
+
ADYDeclineCodeAcquirerCancelled = 31016,
|
|
363
|
+
ADYDeclineCodeAcquirerShopperCancelled = 31017,
|
|
364
|
+
ADYDeclineCodeAcquirerInvalidPin = 31018,
|
|
365
|
+
ADYDeclineCodeAcquirerPinTriesExceeded = 31019,
|
|
366
|
+
ADYDeclineCodeAcquirerPinValidationNotPossible = 31020,
|
|
367
|
+
ADYDeclineCodeNotAllowed = 31021,
|
|
368
|
+
ADYDeclineCodeCardRemoved = 31022,
|
|
369
|
+
ADYDeclineCodeUnknown = 31999
|
|
370
|
+
} ;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Class for objects containing information about the reason
|
|
374
|
+
* a transaction was declined.
|
|
375
|
+
*/
|
|
376
|
+
@interface ADYDeclineInfo : NSObject
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Code indicating the reason a transaction was declined.
|
|
380
|
+
*
|
|
381
|
+
* Possible values are:
|
|
382
|
+
*
|
|
383
|
+
* - `ADYDeclineCodePSPCouldNotDetermineVariant` (31000): PSP could not determine variant
|
|
384
|
+
* - `ADYDeclineCodePSPDoesNotSupportPaymentDetails` (31001): PSP does not support payment method (card not supported)
|
|
385
|
+
* - `ADYDeclineCodeDeviceSignatureFailed` (31002): Signature was not approved
|
|
386
|
+
* - `ADYDeclineCodeAcquirerDeclined` (31003): Acquirer declined transaction
|
|
387
|
+
* - `ADYDeclineCodeAcquirerReferral` (31004): Merchant should contact acquirer
|
|
388
|
+
* - `ADYDeclineCodeAcquirerError` (31005): Acquirer error
|
|
389
|
+
* - `ADYDeclineCodeAcquirerBlockCard` (31006): Card is blocked
|
|
390
|
+
* - `ADYDeclineCodeAcquirerCardExpired` (31007): Card is expired
|
|
391
|
+
* - `ADYDeclineCodeAcquirerInvalidAmount` (31008): ADYAmount is invalid
|
|
392
|
+
* - `ADYDeclineCodeAcquirerInvalidCard` (31009): Card is invalid
|
|
393
|
+
* - `ADYDeclineCodeAcquirerIssuerUnavailable` (31010): Issuer is unavailable
|
|
394
|
+
* - `ADYDeclineCodeAcquirerNotSupported` (31011): Acquirer is not supported
|
|
395
|
+
* - `ADYDeclineCodeAcquirerNot3DAuthenticated` (31012): No 3D authentication was performed
|
|
396
|
+
* - `ADYDeclineCodeAcquirerNotEnoughBalance` (31013): Not enough balance on card
|
|
397
|
+
* - `ADYDeclineCodeAcquirerPending` (31014): Pending
|
|
398
|
+
* - `ADYDeclineCodeAcquirerFraud` (31015): Fraud
|
|
399
|
+
* - `ADYDeclineCodeAcquirerCancelled` (31016): Cancelled
|
|
400
|
+
* - `ADYDeclineCodeAcquirerShopperCancelled` (31017): Shopper cancelled
|
|
401
|
+
* - `ADYDeclineCodeAcquirerInvalidPin` (31018): Invalid PIN
|
|
402
|
+
* - `ADYDeclineCodeAcquirerPinTriesExceeded` (31019): Number of PIN attempts exceeded
|
|
403
|
+
* - `ADYDeclineCodeAcquirerPinValidationNotPossible` (31020): Pin validation not possible
|
|
404
|
+
* - `ADYDeclineCodeUnknown` (31999): Unknown decline reason
|
|
405
|
+
*/
|
|
406
|
+
@property (nonatomic, readonly) ADYDeclineCode code;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Human-readable message containing the reason for declination.
|
|
410
|
+
*/
|
|
411
|
+
@property (readonly) NSString *message;
|
|
412
|
+
|
|
413
|
+
- (instancetype)initWithCode:(ADYDeclineCode)code;
|
|
414
|
+
|
|
415
|
+
- (instancetype)initWithUnknownReason:(NSString *)unknownReason;
|
|
416
|
+
@end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYTransactionDetails.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 5/23/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@class ADYAmount;
|
|
12
|
+
@class ADYReceipt;
|
|
13
|
+
|
|
14
|
+
@interface ADYTransactionDetails : NSObject
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Code indicating state of the transaction.
|
|
18
|
+
*
|
|
19
|
+
* Possible values are:
|
|
20
|
+
*
|
|
21
|
+
* - "APPROVED"
|
|
22
|
+
* - "DECLINED"
|
|
23
|
+
* - "CANCELLED"
|
|
24
|
+
* - "ERROR"
|
|
25
|
+
* - "PROCESSING_TENDER"
|
|
26
|
+
*/
|
|
27
|
+
@property (strong, nonatomic) NSString *state;
|
|
28
|
+
|
|
29
|
+
@property (strong, nonatomic) ADYAmount *amount;
|
|
30
|
+
@property (strong, nonatomic) NSString *tenderReference;
|
|
31
|
+
@property (strong, nonatomic) NSString *pspReference;
|
|
32
|
+
@property (strong, nonatomic) NSString *merchantReference;
|
|
33
|
+
@property (strong, nonatomic) NSString *timestamp;
|
|
34
|
+
@property (strong, nonatomic) NSString *capturePending;
|
|
35
|
+
@property (strong, nonatomic) NSString *transactionType;
|
|
36
|
+
@property (strong, nonatomic) NSString *maskedPan;
|
|
37
|
+
@property (strong, nonatomic) NSString *posEntryMode;
|
|
38
|
+
|
|
39
|
+
@property (strong, nonatomic) NSString *authCode DEPRECATED_MSG_ATTRIBUTE("This property will be removed on next library version.");
|
|
40
|
+
@property (nonatomic, strong) NSMutableDictionary *additionalData DEPRECATED_MSG_ATTRIBUTE("This property will be removed on next library version.");
|
|
41
|
+
|
|
42
|
+
@property (strong, nonatomic) NSArray<ADYReceipt *> *merchantReceipts;
|
|
43
|
+
@property (strong, nonatomic) NSArray<ADYReceipt *> *cardHolderReceipts;
|
|
44
|
+
|
|
45
|
+
@end
|