@aptos-scp/scp-component-rn-device-services 0.3.0 → 0.4.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.
- 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.xcodeproj/project.pbxproj +56 -0
- package/lib/AdyenDevice/AdyenDevice.d.ts +56 -0
- package/lib/AdyenDevice/AdyenDevice.js +350 -0
- package/lib/AdyenDevice/AdyenDevice.js.map +1 -0
- package/lib/AdyenDevice/constants.d.ts +13 -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.js +1 -1
- package/lib/AurusDevice/AurusDevice.js.map +1 -1
- package/lib/PaymentDeviceFactory.d.ts +1 -1
- package/lib/PaymentDeviceFactory.js +1 -1
- package/lib/ScannerDeviceFactory.d.ts +1 -1
- package/lib/ScannerDeviceFactory.js +2 -2
- package/lib/ScannerDeviceFactory.js.map +1 -1
- package/lib/configs/inversify/inversify.config.js +4 -2
- package/lib/configs/inversify/inversify.config.js.map +1 -1
- package/lib/interfaces/payment/messages/responses.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by Jeroen Bouma on 10/11/13.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
#import <Foundation/Foundation.h>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@interface ADYCurrency : NSObject
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
The short notation of the name of the currency, like EUR for Euros, USD for
|
|
13
|
+
United States Dollars and JPY for Japanese Yen
|
|
14
|
+
*/
|
|
15
|
+
@property (nonatomic, readonly) NSString* abbreviation;
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
The symbol for this currency, like $ for Dollars, € for Euros and ¥ for
|
|
19
|
+
both the Chinese Yuan and Japanese Yen
|
|
20
|
+
*/
|
|
21
|
+
@property (nonatomic, readonly) NSString* symbol;
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
The number of decimal digits this currency has. For example: Euros have
|
|
25
|
+
two fractional digits called cents; EUR 1.887,95. Other currencies like the
|
|
26
|
+
Hungarian HUF have no fractional digits ( HUF 1.887 ) and some have three.
|
|
27
|
+
*/
|
|
28
|
+
@property (nonatomic, readonly) NSUInteger numFractionalDigits;
|
|
29
|
+
|
|
30
|
+
// used by lib to initialize object
|
|
31
|
+
- (instancetype)initWithAbbreviation:(NSString*)abbr symbol:(NSString*)sym numFractionalDigits:(NSUInteger)decimals;
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYDevice.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/26/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@class ADYDeviceData;
|
|
12
|
+
@class ADYTransactionRequest;
|
|
13
|
+
@class ADYGiftCardBalanceRequest;
|
|
14
|
+
@protocol ADYDeviceManagerDelegate;
|
|
15
|
+
@class ADYDeviceRegistry;
|
|
16
|
+
@class ADYReceipt;
|
|
17
|
+
@class ADYGiftCardLoadRequest;
|
|
18
|
+
@class ADYGiftCard;
|
|
19
|
+
@class ADYTransactionDetails;
|
|
20
|
+
@class ADYSpecialTransactionRequest;
|
|
21
|
+
@class ADYDevice;
|
|
22
|
+
|
|
23
|
+
typedef NS_ENUM(NSUInteger, ADYDeviceConnectionType) {
|
|
24
|
+
ADYDeviceConnectionTypeMFI,
|
|
25
|
+
ADYDeviceConnectionTypeWifi,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
typedef NS_ENUM(NSUInteger, ADYDeviceStatus) {
|
|
29
|
+
ADYDeviceStatusInitializing,
|
|
30
|
+
ADYDeviceStatusInitialized,
|
|
31
|
+
ADYDeviceStatusNotBoarded,
|
|
32
|
+
ADYDeviceStatusError,
|
|
33
|
+
ADYDeviceStatusStopped,
|
|
34
|
+
ADYDeviceStatusGone
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
@protocol ADYDeviceDelegate <NSObject>
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Called to indicate that the status of this device has changed.
|
|
41
|
+
* @param device device that changed status.
|
|
42
|
+
* @param status new device status. Check `ADYDeviceStatus` for all possible values.
|
|
43
|
+
*/
|
|
44
|
+
- (void)device:(ADYDevice*)device didChangeStatus:(ADYDeviceStatus)status;
|
|
45
|
+
|
|
46
|
+
@end
|
|
47
|
+
|
|
48
|
+
@interface ADYDevice : NSObject
|
|
49
|
+
|
|
50
|
+
/** ADYDevice Delegate. Set this property for receiving status changes callbacks. **/
|
|
51
|
+
@property (nonatomic, weak) id<ADYDeviceDelegate> delegate;
|
|
52
|
+
|
|
53
|
+
/** Name of the device. */
|
|
54
|
+
@property (nonatomic, readonly) NSString *name;
|
|
55
|
+
|
|
56
|
+
/** Hostname or IP address used to connect to a Wifi device. Not used for Bluetooth */
|
|
57
|
+
@property (nonatomic, readonly) NSString *hostname;
|
|
58
|
+
|
|
59
|
+
/** Type of the connection to the device */
|
|
60
|
+
@property (nonatomic, readonly) ADYDeviceConnectionType connectionType;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Current status of the device.
|
|
64
|
+
* This status has one of the following values:
|
|
65
|
+
*
|
|
66
|
+
* - `ADYDeviceStatusInitializing`: The device is being initialized. In this status, it is
|
|
67
|
+
* not possible to perform payment-transactions with the device.
|
|
68
|
+
* - `ADYDeviceStatusInitialized`: The device is ready for payment-transactions.
|
|
69
|
+
* - `ADYDeviceStatusNotBoarded`: The device is ready, but not configured for use by the merchant
|
|
70
|
+
* that is currently logged in. Use `boardDeviceWithDelegate:` to
|
|
71
|
+
* attempt to configure the device.
|
|
72
|
+
* - `ADYDeviceStatusError`: There was an error communicating with the device. Use
|
|
73
|
+
* `retryConnection` to attempt to re-establish communication
|
|
74
|
+
* with the device.
|
|
75
|
+
* - `ADYDeviceStatusStopped`: The device was stopped because the merchant was logged out.
|
|
76
|
+
* - `ADYDeviceStatusGone`: The device has disconnected. Devices with this status will
|
|
77
|
+
* not appear on the `devices` list of the `ADYDeviceRegistry` anymore.
|
|
78
|
+
* However, if you keep a reference to an `ADYDevice` with status `ADYDeviceStatusGone`,
|
|
79
|
+
* the `ADYDevice` object will remain valid. If the device re-connects at a later
|
|
80
|
+
* moment, the status of the `ADYDevice` will change back to `ADYDeviceStatusInitializing`
|
|
81
|
+
* and finally `ADYDeviceStatusInitialized`, and be ready for use once more.
|
|
82
|
+
*/
|
|
83
|
+
@property (nonatomic, readonly) ADYDeviceStatus status;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
Object containing additional data about the device.
|
|
87
|
+
This data is only set when the device's status is
|
|
88
|
+
`ADYDeviceStatusInitialized` or `ADYDeviceStatusNotBoarded`.
|
|
89
|
+
*/
|
|
90
|
+
@property (nonatomic, readonly) ADYDeviceData *deviceData;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
Error-object containing error-information about the device. This
|
|
94
|
+
property is only set when the device's status is
|
|
95
|
+
`ADYDeviceStatusError`.
|
|
96
|
+
*/
|
|
97
|
+
@property (nonatomic, readonly) NSError *error;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
Creates an `ADYTransactionRequest`, which is the start of executing
|
|
101
|
+
a payment-transaction with this device.
|
|
102
|
+
|
|
103
|
+
After creating the `ADYTransactionRequest`, set all of its relevant properties,
|
|
104
|
+
and then call `startWithDelegate:` to start the payment-transaction.
|
|
105
|
+
|
|
106
|
+
@param reference a merchant-supplied reference for the transaction, as an `NSString`.
|
|
107
|
+
@param error pointer to an `NSError`, which will be set if the transaction cannot
|
|
108
|
+
be created for some reason.
|
|
109
|
+
|
|
110
|
+
@warning When an `ADYTransactionRequest` is created, the `ADYDevice` will _not_
|
|
111
|
+
keep a reference to it. Therefore, to prevent it from being deallocated, it is important
|
|
112
|
+
that you keep a reference to it until after the transaction, started with
|
|
113
|
+
[ADYTransactionRequest startWithDelegate:], has been finished.
|
|
114
|
+
*/
|
|
115
|
+
- (ADYTransactionRequest *)createTransactionRequestWithReference:(NSString *)reference
|
|
116
|
+
error:(NSError **)error;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
Creates an `ADYSpecialTransactionRequest`, which is the start of executing
|
|
120
|
+
a special transaction with this device.
|
|
121
|
+
|
|
122
|
+
After creating the `ADYSpecialTransactionRequest`, set all of its relevant properties,
|
|
123
|
+
and then call `startWithDelegate:` to start the payment-transaction.
|
|
124
|
+
|
|
125
|
+
@param reference a merchant-supplied reference for the transaction, as an `NSString`.
|
|
126
|
+
@param error pointer to an `NSError`, which will be set if the transaction cannot
|
|
127
|
+
be created for some reason.
|
|
128
|
+
|
|
129
|
+
@warning When an `ADYSpecialTransactionRequest` is created, the `ADYDevice` will _not_
|
|
130
|
+
keep a reference to it. Therefore, to prevent it from being deallocated, it is important
|
|
131
|
+
that you keep a reference to it until after the transaction, started with
|
|
132
|
+
[ADYSpecialTransactionRequest startWithDelegate:], has been finished.
|
|
133
|
+
*/
|
|
134
|
+
- (ADYSpecialTransactionRequest *)createSpecialTransactionRequestWithReference:(NSString *)reference
|
|
135
|
+
error:(NSError **)error;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
|
|
139
|
+
Fetches details for the last transactions saved on a payment device.
|
|
140
|
+
|
|
141
|
+
@param completion A block that is called when transaction details are available or when an error
|
|
142
|
+
occurs. The block takes two parameters: transactions, which contains an array of transaction
|
|
143
|
+
details, and error, which contains an error, if one occurred.
|
|
144
|
+
|
|
145
|
+
*/
|
|
146
|
+
- (void)fetchLastTransactionsWithCompletion:(void (^)(NSArray<ADYTransactionDetails *> *transactions, NSError *error))completion;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
|
|
150
|
+
Fetches details for the specified number of transactions saved on a payment device.
|
|
151
|
+
|
|
152
|
+
@param count A maximum count of transactions to be fetched.
|
|
153
|
+
|
|
154
|
+
@param completion A block that is called when transactions details are available or when an error
|
|
155
|
+
occurs. The block takes two parameters: transactions, which contains an array of transaction
|
|
156
|
+
details, and error, which contains an error, if one occurred.
|
|
157
|
+
|
|
158
|
+
*/
|
|
159
|
+
- (void)fetchLastTransactionsWithCount:(NSUInteger)count completion:(void (^)(NSArray<ADYTransactionDetails *> *transactions, NSError *error))completion;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
|
|
163
|
+
Fetches transaction details for the specified tender reference.
|
|
164
|
+
|
|
165
|
+
@param tenderReference A tender reference used to fetch transaction details.
|
|
166
|
+
|
|
167
|
+
@param completion A block that is called when transaction details are available or when an error
|
|
168
|
+
occurs. The block takes two parameters: transaction, which contains transaction details, and
|
|
169
|
+
error, which contains an error, if one occurred.
|
|
170
|
+
|
|
171
|
+
*/
|
|
172
|
+
- (void)fetchTransactionWithTenderReference:(NSString *)tenderReference completion:(void (^)(ADYTransactionDetails *transaction, NSError *error))completion;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
|
|
176
|
+
Creates an `ADYGiftCardBalanceRequest`, which is the start of requesting a balance and relevant additional data from a card.
|
|
177
|
+
|
|
178
|
+
@param error pointer to an `NSError`, which will be set if the transaction cannot be created for some reason.
|
|
179
|
+
|
|
180
|
+
*/
|
|
181
|
+
- (ADYGiftCardBalanceRequest *)createGiftCardBalanceRequestWithError:(NSError **)error;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
Creates an `ADYGiftCardLoadRequest`, which is the start of loading a cash balance to a card.
|
|
185
|
+
|
|
186
|
+
@param error pointer to an `NSError`, which will be set if the transaction cannot be created for some reason.
|
|
187
|
+
*/
|
|
188
|
+
- (ADYGiftCardLoadRequest *)createGiftCardLoadRequestWithError:(NSError **)error;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
Creates an `ADYTransactionRequest`, which is the start of executing a gift card payment transaction with this device.
|
|
192
|
+
|
|
193
|
+
@param reference a merchant-supplied reference for the transaction, as an `NSString`.
|
|
194
|
+
@param card a reference for the shopper's gift card
|
|
195
|
+
@param error pointer to an `NSError`, which will be set if the transaction cannot be created for some reason.
|
|
196
|
+
|
|
197
|
+
@warning When an `ADYTransactionRequest` is created, the `ADYDevice` will _not_
|
|
198
|
+
keep a reference to it. Therefore, to prevent it from being deallocated, it is important
|
|
199
|
+
that you keep a reference to it until after the transaction, started with
|
|
200
|
+
[ADYTransactionRequest startWithDelegate:], has been finished.
|
|
201
|
+
|
|
202
|
+
*/
|
|
203
|
+
- (ADYTransactionRequest *)createGiftCardTransactionRequestWithReference:(NSString *)reference
|
|
204
|
+
card:(ADYGiftCard *)card
|
|
205
|
+
error:(NSError **)error;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Creates an `ADYTransactionRequest`.
|
|
209
|
+
*
|
|
210
|
+
* @deprecated Use `createTransactionRequestWithReference:error:` instead. If
|
|
211
|
+
* you _must_ use `createTransactionRequestWithError:`, you _have_ to manually
|
|
212
|
+
* set a merchant reference by setting option `ADYTransactionOptionReferenceKey`
|
|
213
|
+
* in the `options` dictionary, or else the transaction will fail.
|
|
214
|
+
*/
|
|
215
|
+
- (ADYTransactionRequest *)createTransactionRequestWithError:(NSError **)error __attribute__((deprecated));
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
Starts an attempt to board the device.
|
|
219
|
+
|
|
220
|
+
This method will return immediately, the boarding process will proceed asynchronously.
|
|
221
|
+
|
|
222
|
+
@param delegate a delegate that will be kept informed about the boarding process' progress
|
|
223
|
+
and outcome.
|
|
224
|
+
*/
|
|
225
|
+
- (void)boardDeviceWithDelegate:(id<ADYDeviceManagerDelegate>)delegate;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
Re-attempt to identify the payment device. Used this when the status of
|
|
229
|
+
the device is `ADYDeviceStatusError` and you want to retry the connection.
|
|
230
|
+
This will (normally) only be useful if something is first changed on either
|
|
231
|
+
the server (uncouple terminal from Merchant) or on the terminal (delete
|
|
232
|
+
settings). Otherwise, the device will keep going to status error.
|
|
233
|
+
*/
|
|
234
|
+
- (void)retryConnection;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
Re-attempt to identify the payment device and update the Device Data
|
|
238
|
+
|
|
239
|
+
@param completion a completion handler block that will be triggered once device data will be updated or error will be triggered
|
|
240
|
+
|
|
241
|
+
*/
|
|
242
|
+
- (void)getDeviceDataWithCompletion:(void (^)(ADYDeviceData *, NSError *))completion;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
DEPRECATED
|
|
246
|
+
|
|
247
|
+
Instructs the device to synchronize with the backend immediately.
|
|
248
|
+
|
|
249
|
+
Normally, the device performs synchronization with the backend at
|
|
250
|
+
its own discretion. Call this method to do it right now.
|
|
251
|
+
|
|
252
|
+
This method returns straight away; communication with the device, and
|
|
253
|
+
the actual synchronization happens in the background. When synchronization
|
|
254
|
+
is complete, or an error occurs, the supplied completion-block is called.
|
|
255
|
+
|
|
256
|
+
@param completion block that is called when synchronization is complete,
|
|
257
|
+
or an error occurs. In the latter case, the given `NSError` is non-`nil`.
|
|
258
|
+
|
|
259
|
+
@deprecated This method is no longer required
|
|
260
|
+
*/
|
|
261
|
+
- (void)synchronizeNowWithCompletion:(void (^)(NSError *))completion;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
DEPRECATED
|
|
265
|
+
|
|
266
|
+
Instructs the device to prompt the user for permission to install
|
|
267
|
+
a new firmware-version, if a new firmware-version is available.
|
|
268
|
+
|
|
269
|
+
The device is aware of the availabiliy of a new firmware-version by a
|
|
270
|
+
prior call to `synchronizeNowWithCompletion:`, or a synchronization performed
|
|
271
|
+
on its own initiative.
|
|
272
|
+
|
|
273
|
+
This method returns straight away; communication with the device happens
|
|
274
|
+
in the background. As soon as communication is finished, or an error occurs,
|
|
275
|
+
the supplied completion-block is called.
|
|
276
|
+
|
|
277
|
+
@param completion block that is called when synchronization is complete, or an error
|
|
278
|
+
occurs. In the latter case the given `NSError` is non-`nil`. Note that the operation
|
|
279
|
+
is considered complete when the device shows a prompt to the user. This doesn't
|
|
280
|
+
necessarily mean that the user agrees to install the update, or that installing the update
|
|
281
|
+
will succeed.
|
|
282
|
+
|
|
283
|
+
@deprecated This method is no longer required
|
|
284
|
+
*/
|
|
285
|
+
|
|
286
|
+
- (void)installUpdateWhenAvailableWithCompletion:(void (^)(NSError *))completion;
|
|
287
|
+
|
|
288
|
+
// TODO: WithCompletion:(void (^)(NSError *))completion;
|
|
289
|
+
- (void)printReceipt:(ADYReceipt *)receipt withCompletion:(void (^)(NSError *))completion;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
Description of the device, for debug-purposes only.
|
|
293
|
+
*/
|
|
294
|
+
- (NSString *)description;
|
|
295
|
+
- (NSDictionary *)dictionaryRepresentation;
|
|
296
|
+
|
|
297
|
+
- (void)ping;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* List of all supported MFi protocol names
|
|
301
|
+
*/
|
|
302
|
+
+ (NSArray *)supportedAccessoryProtocolNames;
|
|
303
|
+
|
|
304
|
+
- (void)restartAccessoryConnection;
|
|
305
|
+
|
|
306
|
+
- (NSString *)statusAsString;
|
|
307
|
+
|
|
308
|
+
@end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYDeviceData.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/10/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@interface ADYDeviceData : NSObject <NSCopying>
|
|
12
|
+
|
|
13
|
+
@property (nonatomic, strong) NSString *terminalId;
|
|
14
|
+
@property (nonatomic, strong) NSString *terminalMacAddress;
|
|
15
|
+
@property (nonatomic, strong) NSString *terminalConfiguredName;
|
|
16
|
+
@property (nonatomic, strong) NSString *terminalBrand;
|
|
17
|
+
@property (nonatomic, strong) NSString *terminalType;
|
|
18
|
+
@property (nonatomic, strong) NSString *terminalSerialNumber;
|
|
19
|
+
@property (nonatomic, strong) NSString *terminalApiVersion;
|
|
20
|
+
@property (nonatomic, strong) NSString *terminalApiVersionUpgrade;
|
|
21
|
+
@property (nonatomic, strong) NSString *upgradeLastReceivedInstallOrder;
|
|
22
|
+
@property (nonatomic, strong) NSString *upgradeLastInstallOrderToSend;
|
|
23
|
+
@property (nonatomic, strong) NSString *upgradeBytesReceived;
|
|
24
|
+
@property (nonatomic, assign) BOOL updateAvailable;
|
|
25
|
+
@property (nonatomic, strong) NSString *terminalOsVersion;
|
|
26
|
+
@property (nonatomic, strong) NSString *terminalHardwareVersion;
|
|
27
|
+
@property (nonatomic, strong) NSNumber *batteryPercentage;
|
|
28
|
+
@property (nonatomic, strong) NSNumber *printerWidthInPixels;
|
|
29
|
+
@property (nonatomic, assign) NSUInteger terminalUnconfirmedBatches;
|
|
30
|
+
@property (nonatomic, strong) NSArray *terminalMerchantAccounts;
|
|
31
|
+
@property (nonatomic, assign) BOOL isBoarded;
|
|
32
|
+
@property (nonatomic, assign) BOOL hasDUKPT;
|
|
33
|
+
@property (nonatomic, readonly) BOOL hasPrinter;
|
|
34
|
+
@property (nonatomic, readonly) BOOL hasPINDigitNotification;
|
|
35
|
+
@property (nonatomic, readonly) BOOL hasCardInsertionRemovalNotification;
|
|
36
|
+
|
|
37
|
+
@property (nonatomic, assign) BOOL readyForTender;
|
|
38
|
+
|
|
39
|
+
@property (nonatomic, assign) BOOL live;
|
|
40
|
+
@property (nonatomic, readonly) BOOL supportsLiveProperty;
|
|
41
|
+
|
|
42
|
+
/** `nil` if interface-version is unknown, a version-string if it is known. */
|
|
43
|
+
@property (nonatomic, strong) NSString *interfaceVersion;
|
|
44
|
+
@property (nonatomic, readonly) NSNumber *interfaceVersionNumber;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Provides a string with list of few properties
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
- (NSString *)shortInfo;
|
|
51
|
+
|
|
52
|
+
@end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYDeviceManagerDelegate.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/11/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenPOSLib_ADYEMVDeviceManagerDelegate_h
|
|
10
|
+
#define AdyenPOSLib_ADYEMVDeviceManagerDelegate_h
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Delegate used by [Adyen boardDeviceWithDelegate:] to keep the caller
|
|
14
|
+
* informed about the configuration's progress and completion.
|
|
15
|
+
*
|
|
16
|
+
* Configuring a device consists of 5 steps. These are represented by the
|
|
17
|
+
* enum `ADYEMVDeviceManagerStep`, with possible values:
|
|
18
|
+
*
|
|
19
|
+
* 1. `ADYEMVDeviceManagerStepIdentifyPaymentDevice`: query the payment device about its identity.
|
|
20
|
+
* 2. `ADYEMVDeviceManagerStepRegisterPaymentDevice`: register the payment device with the backend.
|
|
21
|
+
* 3. `ADYEMVDeviceManagerStepLoadConfiguration`: load the device's configuration from the backend.
|
|
22
|
+
* 4. `ADYEMVDeviceManagerStepStoreConfiguration`: store the new configuration on the device.
|
|
23
|
+
* 5. `ADYEMVDeviceManagerStepCheckConfiguration`: check that the new configuration has been installed successfully.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
// Documenting enums is not supported by appledoc, hence the kludge
|
|
27
|
+
typedef NS_ENUM(NSUInteger, ADYEMVDeviceManagerStep) {
|
|
28
|
+
ADYEMVDeviceManagerStepIdentifyPaymentDevice,
|
|
29
|
+
ADYEMVDeviceManagerStepRegisterPaymentDevice,
|
|
30
|
+
ADYEMVDeviceManagerStepLoadConfiguration,
|
|
31
|
+
ADYEMVDeviceManagerStepStoreConfiguration,
|
|
32
|
+
ADYEMVDeviceManagerStepCheckConfiguration
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@protocol ADYDeviceManagerDelegate
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Called to indicate that the given configuration-step will be executed.
|
|
40
|
+
* @param step step that will be executed
|
|
41
|
+
*/
|
|
42
|
+
-(void)deviceManagerWillBeginStep:(ADYEMVDeviceManagerStep)step;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Called to indicate that the given configuration-step has been executed successfully
|
|
46
|
+
* @param step step that has been executed
|
|
47
|
+
*/
|
|
48
|
+
-(void)deviceManagerDidCompleteStep:(ADYEMVDeviceManagerStep)step;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Called to indicate that the given configuration-step failed to execute. After this
|
|
52
|
+
* method has been called, configuration is terminated and no more methods will be called
|
|
53
|
+
* on the delegate.
|
|
54
|
+
* @param step step that failed to executed
|
|
55
|
+
*/
|
|
56
|
+
-(void)deviceManagerDidFailStep:(ADYEMVDeviceManagerStep)step withError:(NSError*)error;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Called to indicate that configuration was successful. After this method has been called,
|
|
60
|
+
* no more methods will be called on the delegate.
|
|
61
|
+
*/
|
|
62
|
+
-(void)deviceManagerDidComplete;
|
|
63
|
+
|
|
64
|
+
@end
|
|
65
|
+
|
|
66
|
+
#endif
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYDeviceRegistry.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/24/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@class ADYDevice;
|
|
12
|
+
|
|
13
|
+
@protocol ADYDeviceRegistryDelegate <NSObject>
|
|
14
|
+
|
|
15
|
+
@optional
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Called to indicate that a device was added to devices list.
|
|
19
|
+
* @param device `ADYDevice` that was added.
|
|
20
|
+
*/
|
|
21
|
+
- (void)deviceRegistryDidAddDevice:(ADYDevice *)device;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Called to indicate that a device was removed from devices list.
|
|
25
|
+
* @param device `ADYDevice` that was removed.
|
|
26
|
+
*/
|
|
27
|
+
- (void)deviceRegistryDidRemoveDevice:(ADYDevice *)device;
|
|
28
|
+
|
|
29
|
+
@end
|
|
30
|
+
|
|
31
|
+
@interface ADYDeviceRegistry : NSObject
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
List of currently connected devices.
|
|
35
|
+
|
|
36
|
+
When new devices
|
|
37
|
+
become connected, they will be added to this list, and
|
|
38
|
+
when devices go away, they'll be taken out of this list.
|
|
39
|
+
|
|
40
|
+
This list is fully KVO-compliant. This means that if you
|
|
41
|
+
add an observer like this:
|
|
42
|
+
|
|
43
|
+
[deviceRegistry addObserver:observer
|
|
44
|
+
forKeyPath:@"devices"
|
|
45
|
+
options:NSKeyValueObservingOptionsInitial|
|
|
46
|
+
NSKeyValueObservingOptionsOld|
|
|
47
|
+
NSKeyValueObservingOptionsNew
|
|
48
|
+
context:NULL];
|
|
49
|
+
|
|
50
|
+
..., then your observer will be notified immediately of the
|
|
51
|
+
devices present, and after that of any change.
|
|
52
|
+
|
|
53
|
+
@note when a device disconnects, the corresponding `ADYDevice` will be removed
|
|
54
|
+
from the `devices` array. If you still have a reference to the `ADYDevice` instance,
|
|
55
|
+
however, you can keep using it. Its status will be set to `ADYDeviceStatusGone` to
|
|
56
|
+
indicate that it's no longer connected. If the device reconnects at some later moment,
|
|
57
|
+
the same `ADYDevice` instance will be reused, and its status will be updated to reflect
|
|
58
|
+
the fact that it is now, once again, connected.
|
|
59
|
+
|
|
60
|
+
@return a list of currently connected devices
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
@property (nonatomic, readonly) NSMutableArray *devices;
|
|
64
|
+
|
|
65
|
+
/** ADYDeviceRegistry Delegate.
|
|
66
|
+
* Set this property for receiving notifications when devices are added/removed.
|
|
67
|
+
*/
|
|
68
|
+
@property (nonatomic, weak) id<ADYDeviceRegistryDelegate> delegate;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Finds a bluetooth `ADYDevice` with the given name.
|
|
72
|
+
*
|
|
73
|
+
* Note that, if `name` is not `nil`, this method will _always_
|
|
74
|
+
* return an `ADYDevice`,
|
|
75
|
+
* even when a bluetooth device by that name is not currently
|
|
76
|
+
* connected. In that case, the state of the returned device
|
|
77
|
+
* will be `ADYDeviceStatusGone`. If a bluetooth-device with
|
|
78
|
+
* the given name is connected later, the state of the
|
|
79
|
+
* returned `ADYDevice` will change first to `ADYDeviceStatusInitializing`
|
|
80
|
+
* and then to `ADYDeviceStatusInitialized`, and it will have become
|
|
81
|
+
* an `ADYDevice` usable for transactions.
|
|
82
|
+
*
|
|
83
|
+
* What this means is that, if you know the name of the device to be
|
|
84
|
+
* used (because you stored it in the `NSUserDefaults`, for example) you
|
|
85
|
+
* can simply call `findDeviceByName:` to get an `ADYDevice`, and then
|
|
86
|
+
* observe its `status` using key-value observing to be notified when
|
|
87
|
+
* it becomes available or unavailable.
|
|
88
|
+
*
|
|
89
|
+
* @return an `ADYDevice` representing the bluetoothdevice with the given
|
|
90
|
+
* name, or `nil` if `name` is `nil`.
|
|
91
|
+
*/
|
|
92
|
+
- (ADYDevice *)findDeviceByName:(NSString *)name;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Adds a WiFi `ADYDevice` with the given hostname/ip address.
|
|
96
|
+
*
|
|
97
|
+
* Just like `findDeviceByName:`, this method will _always_
|
|
98
|
+
* return an `ADYDevice` if hostname is not `nil`.
|
|
99
|
+
*
|
|
100
|
+
* The `ADYDeviceRegistry` will attempt to connect to the device
|
|
101
|
+
* and after connecting it will periodically check if the device
|
|
102
|
+
* is still online. The `state` of the returned device will be updated
|
|
103
|
+
* accordingly.
|
|
104
|
+
*
|
|
105
|
+
* Overall, Wifi devices will behave very similar to bluetooth
|
|
106
|
+
* devices. The only difference is that WiFi devices will _always_ be
|
|
107
|
+
* present in the `devices` array, even if they are not connected/online.
|
|
108
|
+
*/
|
|
109
|
+
- (ADYDevice *)addDeviceWithHostname:(NSString *)hostname;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Removes `ADYDevice`s that were added using `addDeviceWithHostname:`.
|
|
113
|
+
*/
|
|
114
|
+
- (void)removeDeviceWithHostname:(NSString *)hostname;
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/// Bonjour
|
|
118
|
+
//- (void)startPolling;
|
|
119
|
+
//- (void)stopPolling;
|
|
120
|
+
|
|
121
|
+
// Dictionary of conncted devices with their name, terminalId and status
|
|
122
|
+
- (NSArray *)devicesWithTerminalIdAndStatus;
|
|
123
|
+
- (ADYDevice *)deviceByTerminalId:(NSString *)terminalId;
|
|
124
|
+
|
|
125
|
+
@end
|
package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDynamicCurrencyConversionData.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by Jeroen Bouma on 17/03/14.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
#import <Foundation/Foundation.h>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@interface ADYDynamicCurrencyConversionData : NSObject
|
|
9
|
+
|
|
10
|
+
@property (readonly) NSString *originalAmountCurrency;
|
|
11
|
+
@property (readonly) NSNumber *originalAmountValue; //minor units (fraction depends on currency)
|
|
12
|
+
|
|
13
|
+
@property (readonly) NSString *convertedAmountCurrency;
|
|
14
|
+
@property (readonly) NSNumber *convertedAmountValue; //minor units (fraction depends on currency)
|
|
15
|
+
|
|
16
|
+
@property (readonly) NSNumber *exchangeRate;
|
|
17
|
+
|
|
18
|
+
@property (readonly) NSString *source;
|
|
19
|
+
@property (readonly) NSNumber *commissionFee; //currency = ?
|
|
20
|
+
@property (readonly) NSNumber *markup; //in base points
|
|
21
|
+
|
|
22
|
+
@end
|