@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,153 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYError.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/10/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenPOSLib_ADYErrors_h
|
|
10
|
+
#define AdyenPOSLib_ADYErrors_h
|
|
11
|
+
|
|
12
|
+
static NSString* const ADYErrorDomain = @"Adyen";
|
|
13
|
+
|
|
14
|
+
// Errorcodes used in range 0 - 9999
|
|
15
|
+
typedef NS_ENUM(NSUInteger, ADYErrorCode) {
|
|
16
|
+
/**
|
|
17
|
+
* Error indicating that an error occurred that cannot
|
|
18
|
+
* be categorized as one of the other errors.
|
|
19
|
+
*/
|
|
20
|
+
ADYErrorCodeUnknownError = 0,
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Error occurring when an attempt is made to use
|
|
24
|
+
* a payment device while no payment device is
|
|
25
|
+
* connected.
|
|
26
|
+
*/
|
|
27
|
+
ADYErrorCodeNoDeviceConnected = 100,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Error occurring when an attempt is made to use
|
|
31
|
+
* a payment device that has been configured for another
|
|
32
|
+
* merchant.
|
|
33
|
+
*/
|
|
34
|
+
ADYErrorCodeUnauthorizedForDevice = 101,
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The payment device could not execute a command
|
|
38
|
+
* sent to it.
|
|
39
|
+
*/
|
|
40
|
+
ADYErrorCodeDeviceError = 102,
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Error indicating that the supplied merchant credentials
|
|
44
|
+
* are incorrect for the payment device used.
|
|
45
|
+
*/
|
|
46
|
+
ADYErrorCodeInvalidCredentialsForPaymentDevice = 103,
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Error indicating that a transaction was started with an amount that
|
|
50
|
+
* is too low.
|
|
51
|
+
*/
|
|
52
|
+
ADYErrorCodeAmountTooLow = 104,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Error indicating that the transaction could not be started due to
|
|
56
|
+
* some invalid parameters used to start it. Example: invalid currency,
|
|
57
|
+
* manual keyed entry not allowed, amount too low, etc.
|
|
58
|
+
*
|
|
59
|
+
* Check the root error (userInfo: NSUnderlyingErrorKey) for more details.
|
|
60
|
+
*/
|
|
61
|
+
ADYErrorCodeTransactionInitializationError = 105,
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Error indicating that terminal is configured for a different environment.
|
|
65
|
+
*/
|
|
66
|
+
ADYErrorCodeTerminalEnvironmentMismatch = 107,
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Error indicating that the supplied merchant credentials
|
|
70
|
+
* are incorrect for the backend.
|
|
71
|
+
*/
|
|
72
|
+
ADYErrorCodeInvalidCredentialsForPSP = 200,
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Error indicating that communication with the payment
|
|
76
|
+
* device failed.
|
|
77
|
+
*/
|
|
78
|
+
ADYErrorCodePaymentDeviceConnectionError = 300,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Error indicating that communication over the network
|
|
82
|
+
* failed.
|
|
83
|
+
*/
|
|
84
|
+
ADYErrorCodeNetworkError = 400,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Error indicating that a backend system could not be reached
|
|
88
|
+
* because the iOS device does not have an internet connection.
|
|
89
|
+
*/
|
|
90
|
+
ADYErrorCodeNoInternetConnection = 401,
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* An unrecoverable error occured on the server.
|
|
94
|
+
*/
|
|
95
|
+
ADYErrorCodeInternalServerError = 402,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Error indicating that registration of the app failed.
|
|
99
|
+
*/
|
|
100
|
+
ADYErrorCodeAppRegistrationFailed = 500,
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* An attempt is made to register a device from an app that has not been registered
|
|
104
|
+
*/
|
|
105
|
+
ADYErrorCodeInvalidApp = 501,
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The user does not have sufficient permissions on the PSP for the requested operation
|
|
109
|
+
*/
|
|
110
|
+
ADYErrorCodeUserPermissionError = 502,
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The merchant account given is not valid.
|
|
114
|
+
*/
|
|
115
|
+
ADYErrorCodeInvalidMerchant = 503,
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* An attempt was made to log in without first logging out
|
|
119
|
+
*/
|
|
120
|
+
ADYErrorCodeAlreadyLoggedIn = 504,
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* An attempt was made to log out without first logging in
|
|
124
|
+
*/
|
|
125
|
+
ADYErrorCodeNotLoggedIn = 505,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Error indicating that the token did not become valid
|
|
129
|
+
* on the PAL in time after app registration.
|
|
130
|
+
*/
|
|
131
|
+
ADYErrorCodeAppRegistrationTokenCheckTimeout = 506,
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The requested action is not supported by the payment terminal
|
|
135
|
+
*/
|
|
136
|
+
ADYErrorCodeNotSupported = 507,
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* One or more used parameters are incorrect or missing
|
|
140
|
+
*/
|
|
141
|
+
ADYErrorCodeInvalidParameter = 508,
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Transaction errors
|
|
145
|
+
*/
|
|
146
|
+
ADYErrorCodeDeviceEMVError = 600,
|
|
147
|
+
ADYErrorCodeDeviceSAPIError = 601,
|
|
148
|
+
ADYErrorCodeDevicePrintReceiptFailed = 700,
|
|
149
|
+
ADYErrorCodePSPValidateError = 701,
|
|
150
|
+
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
#endif
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYGiftCard.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 3/1/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import "ADYGiftCardMask.h"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
|
|
15
|
+
An `ADYGiftCard`, which is an NSObject that represents the shopper's gift card.
|
|
16
|
+
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
@interface ADYGiftCard : NSObject
|
|
20
|
+
|
|
21
|
+
/** holds the type of gift card.
|
|
22
|
+
*/
|
|
23
|
+
@property (strong, nonatomic) NSString *type;
|
|
24
|
+
|
|
25
|
+
/** holds the gift card number.
|
|
26
|
+
*/
|
|
27
|
+
@property (strong, nonatomic) NSString *number;
|
|
28
|
+
|
|
29
|
+
/** holds the expiry month of the card.
|
|
30
|
+
*/
|
|
31
|
+
@property (strong, nonatomic) NSString *expiryMonth;
|
|
32
|
+
|
|
33
|
+
/** holds the expiry year of the card.
|
|
34
|
+
*/
|
|
35
|
+
@property (strong, nonatomic) NSString *expiryYear;
|
|
36
|
+
|
|
37
|
+
/** holds a mask to validate the correct number of digits to enter.
|
|
38
|
+
*/
|
|
39
|
+
@property (strong, nonatomic) ADYGiftCardMask *mask;
|
|
40
|
+
|
|
41
|
+
@end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYGiftCardBalanceInquiryOperation.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 2/27/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "ADYGiftCardRequest.h"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@class ADYBalance;
|
|
13
|
+
@class ADYGiftCardMask;
|
|
14
|
+
@class ADYGiftCard;
|
|
15
|
+
@class ADYGiftCardBalanceResponse;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
typedef void (^ADYGiftCardBalanceCompletion)(ADYGiftCardBalanceResponse * _Nonnull response);
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
|
|
23
|
+
An `ADYGiftCardBalanceRequest`, which is the start of requesting a balance and relevant additional data from a card.
|
|
24
|
+
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
28
|
+
|
|
29
|
+
@interface ADYGiftCardBalanceRequest : ADYGiftCardRequest
|
|
30
|
+
|
|
31
|
+
/** a reference for the shopper's gift card
|
|
32
|
+
*/
|
|
33
|
+
@property (strong, nonatomic, nullable) ADYGiftCard *card;
|
|
34
|
+
|
|
35
|
+
/** holds Additional data that the POS sends with the transaction.
|
|
36
|
+
*/
|
|
37
|
+
@property (strong, nonatomic, nullable) NSDictionary *additionalData;
|
|
38
|
+
|
|
39
|
+
/** holds selected tender options that apply to the transaction
|
|
40
|
+
*/
|
|
41
|
+
@property (strong, nonatomic, nullable) NSArray *tenderOptions;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- (void)startWithCompletion:(ADYGiftCardBalanceCompletion)completion;
|
|
45
|
+
|
|
46
|
+
- (void)cancel;
|
|
47
|
+
|
|
48
|
+
@end
|
|
49
|
+
|
|
50
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYGiftCardBalanceResponse.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 3/1/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@class ADYGiftCard;
|
|
12
|
+
@class ADYBalance;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
|
|
16
|
+
An `ADYGiftCardBalanceResponse`, which is the response to a balance request, and includes the balance of the card.
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
@interface ADYGiftCardBalanceResponse : NSObject
|
|
21
|
+
|
|
22
|
+
/** a reference for the shopper's gift card
|
|
23
|
+
*/
|
|
24
|
+
@property (strong, nonatomic) ADYGiftCard *card;
|
|
25
|
+
|
|
26
|
+
/** holds the current balance of the gift card.
|
|
27
|
+
*/
|
|
28
|
+
@property (strong, nonatomic) ADYBalance *balance;
|
|
29
|
+
|
|
30
|
+
/** holds Additional data that the POS sends with the transaction.
|
|
31
|
+
*/
|
|
32
|
+
@property (strong, nonatomic) NSDictionary *additionalData;
|
|
33
|
+
|
|
34
|
+
/** will be set if the transaction cannot be created for some reason.
|
|
35
|
+
*/
|
|
36
|
+
@property (strong, nonatomic) NSError *error;
|
|
37
|
+
|
|
38
|
+
@end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYGiftCardLoadRequest.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 2/27/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "ADYGiftCardRequest.h"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@class ADYAmount;
|
|
13
|
+
@class ADYBalance;
|
|
14
|
+
@class ADYGiftCardBalanceResponse;
|
|
15
|
+
@class ADYGiftCard;
|
|
16
|
+
@class ADYGiftCardLoadRequest;
|
|
17
|
+
@class ADYGiftCardLoadResponse;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
typedef void (^ADYGiftCardConfirmLoadDetails)(ADYAmount * _Nullable updatedAmount, NSDictionary * _Nullable updatedAdditionalData);
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
24
|
+
|
|
25
|
+
@protocol ADYGiftCardLoadRequestDelegate <NSObject>
|
|
26
|
+
|
|
27
|
+
- (void)loadRequest:(ADYGiftCardLoadRequest *)request didAquireCurrentBalance:(ADYBalance *)balance andAdditionalData:(nullable NSDictionary *)additionalData confirmLoadWithDetails:(ADYGiftCardConfirmLoadDetails)confirmLoad;
|
|
28
|
+
|
|
29
|
+
- (void)loadRequest:(ADYGiftCardLoadRequest *)request didFinishWithResponse:(ADYGiftCardLoadResponse *)response;
|
|
30
|
+
|
|
31
|
+
@end
|
|
32
|
+
|
|
33
|
+
NS_ASSUME_NONNULL_END
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
|
|
38
|
+
An `ADYGiftCardLoadRequest`, which is the start of loading a cash balance to a card.
|
|
39
|
+
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
43
|
+
|
|
44
|
+
@interface ADYGiftCardLoadRequest : ADYGiftCardRequest
|
|
45
|
+
|
|
46
|
+
/** holds the amount currently loaded to the card
|
|
47
|
+
*/
|
|
48
|
+
@property (strong, nonatomic) ADYAmount *amount;
|
|
49
|
+
|
|
50
|
+
/** a merchant-supplied reference for the transaction, as an `NSString`.
|
|
51
|
+
*/
|
|
52
|
+
@property (strong, nonatomic) NSString *reference;
|
|
53
|
+
|
|
54
|
+
/** specifies the type of load
|
|
55
|
+
i.e. `load`, `merchandise_return`, `activate`.
|
|
56
|
+
*/
|
|
57
|
+
@property (strong, nonatomic) NSString *loadType;
|
|
58
|
+
|
|
59
|
+
/** a reference for the shopper's gift card
|
|
60
|
+
*/
|
|
61
|
+
@property (strong, nonatomic, nullable) ADYGiftCard *card;
|
|
62
|
+
|
|
63
|
+
/** holds Additional data that the POS sends with the transaction.
|
|
64
|
+
*/
|
|
65
|
+
@property (strong, nonatomic, nullable) NSDictionary *additionalData;
|
|
66
|
+
|
|
67
|
+
/** holds selected tender options that apply to the transaction
|
|
68
|
+
*/
|
|
69
|
+
@property (strong, nonatomic, nullable) NSArray *tenderOptions;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
- (void)startWithDelegate:(id<ADYGiftCardLoadRequestDelegate>)delegate;
|
|
73
|
+
|
|
74
|
+
- (void)cancel;
|
|
75
|
+
|
|
76
|
+
@end
|
|
77
|
+
|
|
78
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYGiftCardLoadRequestDelegate.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 3/3/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@class ADYBalance;
|
|
11
|
+
@class ADYGiftCardLoadRequest;
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
@protocol ADYGiftCardLoadRequestDelegate <NSObject>
|
|
15
|
+
|
|
16
|
+
// - provides additional data
|
|
17
|
+
// - balance aquired
|
|
18
|
+
// - loadRequestDidSucceed
|
|
19
|
+
// - loadRequestDidFailWithError:additional data
|
|
20
|
+
|
|
21
|
+
- (void)loadRequest:(ADYGiftCardLoadRequest *)request didAquireBalance:(ADYBalance *)balance additionalData:(NSDictionary *)additionalData;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@end
|
|
25
|
+
*/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYGiftCardLoadResponse.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 3/3/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@class ADYGiftCard;
|
|
13
|
+
@class ADYBalance;
|
|
14
|
+
@class ADYError;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
|
|
19
|
+
@interface ADYGiftCardLoadResponse : NSObject
|
|
20
|
+
|
|
21
|
+
@property (strong, nonatomic, nullable) ADYGiftCard *card;
|
|
22
|
+
|
|
23
|
+
@property (strong, nonatomic, nullable) ADYBalance *balance;
|
|
24
|
+
|
|
25
|
+
@property (strong, nonatomic, nullable) NSDictionary *additionalData;
|
|
26
|
+
|
|
27
|
+
@property (strong, nonatomic, nullable) ADYError *error;
|
|
28
|
+
|
|
29
|
+
@end
|
|
30
|
+
|
|
31
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYGiftCardMask.h
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Oleg Lutsenko on 3/1/17.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
|
|
13
|
+
An `ADYGiftCardMask`, which is an NSObject that represents the card mask, used to validate the correct number of digits to enter .
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
@interface ADYGiftCardMask : NSObject
|
|
18
|
+
|
|
19
|
+
/** holds the type of gift card.
|
|
20
|
+
*/
|
|
21
|
+
@property (strong, nonatomic, nullable) NSString *mask;
|
|
22
|
+
|
|
23
|
+
/** holds the minimum number of characters in the card mask.
|
|
24
|
+
*/
|
|
25
|
+
@property (strong, nonatomic, nullable) NSString *maskMin;
|
|
26
|
+
|
|
27
|
+
/** holds the maximum number of characters in the card mask.
|
|
28
|
+
*/
|
|
29
|
+
@property (strong, nonatomic, nullable) NSString *maskMax;
|
|
30
|
+
|
|
31
|
+
@end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#import <CoreLocation/CoreLocation.h>
|
|
2
|
+
|
|
3
|
+
@interface ADYLocationManager : NSObject <CLLocationManagerDelegate>
|
|
4
|
+
@property (nonatomic, strong) CLLocationManager *locationManager;
|
|
5
|
+
@property (nonatomic, strong) CLLocation *currentLocation;
|
|
6
|
+
|
|
7
|
+
+ (ADYLocationManager *)sharedInstance;
|
|
8
|
+
+ (BOOL)isEnabled;
|
|
9
|
+
+ (BOOL)isAuthorized;
|
|
10
|
+
|
|
11
|
+
- (void)determineLocation;
|
|
12
|
+
- (BOOL)locationKnown;
|
|
13
|
+
|
|
14
|
+
@end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYLoginDelegate.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 6/18/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
typedef NS_ENUM(NSInteger, ADYLoginDelegateStatus) {
|
|
12
|
+
ADYLoginDelegateStatusLoggingIn,
|
|
13
|
+
ADYLoginDelegateStatusLoggedIn,
|
|
14
|
+
ADYLoginDelegateStatusPreSettling,
|
|
15
|
+
ADYLoginDelegateStatusVerifyingToken,
|
|
16
|
+
ADYLoginDelegateStatusTokenNotYetValid,
|
|
17
|
+
ADYLoginDelegateStatusTokenValid,
|
|
18
|
+
ADYLoginDelegateStatusPostSettling
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Protocol specifying a callback from the library into
|
|
23
|
+
* the app, to indicate login progress and outcome.
|
|
24
|
+
*/
|
|
25
|
+
@protocol ADYLoginDelegate <NSObject>
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This method is called by the library when the login
|
|
29
|
+
* was completed successfully.
|
|
30
|
+
* @param info reserved for future use.
|
|
31
|
+
*/
|
|
32
|
+
- (void)loginCompletedSuccessfullyWithInfo:(NSDictionary*)info;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* This method is called by the library when the login
|
|
36
|
+
* failed for some reason.
|
|
37
|
+
* @param error the error that prevented the login from completing.
|
|
38
|
+
*/
|
|
39
|
+
- (void)loginFailedWithError:(NSError*)error;
|
|
40
|
+
|
|
41
|
+
@optional
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* This method is called periodically during a login, to
|
|
45
|
+
* report progress.
|
|
46
|
+
* @param progress a number from `0.0` to `1.0`, indicating how
|
|
47
|
+
* much of the login-process has already been executed.
|
|
48
|
+
*/
|
|
49
|
+
- (void)loginUpdatedProgress:(float)progress DEPRECATED_MSG_ATTRIBUTE("Use loginUpdatedProgress:status: instead");
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* This method is called periodically by the library to indicate
|
|
53
|
+
* the activity currently performed.
|
|
54
|
+
*
|
|
55
|
+
* The given status is one of:
|
|
56
|
+
*
|
|
57
|
+
* - `ADYLoginDelegateStatusLoggingIn`: the library has sent a login-request to the backend
|
|
58
|
+
* - `ADYLoginDelegateStatusLoggedIn`: login was successful, but token is not verified yet
|
|
59
|
+
* - `ADYLoginDelegateStatusPreSettling`: after successful login, start waiting for some time
|
|
60
|
+
* to allow the token to propagate across the cluster
|
|
61
|
+
* - `ADYLoginDelegateStatusVerifyingToken`: attempt to use the generated token to see if it
|
|
62
|
+
* has already propagated
|
|
63
|
+
* - `ADYLoginDelegateStatusTokenNotValid`: token has not propagated across the cluster yet, another attempt
|
|
64
|
+
* will be made
|
|
65
|
+
* - `ADYLoginDelegateStatusTokenValid`: token has propagated across the cluster
|
|
66
|
+
* - `ADYLoginDelegateStatusPostSettling`: after successful token propagation, wait a short while to
|
|
67
|
+
* let the system settle
|
|
68
|
+
*/
|
|
69
|
+
- (void)loginChangedStatus:(ADYLoginDelegateStatus)status DEPRECATED_MSG_ATTRIBUTE("Use loginUpdatedProgress:status: instead");
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* This method is called periodically by the library to indicate the activity and progress currently performed.
|
|
74
|
+
*
|
|
75
|
+
* @param progress a number from `0.0` to `1.0`, indicating how much of the login-process has already been executed.
|
|
76
|
+
* @param status one of ADYLoginDelegateStatus
|
|
77
|
+
*/
|
|
78
|
+
- (void)loginUpdatedProgress:(float)progress status:(ADYLoginDelegateStatus)status;
|
|
79
|
+
|
|
80
|
+
@end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYPrintReceiptRequest.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/11/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@class ADYReceipt;
|
|
12
|
+
@class ADYTransactionData;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Request-object used to inform the ADYTransactionProcessorDelegate that
|
|
16
|
+
* a receipt must be printed.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
extern NSString* const ADYPrintReceiptRequestAmountKey;
|
|
20
|
+
extern NSString* const ADYPrintReceiptRequestUpdatedAmountKey;
|
|
21
|
+
extern NSString* const ADYPrintReceiptRequestCurrencyKey;
|
|
22
|
+
extern NSString* const ADYPrintReceiptRequestMerchantName1Key;
|
|
23
|
+
extern NSString* const ADYPrintReceiptRequestMerchantName2Key;
|
|
24
|
+
extern NSString* const ADYPrintReceiptRequestMerchantReferenceKey;
|
|
25
|
+
extern NSString* const ADYPrintReceiptRequestAuthCodeKey;
|
|
26
|
+
extern NSString* const ADYPrintReceiptRequestCardHolderKey;
|
|
27
|
+
extern NSString* const ADYPrintReceiptRequestCardSummaryKey;
|
|
28
|
+
extern NSString* const ADYPrintReceiptRequestCardSchemeKey;
|
|
29
|
+
extern NSString* const ADYPrintReceiptRequestSignatureData;
|
|
30
|
+
extern NSString* const ADYPrintReceiptRequestSignatureMimeType;
|
|
31
|
+
|
|
32
|
+
@interface ADYPrintReceiptRequest : NSObject
|
|
33
|
+
|
|
34
|
+
/** Data about the transaction in progress. */
|
|
35
|
+
@property (readonly) ADYTransactionData *transactionData;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/** The merchant-receipt to be printed. */
|
|
39
|
+
@property (nonatomic, strong) ADYReceipt *merchantReceipt;
|
|
40
|
+
|
|
41
|
+
/** The cardholder-receipt to be printed. */
|
|
42
|
+
@property (nonatomic, strong) ADYReceipt *cardHolderReceipt;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Continue transaction processing after receipt has been printed.
|
|
46
|
+
*
|
|
47
|
+
* @param success `YES` if printing was successful, `NO` if it wasn't.
|
|
48
|
+
*/
|
|
49
|
+
- (void)confirmReceiptPrinted:(BOOL)success;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// Private
|
|
53
|
+
@property (strong, nonatomic) NSString *merchantAccount;
|
|
54
|
+
@property (strong, nonatomic) NSString *terminalId;
|
|
55
|
+
- (NSString *)requestXml;
|
|
56
|
+
|
|
57
|
+
@end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ADYReceipt.h
|
|
3
|
+
// DeepThoughts
|
|
4
|
+
//
|
|
5
|
+
// Created by Willem Lobbezoo on 29-04-12.
|
|
6
|
+
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "ADYReceiptLine.h"
|
|
10
|
+
|
|
11
|
+
@interface ADYReceipt : NSObject
|
|
12
|
+
|
|
13
|
+
@property (strong, nonatomic) NSMutableArray *header;
|
|
14
|
+
@property (strong, nonatomic) NSMutableArray *content;
|
|
15
|
+
@property (strong, nonatomic) NSMutableArray *footer;
|
|
16
|
+
|
|
17
|
+
@property (strong, nonatomic) NSString *receiptType;
|
|
18
|
+
|
|
19
|
+
- (ADYReceipt *)init;
|
|
20
|
+
|
|
21
|
+
+ (ADYReceipt *)createTestReceipt;
|
|
22
|
+
+ (NSString *)getReceiptFormatted:(NSArray *)receipt;
|
|
23
|
+
+ (NSString *)getReceiptLineFormatted:(ADYReceiptLine *)receiptLine;
|
|
24
|
+
|
|
25
|
+
- (NSArray *)getReceiptCustomized;
|
|
26
|
+
|
|
27
|
+
- (NSString *)getFirstValueForReceiptLineKey:(NSString *)key;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
// Private
|
|
31
|
+
- (NSString *)toXML;
|
|
32
|
+
|
|
33
|
+
@end
|