@aptos-scp/scp-component-rn-device-services 0.3.0 → 0.5.0

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.
Files changed (101) hide show
  1. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit +0 -0
  2. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/Info.plist +0 -0
  3. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/VersionInfo.plist +0 -0
  4. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.2.mom +0 -0
  5. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.3.mom +0 -0
  6. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.mom +0 -0
  7. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.omo +0 -0
  8. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.mom +0 -0
  9. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.8.6.mom +0 -0
  10. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.9.mom +0 -0
  11. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit.mom +0 -0
  12. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAccountData.h +26 -0
  13. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAdditionalDataRequest.h +38 -0
  14. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAmount.h +16 -0
  15. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAppData.h +26 -0
  16. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYBalance.h +13 -0
  17. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCashTransactionRequest.h +35 -0
  18. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYConstants.h +688 -0
  19. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCurrency.h +33 -0
  20. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDevice.h +308 -0
  21. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceData.h +52 -0
  22. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceManagerDelegate.h +66 -0
  23. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceRegistry.h +125 -0
  24. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDynamicCurrencyConversionData.h +22 -0
  25. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYErrors.h +153 -0
  26. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCard.h +41 -0
  27. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceRequest.h +50 -0
  28. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceResponse.h +38 -0
  29. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequest.h +78 -0
  30. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequestDelegate.h +25 -0
  31. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadResponse.h +31 -0
  32. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardMask.h +31 -0
  33. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardRequest.h +13 -0
  34. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLocationManager.h +14 -0
  35. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLoginDelegate.h +80 -0
  36. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYPrintReceiptRequest.h +57 -0
  37. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceipt.h +33 -0
  38. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceiptLine.h +92 -0
  39. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReferralRequest.h +16 -0
  40. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYRefundData.h +54 -0
  41. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYServerSynchronization.h +18 -0
  42. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSignatureRequest.h +117 -0
  43. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSpecialTransactionRequest.h +63 -0
  44. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYToneGenerator.h +45 -0
  45. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionData.h +416 -0
  46. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionDetails.h +45 -0
  47. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionProcessorDelegate.h +279 -0
  48. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionRequest.h +108 -0
  49. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYUIKit.h +30 -0
  50. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/Adyen.h +591 -0
  51. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit-umbrella.h +59 -0
  52. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit.h +79 -0
  53. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSData+ADY.h +31 -0
  54. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSString+ADY.h +19 -0
  55. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/adylog.h +176 -0
  56. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Info.plist +0 -0
  57. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Modules/module.modulemap +6 -0
  58. package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.h +40 -0
  59. package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.m +28 -0
  60. package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.h +23 -0
  61. package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.m +15 -0
  62. package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.h +19 -0
  63. package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.m +31 -0
  64. package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.h +19 -0
  65. package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.m +26 -0
  66. package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.h +26 -0
  67. package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.m +148 -0
  68. package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.h +19 -0
  69. package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.m +457 -22
  70. package/ios/SCPRNDeviceServices.xcodeproj/project.pbxproj +56 -0
  71. package/lib/AdyenDevice/AdyenDevice.d.ts +56 -0
  72. package/lib/AdyenDevice/AdyenDevice.js +350 -0
  73. package/lib/AdyenDevice/AdyenDevice.js.map +1 -0
  74. package/lib/AdyenDevice/constants.d.ts +12 -0
  75. package/lib/AdyenDevice/constants.js +228 -0
  76. package/lib/AdyenDevice/constants.js.map +1 -0
  77. package/lib/AdyenDevice/index.d.ts +1 -0
  78. package/lib/AdyenDevice/index.js +7 -0
  79. package/lib/AdyenDevice/index.js.map +1 -0
  80. package/lib/AdyenDevice/interfaces.d.ts +175 -0
  81. package/lib/AdyenDevice/interfaces.js +3 -0
  82. package/lib/AdyenDevice/interfaces.js.map +1 -0
  83. package/lib/AurusDevice/AurusDevice.js +1 -1
  84. package/lib/AurusDevice/AurusDevice.js.map +1 -1
  85. package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.d.ts +1 -2
  86. package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js +4 -4
  87. package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js.map +1 -1
  88. package/lib/PaymentDeviceFactory.d.ts +1 -1
  89. package/lib/PaymentDeviceFactory.js +1 -1
  90. package/lib/ScannerDeviceFactory.d.ts +1 -1
  91. package/lib/ScannerDeviceFactory.js +2 -2
  92. package/lib/ScannerDeviceFactory.js.map +1 -1
  93. package/lib/configs/inversify/inversify.config.js +4 -2
  94. package/lib/configs/inversify/inversify.config.js.map +1 -1
  95. package/lib/constants/constants.d.ts +26 -26
  96. package/lib/constants/constants.js +26 -29
  97. package/lib/constants/constants.js.map +1 -1
  98. package/lib/interfaces/payment/messages/requests.d.ts +1 -2
  99. package/lib/interfaces/payment/messages/responses.d.ts +2 -3
  100. package/package.json +8 -6
  101. package/types/money-works/index.d.ts +0 -49
@@ -0,0 +1,688 @@
1
+ //
2
+ // ADYConstants.h
3
+ // AdyenPOSLib
4
+ //
5
+ // Created by Willem Lobbezoo on 13-04-13.
6
+ //
7
+ //
8
+
9
+ #ifndef AdyenPOSLib_ADYConstants_h
10
+ #define AdyenPOSLib_ADYConstants_h
11
+
12
+ #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
13
+ #define PLATFORM_IOS 1
14
+ #elif TARGET_OS_MAC
15
+ #define PLATFORM_OSX 1
16
+ #else
17
+ #define PLATFORM_OTHER 1
18
+ #endif
19
+
20
+ /**-------------------------------------------------------------------------------------------------
21
+ * @name Device Boarding States
22
+ * ------------------------------------------------------------------------------------------------
23
+ */
24
+
25
+ /** **Boarding States**
26
+
27
+ When a payment device is boarded, a process will take place, which will run fully automatic,
28
+ but the App will be informed of state changes, so the GUI can be updated to teflect those state
29
+ changes. The device boarding process contains five steps.
30
+
31
+ The first step is to contact the payment device and ask it to identify itself. The payment device
32
+ is identified by for instance brand, model, serial number, etc.
33
+
34
+ - **ADYBoardingStateDeviceIdentification**
35
+ - **ADYBoardingStateDeviceIdentified**
36
+ - **ADYBoardingStateDeviceIdentificationFailed**
37
+
38
+ The second step is to contact the Adyen system and let it know that a new payment device needs to
39
+ be added to the collection of the payment devices owned by the merchant. These devices and their
40
+ configuration can be viewed in the Adyen back office. The configuration can be changed there
41
+ as well, and once done, it will automatically populate to the payment device.
42
+
43
+ - **ADYBoardingStateDeviceRegistration**
44
+ - **ADYBoardingStateDeviceRegistered**
45
+ - **ADYBoardingStateDeviceRegistrationFailed**
46
+
47
+ The third step is to load the configuration of the new payment device from the Adyen system,
48
+ so it can be stored on the payment device.
49
+
50
+ - **ADYBoardingStateDevicePSPSync**
51
+ - **ADYBoardingStateDevicePSPSynced**
52
+ - **ADYBoardingStateDevicePSPSyncFailed**
53
+
54
+ The fourth step is to store the loaded configuration on to the payment device.
55
+
56
+ - **ADYBoardingStateDeviceConfigurationSync**
57
+ - **ADYBoardingStateDeviceConfigurationSynced**
58
+ - **ADYBoardingStateDeviceConfigurationSyncFailed**
59
+
60
+ The fifth step is to check if the payment device is successfully loaded and can be operated to
61
+ perform transactions.
62
+
63
+ - **ADYBoardingStateDeviceConfigurationCheck**
64
+ - **ADYBoardingStateDeviceConfigurationChecked**
65
+ - **ADYBoardingStateDeviceConfigurationCheckFailed**
66
+
67
+ Each of these steps has three states, basically the step has started, the step has completed,
68
+ the step failed. The values of the enum for each step are self explanatory.
69
+
70
+ */
71
+
72
+ typedef NS_ENUM(NSUInteger, ADYBoardingState) {
73
+ /// step 1: identify payment device and get its credentials
74
+ ADYBoardingStateDeviceIdentification,
75
+ ADYBoardingStateDeviceIdentified,
76
+ ADYBoardingStateDeviceIdentificationFailed,
77
+
78
+ /// step 2: register device with the Adyen system
79
+ ADYBoardingStateDeviceRegistration,
80
+ ADYBoardingStateDeviceRegistered,
81
+ ADYBoardingStateDeviceRegistrationFailed,
82
+
83
+ /// step 3: load the payment device configuration from the Adyen system
84
+ ADYBoardingStateDevicePSPSync,
85
+ ADYBoardingStateDevicePSPSynced,
86
+ ADYBoardingStateDevicePSPSyncFailed,
87
+
88
+ /// step 4: store the configuration on the payment device
89
+ ADYBoardingStateDeviceConfigurationSync,
90
+ ADYBoardingStateDeviceConfigurationSynced,
91
+ ADYBoardingStateDeviceConfigurationSyncFailed,
92
+
93
+ /// step 5: check if the configuration has been stored on the payment device
94
+ ADYBoardingStateDeviceConfigurationCheck,
95
+ ADYBoardingStateDeviceConfigurationChecked,
96
+ ADYBoardingStateDeviceConfigurationCheckFailed
97
+ };
98
+
99
+
100
+ /**-------------------------------------------------------------------------------------------------
101
+ * @name Transaction Options
102
+ * ------------------------------------------------------------------------------------------------
103
+ */
104
+
105
+ /** **Transaction options**
106
+
107
+ The following tender options may be specified in the options dictionary,
108
+ which is used in the ADYTransactionRequest, which kicks off a new transaction:
109
+
110
+ **ADYTransactionOptionReferenceKey**
111
+ This defines the merchant reference of the transaction,
112
+ which uniquely identifies the transaction for the merchant.
113
+
114
+ **ADYTransactionOptionShopperReferenceKey**
115
+ This defines the shopper reference, which uniquely identifies the
116
+ shopper. It can be used for recurring transactions.
117
+
118
+ **ADYTransactionOptionShopperEmailKey**
119
+ This defines the shopper email address.
120
+ It can be used for recurring transactions.
121
+
122
+ **ADYTransactionOptionShopperRecurringContractKey**
123
+ See the "Recurring Payment Manual", possible values
124
+
125
+ **ADYTransactionOptionShopperRecurringContractOneClick**
126
+ The shopper chooses whether to allow their credit card data to be stored for future use. The
127
+ card's security code (CSC/CVC) must be provided during subsequent payments.
128
+
129
+ **ADYTransactionOptionShopperRecurringContractRecurring**
130
+ Credit card data is stored for future use. The card's security code (CSC/CVC) is not required
131
+ for subsequent payments.
132
+
133
+ **ADYTransactionOptionShopperRecurringContractBoth**
134
+ Combination of the above
135
+
136
+ **ADYTransactionOptionLocationKey DEPRECATED**
137
+ The location is determined by the lib itself.
138
+
139
+ This is a CLLocation object that defines the geographical location of
140
+ the place where the transaction took place.
141
+
142
+ **ADYTransactionOptionLogoKey**
143
+ This is a UIImage that will be used to display a logo on the receipt.
144
+
145
+ **ADYTransactionOptionCustomReceiptLinesKey**
146
+ Additional receipt lines to be added to the final receipt.
147
+
148
+ **ADYTransactionOptionCustomReceiptHandler**
149
+ true : The Receipt will not be printed by the internal device printer.
150
+
151
+ **ADYTransactionOptionShopperLocaleKey**
152
+ This is the shopper locale used during the transaction on the Shuttle.
153
+
154
+ **ADYTransactionOptionAdditionalDataKey**
155
+ true : an additional call will be made to the back end to connect to a merchant
156
+ loyalty system and present data from that loyalty system at an early stage
157
+ of transaction processing. The "TransactionProvidesAdditionalData" callback
158
+ will be invoked in the ADYTransactionProcessorDelegate.
159
+ The same functionality is used to provide a cardalias and will provide the
160
+ Global Blue data.
161
+
162
+ **ADYTransactionOptionAskGratuity**
163
+ true : the Shuttle will ask for gratuity (tipping)
164
+
165
+ **ADYTransactionOptionSetGratuity**
166
+ Here the app can set the gratuity amount as an NSNumber in minor units
167
+
168
+ **ADYTransactionOptionManualKeyedEntry**
169
+ true: the Shuttle will ask for manually entering the card details
170
+
171
+ **ADYTransactionOptionBypassPin**
172
+ true: Bypass PIN
173
+
174
+ **ADYTransactionOptionAllowPartialAuthorisation**
175
+ Allow partial authorisations.
176
+
177
+ **ADYTransactionOptionDisableContactless**
178
+ true: Disable Contactless payments
179
+
180
+ **ADYTransactionOptionPaymentVerificationDataKey**
181
+ possible value: "populate", this is used when the Shuttle is used via quick integration,
182
+ via the HPP
183
+
184
+ **ADYTransactionOptionAllowShopperAIDSelection**
185
+ Allow shopper to select AID on terminal.
186
+
187
+ **ADYTransactionOptionMOTO**
188
+ Triggers MOTO transaction on the terminal.
189
+
190
+ */
191
+
192
+ extern NSString *const ADYTransactionOptionReferenceKey;
193
+ extern NSString *const ADYTransactionOptionShopperReferenceKey;
194
+ extern NSString *const ADYTransactionOptionShopperEmailKey;
195
+ //extern NSString * const ADYTransactionOptionLocationKey; // deprecated, the location is determined by the lib itself
196
+ extern NSString *const ADYTransactionOptionLogoKey;
197
+ extern NSString *const ADYTransactionOptionCustomReceiptLinesKey;
198
+ extern NSString *const ADYTransactionOptionCustomReceiptHandler;
199
+ extern NSString *const ADYTransactionOptionShopperLocaleKey;
200
+ extern NSString *const ADYTransactionOptionShopperRecurringContractKey;
201
+
202
+ //extern NSString * const ADYTransactionOptionShopperRecurringDetailNameKey;
203
+ extern NSString *const ADYTransactionOptionAskGratuity;
204
+ extern NSString *const ADYTransactionOptionSetGratuity;
205
+ extern NSString *const ADYTransactionOptionManualKeyedEntry;
206
+ extern NSString *const ADYTransactionOptionDisableContactless;
207
+ extern NSString *const ADYTransactionOptionBypassPin;
208
+ extern NSString *const ADYTransactionOptionAllowPartialAuthorisation;
209
+ extern NSString *const ADYTransactionOptionAllowShopperAIDSelection;
210
+ extern NSString *const ADYTransactionOptionMOTO;
211
+
212
+ //extern NSString * const ADYTransactionOptionLoyaltyDataKey; // renamed to ADYTransactionOptionAdditionalDataKey, to properly reflect it's function
213
+ extern NSString *const ADYTransactionOptionAdditionalDataKey;
214
+ extern NSString *const ADYTransactionOptionPaymentVerificationDataKey;
215
+
216
+ // Possible values for ADYTransactionOptionShopperRecurringContractKey
217
+ extern NSString *const ADYTransactionOptionShopperRecurringContractOneClick;
218
+ extern NSString *const ADYTransactionOptionShopperRecurringContractRecurring;
219
+ extern NSString *const ADYTransactionOptionShopperRecurringContractBoth;
220
+
221
+ //Additional data keys
222
+ extern NSString *const ADYTransactionAdditionalDataShopperEmailKey;
223
+ extern NSString *const ADYTransactionAdditionalDataShopperReferenceKey;
224
+ extern NSString *const ADYTransactionAdditionalDataLoyaltyDataKey;
225
+ extern NSString *const ADYTransactionAdditionalDataCardIssuerCountryKey;
226
+ extern NSString *const ADYTransactionAdditionalDataCardBinKey;
227
+ extern NSString *const ADYTransactionAdditionalDataCardTypeKey;
228
+ extern NSString *const ADYTransactionAdditionalDataAliasKey;
229
+ extern NSString *const ADYTransactionAdditionalDataRecurringContractKey;
230
+
231
+ /**-------------------------------------------------------------------------------------------------
232
+ * @name Tender States
233
+ * ------------------------------------------------------------------------------------------------
234
+ */
235
+
236
+ /** **Tender States**
237
+
238
+ A Tender is progressing through a sequence of different states. The App must continue processing
239
+ until one of the final tender states has been reached. Only then has the tender finished.
240
+ These states can be used to indicate progress in the App.
241
+
242
+ The following will describe the various tender states that the tender might go through,
243
+ in a chronological order.
244
+
245
+ **In Process Tender States**
246
+
247
+ The tender will start from its initial state and progress through the tender created state into the
248
+ processing state. Please note that states can be skipped, i.e. a tender might progress from its
249
+ initial state right towards any other state.
250
+
251
+ - *ADYTenderStateInitial*
252
+ This is the initial state where the tender will start from.
253
+
254
+ - *ADYTenderStateCreated*
255
+ This is the state where the tender has been created in the payment device and a transaction is
256
+ born. From this state onwards, transactions will be recorded in the transaction history,
257
+ independent of the final state of such transaciton.
258
+
259
+ - *ADYTenderStateProcessing*
260
+ This is the state after tender creation where the transaction is in progress.
261
+
262
+ Optionally the payment device might support Manual Key Entry (MKE) processing. When manual key
263
+ entry is performed from the App, the following two tender states are relevant.
264
+
265
+ - *ADYTenderStateProvideCardDetails*
266
+ The payment device is waiting for the card details to be provided by the App.
267
+
268
+ - *ADYTenderStateCardDetailsProvided*
269
+ The payment device has receievd the provided card details and is processing these.
270
+
271
+ Once the card has been read, there is an optional feature to contact an external system, in general
272
+ a merchant back office system, where based upon the card number read, information is retrieved from
273
+ the merchant back office to be made available to the App.
274
+
275
+ This is typically done for loyalty systems, where the card number may not be revealed to the App,
276
+ due to PCI rules and regulations. The card number can be used as the key to the shopper data,
277
+ and when retrieved, this data is fed back to the App as additional data. The payment device will
278
+ collect this information autonomously and fully DUKPT encrypted, so this information exchange
279
+ is invisible to the App and the App does not have access to this information flow. The App will
280
+ only have access to the information passed on to it.
281
+
282
+ The App can then decide based upon this information whether or not the transaciton details will
283
+ be changed, typically the amount (discount), but other data could be changed as well.
284
+
285
+ - *ADYTenderStateAdditionalDataAvailable*
286
+ Additional data is available and is passed to the App.
287
+
288
+ - *ADYTenderStateWaitForAmountAdjustment*
289
+ The payment device is waiting for any tender updates the App might decide to,
290
+ based upon the information passed to the App in the previous state.
291
+
292
+ During the transaction the payment device might need to request a referral. A referral takes place
293
+ when a transaction is sent for authorisation to the Acquiring and Issueing banks, during which
294
+ prerocess, the Issueing bank requires the merchant to make a phonecall to the Issueing bank in
295
+ order to get a verbal authorisation code. This code then needs to be communicated back to the
296
+ payment device by the App.
297
+
298
+ - *ADYTenderStateReferral*
299
+ The Issueing bank requests a referral (not implemented yet)
300
+
301
+ - *ADYTenderStateReferralChecked*
302
+ The authorisation code, as retrieved form the Issueing bank, is sent to the payment device.
303
+
304
+ During the transaction the payment device might need to request a signature from the shopper,
305
+ which signature my be provided on paper or by electronic means, like using the iOS device to
306
+ capture the signature. When the signature is captured on the iOS device, the signature needs
307
+ to be passed back to the payment device. The payment device will communicate this to the Adyen
308
+ system, so the signature can be viewed in the Adyen Back Office. In both cases
309
+ (signature on screen/signature on paper) the merchant needs to confirm whether he/she accepts the
310
+ signature or rejects it. When it is rejected, the transaction will be declined. However, the App
311
+ may never assume the transaction will be declined, it needs to continue and wait for the final
312
+ state as it will be presented by the payment device.
313
+
314
+ - *ADYTenderStateCheckSignature*
315
+ The signature needs to be recorded/checked.
316
+
317
+ - *ADYTenderStateSignatureChecked*
318
+ The signature has been recorded/processed.
319
+
320
+ During the transaction there can be multiple situations where a receipt needs to be printed
321
+ (or made available to the shopper by other means, like email). The simple situation is where
322
+ ONE receipt is printed at the end of the transaction that say is APPROVED or DECLINED.
323
+
324
+ A situation where two receipts will need to be handled is when a signature on paper is requested,
325
+ after which the shopper needs to sign and the merchant needs to check if the signature will be
326
+ accepted or not. In the case it is not accepted, another void receipt will have to be printed or
327
+ made available to the shopper. Also in case of an error, or a cancelled transaction, a void
328
+ receipts may need to be printed or made available to the shopper. So, it is really important that
329
+ the App can handle the processing of multiple receipts. There can be one, two or more receipts.
330
+
331
+ The receipts will be sent by the payment device to the Adyen Back Office as well, so these can be
332
+ viewed there as part of each transaction.
333
+
334
+ Please note that when mentioning a "receipt", it in fact is already a set of two receipts,
335
+ the merchant receipt and the shopper receipt.
336
+
337
+ - *ADYTenderStatePrintReceipt*
338
+ The receipt is provided to the App and needs to be processed.
339
+
340
+ - *ADYTenderStateReceiptPrinted*
341
+ The receipt has been processed.
342
+
343
+ - *ADYTenderStateWaitingForAppSelection*
344
+ The payment method is being selected.
345
+
346
+ - *ADYTenderStateAppSelected*
347
+ The payment method has been selected. The selected payment method is passed to the
348
+ `ADYTransactionProcessorDelegate` function `transactionApplicationSelected:`.
349
+
350
+ - *ADYTenderStateWaitingForPin*
351
+ The payment device is waiting for the customer to enter their PIN.
352
+
353
+ - *ADYTenderStatePinDigitEntered*
354
+ The customer has entered a PIN digit. The total number of digits provided is passed to the
355
+ `ADYTransactionProcessorDelegate` function `transactionPinDigitEntered:`.
356
+
357
+ - *ADYTenderStatePinEntered*
358
+ The customer has completed entering their PIN.
359
+
360
+ - *ADYTenderStateCardSwiped*
361
+ The customer swiped a payment card through the swipe slot.
362
+
363
+ - *ADYTenderStateCardInserted*
364
+ The customer inserted their card into the EMV slot.
365
+
366
+ - *ADYTenderStateCardRemoved*
367
+ The customer removed their card from the EMV slot.
368
+
369
+ - *ADYTenderStateAskDcc*
370
+ The customer is being asked if Dynamic Currency Conversion should be applied
371
+
372
+ - *ADYTenderStateDccAccepted*
373
+ The customer accepted the Dynamic Currency Conversion
374
+
375
+ - *ADYTenderStateDccRejected*
376
+ The customer rejected Dynamic Currency Conversion
377
+
378
+
379
+ **Final Tender States**
380
+
381
+ - *ADYTenderStateApproved*
382
+ The transaction has been completed with result: APPROVED
383
+
384
+ - *ADYTenderStateDeclined*
385
+ The transaction has been completed with result: DECLINED
386
+
387
+ - *ADYTenderStateCancelled*
388
+ The transaction has been completed with result: CANCELLED
389
+
390
+ - *ADYTenderStateError*
391
+ The transaction has been completed with result: ERROR
392
+
393
+ - *ADYTenderStateUnknown*
394
+ The transaction has been completed with the result: UNKNOWN.
395
+ To fetch the final state of the transaction, query the payment device for the transaction details
396
+ by calling `- [ADYDevice fetchLastTransactionsWithCompletion:]`
397
+ or `- [ADYDevice fetchTransactionWithTenderReference:completion:]`.
398
+
399
+ **Miscellaneous Tender States**
400
+
401
+ The miscellaneous tender states are for reference only and should not occur.
402
+ If they occur, they can be ignored.
403
+
404
+ - *ADYTenderStateRetrying**
405
+ - *ADYTenderStatePending**
406
+ - *ADYTenderStateAcknowledged**
407
+ For reference ony, this state should never be reached
408
+ */
409
+ typedef NS_ENUM(NSUInteger, ADYTenderState) {
410
+ // in process tender states
411
+
412
+ ADYTenderStateInitial,
413
+ ADYTenderStateCreated,
414
+
415
+ ADYTenderStateProcessing,
416
+
417
+ ADYTenderStateAdditionalDataAvailable,
418
+ ADYTenderStateWaitForAmountAdjustment,
419
+
420
+ ADYTenderStateAmountAdjusted,
421
+
422
+ ADYTenderStateProvideCardDetails,
423
+ ADYTenderStateCardDetailsProvided,
424
+
425
+ ADYTenderStateAskSignature,
426
+ ADYTenderStateCheckSignature,
427
+ ADYTenderStateSignatureChecked,
428
+
429
+ ADYTenderStateReferral,
430
+ ADYTenderStateReferralChecked,
431
+
432
+ ADYTenderStatePrintReceipt,
433
+ ADYTenderStateReceiptPrinted,
434
+
435
+ ADYTenderStateWaitingForAppSelection,
436
+ ADYTenderStateAppSelected,
437
+ ADYTenderStateWaitingForPin,
438
+ ADYTenderStatePinDigitEntered,
439
+ ADYTenderStatePinEntered,
440
+
441
+ ADYTenderStateAskGratuity,
442
+ ADYTenderStateGratuityEntered,
443
+
444
+ ADYTenderStateAskDcc,
445
+ ADYTenderStateDccAccepted,
446
+ ADYTenderStateDccRejected,
447
+
448
+ ADYTenderStateBeepOk,
449
+ ADYTenderStateBeepAlert,
450
+
451
+ ADYTenderStateAskSwipeCard,
452
+ ADYTenderStateCardSwiped,
453
+ ADYTenderStateAskInsertCard,
454
+ ADYTenderStateCardInserted,
455
+ ADYTenderStateCardRemoved,
456
+ ADYTenderStateAskPresentCard,
457
+ ADYTenderStateCardPresented,
458
+
459
+ // Card errors
460
+ ADYTenderStateCardErrorChipFailed,
461
+ ADYTenderStateCardErrorChipFailedTrySwipe,
462
+ ADYTenderStateCardErrorReadFailed,
463
+ ADYTenderStateCardErrorNotSupportedUseICC,
464
+ ADYTenderStateCardErrorChipFailedReaderError,
465
+ ADYTenderStateCardErrorNotAccepted,
466
+ ADYTenderStateCardErrorNotAcceptedTrySwipe,
467
+ ADYTenderStateCardErrorApplicationBlocked,
468
+ ADYTenderStateCardErrorFallback,
469
+ ADYTenderStateCardErrorNotSupported,
470
+ ADYTenderStateCardErrorNotAllowed,
471
+
472
+ ADYTenderStateWaitingEndStateConfirmation,
473
+ ADYTenderStateSummary,
474
+
475
+ // final tender states
476
+ ADYTenderStateApproved,
477
+ ADYTenderStateDeclined,
478
+ ADYTenderStateCancelled,
479
+ ADYTenderStateError,
480
+ ADYTenderStateEnd,
481
+
482
+ // Miscellaneous tender states
483
+ ADYTenderStateRetrying,
484
+ ADYTenderStatePending,
485
+ ADYTenderStateAcknowledged,
486
+ ADYTenderStateUnknown
487
+
488
+ };
489
+
490
+ typedef NS_ENUM(NSInteger, ADYFinalTenderState) {
491
+ ADYFinalTenderStateNotFinal = -1,
492
+ ADYFinalTenderStateApproved = ADYTenderStateApproved,
493
+ ADYFinalTenderStateDeclined = ADYTenderStateDeclined,
494
+ ADYFinalTenderStateCancelled = ADYTenderStateCancelled,
495
+ ADYFinalTenderStateError = ADYTenderStateError,
496
+ ADYFinalTenderStateUnknown = ADYTenderStateUnknown
497
+ };
498
+
499
+
500
+ /**
501
+ * *ADYTenderResultCodeAPPROVED* or *ADYTenderResultCodePARTIALLY_APPROVED*;
502
+ * the latter meaning additional authorization is required.
503
+ *
504
+ * Others to indicate the reason the transaction did not succeed.
505
+ *
506
+ * *ADYTenderResultCodeWITHDRAWAL_AMOUNT_EXCEEDED* and
507
+ * *ADYTenderResultCodeWITHDRAWAL_COUNT_EXCEEDED* indicate an Issuer set NFC limit has been encountered.
508
+ * Return the transaction with NFC disabled or instruct cardholder to use ICC/MSR.
509
+ */
510
+
511
+ typedef NS_ENUM(NSInteger, ADYTenderResultCode) {
512
+ ADYTenderResultCodeUNMATCHED,
513
+ ADYTenderResultCodeUNKNOWN,
514
+ ADYTenderResultCodeAPPROVED,
515
+ ADYTenderResultCodePARTIALLY_APPROVED,
516
+ ADYTenderResultCodeDECLINED,
517
+ ADYTenderResultCodeREFERRAL,
518
+ ADYTenderResultCodeERROR,
519
+ ADYTenderResultCodeBLOCK_CARD,
520
+ ADYTenderResultCodeCARD_EXPIRED,
521
+ ADYTenderResultCodeINVALID_AMOUNT,
522
+ ADYTenderResultCodeINVALID_CARD,
523
+ ADYTenderResultCodeISSUER_UNAVAILABLE,
524
+ ADYTenderResultCodeNOT_SUPPORTED,
525
+ ADYTenderResultCodeNOT_ENOUGH_BALANCE,
526
+ ADYTenderResultCodePENDING,
527
+ ADYTenderResultCodeCANCELLED,
528
+ ADYTenderResultCodeACQUIRER_FRAUD,
529
+ ADYTenderResultCodeFRAUD,
530
+ ADYTenderResultCodeSHOPPER_CANCELLED,
531
+ ADYTenderResultCodeINVALID_PIN,
532
+ ADYTenderResultCodePIN_TRIES_EXCEEDED,
533
+ ADYTenderResultCodePIN_VALIDATION_NOT_POSSIBLE,
534
+ ADYTenderResultCodeWITHDRAWAL_AMOUNT_EXCEEDED,
535
+ ADYTenderResultCodeWITHDRAWAL_COUNT_EXCEEDED,
536
+ ADYTenderResultCodeTERMINAL_IN_USE,
537
+ ADYTenderResultCodeRECEIPT_NOT_PRINTED,
538
+ ADYTenderResultCodeTERMINAL_UNAVAILABLE,
539
+ ADYTenderResultCodeINVALID_MERCHANT,
540
+ ADYTenderResultCodeUNFINISHED_TENDER,
541
+ ADYTenderResultCodeTERMINAL_NOT_CONFIGURED,
542
+ ADYTenderResultCodeNOT_SUBMITTED,
543
+ ADYTenderResultCodeFRAUD_CANCELLED,
544
+ ADYTenderResultCodeTRANSACTION_NOT_PERMITTED,
545
+ ADYTenderResultCodeCVC_DECLINED,
546
+ ADYTenderResultCodeRESTRICTED_CARD,
547
+ ADYTenderResultCodeREVOCATION_OF_AUTH,
548
+ ADYTenderResultCodeDECLINED_NON_GENERIC,
549
+ ADYTenderResultCodeISSUER_SUSPECTED_FRAUD,
550
+ };
551
+
552
+ /**-------------------------------------------------------------------------------------------------
553
+ * @name Card Schemes
554
+ * ------------------------------------------------------------------------------------------------
555
+ */
556
+
557
+ /**
558
+ **Card Schemes**
559
+
560
+ Here is the enumeration of supported card schemes.
561
+
562
+ Currently Adyen supports the Mastercard, Visa and Amex brands,
563
+ including all their sub-brands, be it debit or credit.
564
+
565
+ Possible values:
566
+ VISA
567
+ MC
568
+ AMEX
569
+ JCB
570
+ SOLO
571
+ MAESTRO
572
+ DINERS
573
+ VISADANKORT
574
+ ELECTRON
575
+ DANKORT
576
+ MCDEBIT
577
+ BCMC
578
+ LASER
579
+ MAESTROUK
580
+ DISCOVER
581
+ BIJENKORF
582
+ */
583
+ typedef NS_ENUM(NSUInteger, ADYCardScheme) {
584
+ ADYCardSchemeError = 0,
585
+ ADYCardSchemeVisaVisa = 1, /// VISA
586
+ ADYCardSchemeVisaElectron = 2,
587
+ ADYCardSchemeVisaVPay = 3,
588
+ ADYCardSchemeVisaPlus = 4,
589
+ ADYCardSchemeVisaDankort = 5,
590
+ ADYCardSchemeMasterCardDebit = 6, /// Mastercard
591
+ ADYCardSchemeMasterCardMaestro = 7,
592
+ ADYCardSchemeMasterCardMaestroUK = 8,
593
+ // ADYCardSchemeMasterCardCirrus = 9, // network, not card type, not implemented
594
+ ADYCardSchemeMasterCardMasterCard = 10,
595
+ ADYCardSchemeAmericanExpress = 11, /// Amex
596
+ ADYCardSchemeJCB = 12,
597
+ ADYCardSchemeDinersClub = 13,
598
+ ADYCardSchemeDankort = 14,
599
+ ADYCardSchemeDiscover = 15,
600
+ ADYCardSchemeLaser = 16,
601
+ ADYCardSchemeBCMC = 17,
602
+ ADYCardSchemeSolo = 18,
603
+ ADYCardSchemeBijenkorf = 19, /// BIJENKORF
604
+ ADYCardSchemeCUP = 20,
605
+ };
606
+
607
+ /**-------------------------------------------------------------------------------------------------
608
+ * @name Receipt types
609
+ * ------------------------------------------------------------------------------------------------
610
+ */
611
+
612
+ /** **Receipt types**
613
+
614
+ Receipts always come in pairs of two: a Merchant and a Cardholder copy.
615
+ When fetching a receipt, this enumeration is used to determine which of the
616
+ two is requested.
617
+ */
618
+ typedef NS_ENUM(NSUInteger, ADYReceiptType) {
619
+ ADYReceiptTypeCardholder,
620
+ ADYReceiptTypeMerchant
621
+ };
622
+
623
+ /**-------------------------------------------------------------------------------------------------
624
+ * @name Transaction Types
625
+ * ------------------------------------------------------------------------------------------------
626
+ */
627
+ /** **Transaction types**
628
+ *
629
+ * The type of the `ADYTransactionRequest` determines the behaviour of the transaction.
630
+ *
631
+ * - *ADYTransactionTypeGoodsServices*
632
+ * The default, initiates a normal transaction where the payment is made by the shopper and
633
+ * added to the account of the merchant.
634
+ *
635
+ * - *ADYTransactionTypeRefund*
636
+ * Initiates a refund transaction, where the payment is made by the merchant to the shopper.
637
+ *
638
+ */
639
+ typedef NS_ENUM(NSUInteger, ADYTransactionType) {
640
+ ADYTransactionTypeGoodsServices,
641
+ ADYTransactionTypeRefund,
642
+ ADYTransactionTypeCash
643
+ };
644
+
645
+ /**-------------------------------------------------------------------------------------------------
646
+ * @name Processing states
647
+ * ------------------------------------------------------------------------------------------------
648
+ */
649
+ /**
650
+ * Transactions and refunds can have a `ADYProcessingState` other than `ADYProcessingStateProcessed`
651
+ * if they could not be completed in their entirety and need more processing at a later time. For
652
+ * example: If a transaction fails due to problems with the payment device connection, a technical
653
+ * reversal will be performed to inform the server that the transaction must be cancelled.
654
+ *
655
+ * - *ADYProcessingStateProcessing*
656
+ * The initial state for a transaction/refund
657
+ *
658
+ * - *ADYProcessingStateProcessed*
659
+ * All processing was completed, no further work is required.
660
+ *
661
+ * - *ADYProcessingStateReversalPending*
662
+ * If a technical reversal/refund is required but can't be performed straight away due to internet
663
+ * connection issues, the reversal/refund will remain pending. It will then be performed at a later time.
664
+ *
665
+ * - *ADYProcessingStateReversed*
666
+ * The transaction was reversed with a technical reversal, no further work is required.
667
+ *
668
+ * - *ADYProcessingStateReversalError*
669
+ * The processing could not be performed, no further attempts will be made.
670
+ *
671
+ */
672
+ typedef NS_ENUM(NSUInteger, ADYProcessingState) {
673
+ ADYProcessingStateProcessing, // initial state, while transaction/refund is being performed
674
+ ADYProcessingStateProcessed, // processed normally, nothing to do
675
+ ADYProcessingStateReversalPending, // waiting for a connection so the transaction can be reversed (technical reversal) or so the refund can be performed
676
+ ADYProcessingStateReversed, // transaction reversed (technical reversal), nothing more to do
677
+ ADYProcessingStateReversalError // the technical reversal/refund could not be submitted, no further attempts will be made
678
+ };
679
+
680
+
681
+ #endif
682
+
683
+ @interface ADYConstants : NSObject
684
+
685
+ + (NSString *)stringFromTenderState:(ADYTenderState)state;
686
+ + (NSString *)stringFromProcessingState:(ADYProcessingState)state;
687
+
688
+ @end