@aptos-scp/scp-component-rn-device-services 0.2.7 → 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.d.ts +6 -6
- package/lib/AurusDevice/AurusDevice.js +34 -20
- package/lib/AurusDevice/AurusDevice.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.d.ts +2 -3
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js +13 -22
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js.map +1 -1
- package/lib/PaymentDeviceFactory.d.ts +5 -5
- package/lib/PaymentDeviceFactory.js +4 -4
- package/lib/PaymentDeviceFactory.js.map +1 -1
- package/lib/PaymentDeviceService.d.ts +4 -3
- package/lib/PaymentDeviceService.js +47 -30
- package/lib/PaymentDeviceService.js.map +1 -1
- package/lib/ScannerDeviceFactory.d.ts +5 -5
- package/lib/ScannerDeviceFactory.js +5 -5
- package/lib/ScannerDeviceFactory.js.map +1 -1
- package/lib/ScannerDeviceService.d.ts +2 -2
- package/lib/ScannerDeviceService.js +6 -2
- package/lib/ScannerDeviceService.js.map +1 -1
- package/lib/configs/inversify/inversify.config.js +4 -7
- package/lib/configs/inversify/inversify.config.js.map +1 -1
- package/lib/constants/constants.d.ts +0 -4
- package/lib/constants/constants.js +0 -4
- package/lib/constants/constants.js.map +1 -1
- package/lib/interfaces/IDeviceStatus.d.ts +1 -0
- package/lib/interfaces/payment/IPayment.d.ts +4 -9
- package/lib/interfaces/payment/messages/responses.d.ts +1 -1
- package/lib/interfaces/scanner/IScanner.d.ts +2 -8
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AdyenToolkit.h
|
|
3
|
+
// AdyenPOSLib
|
|
4
|
+
//
|
|
5
|
+
// Created by Jeroen Koops on 4/16/13.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenPOSLib_AdyenToolkit_h
|
|
10
|
+
#define AdyenPOSLib_AdyenToolkit_h
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
#import "ADYAccountData.h"
|
|
14
|
+
|
|
15
|
+
#import "ADYAdditionalDataRequest.h"
|
|
16
|
+
|
|
17
|
+
#import "ADYAppData.h"
|
|
18
|
+
|
|
19
|
+
#import "ADYConstants.h"
|
|
20
|
+
|
|
21
|
+
#import "ADYCurrency.h"
|
|
22
|
+
|
|
23
|
+
#import "ADYDevice.h"
|
|
24
|
+
|
|
25
|
+
#import "ADYDeviceData.h"
|
|
26
|
+
|
|
27
|
+
#import "ADYDeviceManagerDelegate.h"
|
|
28
|
+
|
|
29
|
+
#import "ADYDeviceRegistry.h"
|
|
30
|
+
|
|
31
|
+
#import "ADYDynamicCurrencyConversionData.h"
|
|
32
|
+
|
|
33
|
+
#import "Adyen.h"
|
|
34
|
+
|
|
35
|
+
#import "ADYErrors.h"
|
|
36
|
+
|
|
37
|
+
#import "ADYLoginDelegate.h"
|
|
38
|
+
|
|
39
|
+
#import "ADYPrintReceiptRequest.h"
|
|
40
|
+
|
|
41
|
+
#import "ADYReferralRequest.h"
|
|
42
|
+
|
|
43
|
+
#import "ADYReceipt.h"
|
|
44
|
+
|
|
45
|
+
#import "ADYReceiptLine.h"
|
|
46
|
+
|
|
47
|
+
#import "ADYRefundData.h"
|
|
48
|
+
|
|
49
|
+
#import "ADYServerSynchronization.h"
|
|
50
|
+
|
|
51
|
+
#import "ADYSignatureRequest.h"
|
|
52
|
+
|
|
53
|
+
#import "ADYTransactionData.h"
|
|
54
|
+
|
|
55
|
+
#import "ADYTransactionProcessorDelegate.h"
|
|
56
|
+
|
|
57
|
+
#import "ADYTransactionRequest.h"
|
|
58
|
+
|
|
59
|
+
#import "ADYCashTransactionRequest.h"
|
|
60
|
+
|
|
61
|
+
#import "ADYLocationManager.h"
|
|
62
|
+
|
|
63
|
+
#import "ADYToneGenerator.h"
|
|
64
|
+
|
|
65
|
+
#import "adylog.h"
|
|
66
|
+
|
|
67
|
+
#import "NSData+ADY.h"
|
|
68
|
+
|
|
69
|
+
#import "NSString+ADY.h"
|
|
70
|
+
|
|
71
|
+
#import "ADYGiftCardBalanceRequest.h"
|
|
72
|
+
|
|
73
|
+
#import "ADYGiftCardLoadRequest.h"
|
|
74
|
+
|
|
75
|
+
#import "ADYAmount.h"
|
|
76
|
+
|
|
77
|
+
#import "ADYSpecialTransactionRequest.h"
|
|
78
|
+
|
|
79
|
+
#endif
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// NSData+ADY
|
|
3
|
+
//
|
|
4
|
+
// Created by Taras Kalapun
|
|
5
|
+
|
|
6
|
+
#import <Foundation/Foundation.h>
|
|
7
|
+
|
|
8
|
+
@interface NSData (ADY)
|
|
9
|
+
|
|
10
|
+
+(NSData*)ady_dataWithByte:(unsigned char)byte;
|
|
11
|
+
+(NSData*)ady_dataWithByte:(unsigned char)byte1 andByte:(unsigned char)byte2;
|
|
12
|
+
+(NSData*)ady_dataWithByte:(unsigned char)byte1 andByte:(unsigned char)byte2 andByte:(unsigned char)byte3;
|
|
13
|
+
|
|
14
|
+
- (unsigned char)ady_crc8;
|
|
15
|
+
- (NSData *)ady_md5;
|
|
16
|
+
- (NSData *)ady_sha1;
|
|
17
|
+
|
|
18
|
+
- (NSString *)ady_asUtf8String;
|
|
19
|
+
|
|
20
|
+
+ (NSData*)ady_dataWithHexString:(NSString*)hexString;
|
|
21
|
+
- (NSString *)ady_toHexString;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
@interface NSMutableData (ADY)
|
|
27
|
+
|
|
28
|
+
-(void)ady_deleteHead:(NSUInteger)length;
|
|
29
|
+
-(NSData*)ady_takeHead:(NSUInteger)length;
|
|
30
|
+
|
|
31
|
+
@end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// NSString+ADY.h
|
|
3
|
+
|
|
4
|
+
#import <Foundation/Foundation.h>
|
|
5
|
+
|
|
6
|
+
@interface NSString (ADY)
|
|
7
|
+
|
|
8
|
+
- (BOOL)ady_matchesRegex:(NSString *)regex;
|
|
9
|
+
|
|
10
|
+
- (NSString *)ady_urlencode;
|
|
11
|
+
|
|
12
|
+
- (BOOL)ady_containsString:(NSString *)aString;
|
|
13
|
+
|
|
14
|
+
+ (NSString *)ady_stringWithTimeFromDate:(NSDate *)date;
|
|
15
|
+
|
|
16
|
+
+ (NSString *)ady_stringWithCurrencyAmount:(NSInteger)minorUnits numFractionalDigits:(NSUInteger)decimals;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@end
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
//
|
|
2
|
+
// adylog.h
|
|
3
|
+
// Created by Taras Kalapun on 3/3/15.
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
#ifndef __adylog__
|
|
7
|
+
#define __adylog__
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
#include <stdlib.h>
|
|
11
|
+
#include <stdio.h>
|
|
12
|
+
|
|
13
|
+
#if defined(__OBJC__) && (!defined(_adylog_C_MODE))
|
|
14
|
+
# define __adylog_objc_mode
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#define _adylog_default_component "adyen.main"
|
|
18
|
+
|
|
19
|
+
#ifndef adylog_component
|
|
20
|
+
# define adylog_component _adylog_default_component
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
// Log levels, prefixed with 'adylcl_v'.
|
|
24
|
+
enum _adylog_enum_level_t {
|
|
25
|
+
adylog_vOff = 0,
|
|
26
|
+
|
|
27
|
+
adylog_vCritical, // critical situation
|
|
28
|
+
adylog_vError, // error situation
|
|
29
|
+
adylog_vWarning, // warning
|
|
30
|
+
adylog_vInfo, // informational message
|
|
31
|
+
adylog_vDebug, // coarse-grained debugging information
|
|
32
|
+
adylog_vTrace, // fine-grained debugging information
|
|
33
|
+
|
|
34
|
+
_adylog_level_t_count,
|
|
35
|
+
_adylog_level_t_first = 0,
|
|
36
|
+
_adylog_level_t_last = _adylog_level_t_count-1
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// Log level type.
|
|
40
|
+
typedef uint32_t _adylog_level_t;
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
typedef int (*adylog_render_line)(const char *str);
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
typedef struct {
|
|
47
|
+
void (*render_linec)(const char *component, int level, const char *prefix, const char *str);
|
|
48
|
+
void (*render_line)(const char *str);
|
|
49
|
+
} adylog_driver;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
typedef struct {
|
|
53
|
+
adylog_driver *driver;
|
|
54
|
+
_adylog_level_t default_log_level;
|
|
55
|
+
char *filepath;
|
|
56
|
+
FILE *file;
|
|
57
|
+
int use_colors;
|
|
58
|
+
char **components;
|
|
59
|
+
uint32_t components_count;
|
|
60
|
+
uint32_t *components_levels;
|
|
61
|
+
} adylog_t;
|
|
62
|
+
|
|
63
|
+
// Public
|
|
64
|
+
void adylog_init(char *components[], int count);
|
|
65
|
+
void adylog_add_component(const char *name);
|
|
66
|
+
void adylog_free();
|
|
67
|
+
|
|
68
|
+
void adylog_configure_by_name(const char *name, _adylog_level_t level);
|
|
69
|
+
int adylog_component_active(const char *component, _adylog_level_t level);
|
|
70
|
+
|
|
71
|
+
void adylog_set_render_linec(void (*render_line_ptr)(const char *component, int level, const char *prefix, const char *str));
|
|
72
|
+
void adylog_set_render_line(void (*render_line_ptr)(const char *str));
|
|
73
|
+
|
|
74
|
+
int adylog_set_log_file(const char *filepath);
|
|
75
|
+
void adylog_set_enable_colors(int enable);
|
|
76
|
+
|
|
77
|
+
char *adylog_get_time(void);
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
void adylog_log_line(const char *component, int level, const char *prefix, const char *str);
|
|
81
|
+
void adylog_log_linef(const char *component, int level, const char *func, int line, const char *format, ...);
|
|
82
|
+
// Private
|
|
83
|
+
void adylog_renderer_linec(const char *component, int level, const char *prefix, const char *str);
|
|
84
|
+
void adylog_renderer_line(const char *str);
|
|
85
|
+
|
|
86
|
+
extern const char * const _adylog_level_header_1[_adylog_level_t_count]; // header with 1 character
|
|
87
|
+
extern const char * const _adylog_level_header_1c[_adylog_level_t_count]; // header with 1 character, colored
|
|
88
|
+
|
|
89
|
+
#ifndef _adylog_filename
|
|
90
|
+
# define _adylog_filename (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
|
91
|
+
#endif
|
|
92
|
+
|
|
93
|
+
#ifdef __adylog_objc_mode
|
|
94
|
+
# define _ady_str @""
|
|
95
|
+
#else
|
|
96
|
+
# define _ady_str ""
|
|
97
|
+
#endif
|
|
98
|
+
|
|
99
|
+
#if DEBUG
|
|
100
|
+
# define _adyadylog_debug_mode 1
|
|
101
|
+
# define _adylog_color 1
|
|
102
|
+
#else
|
|
103
|
+
# define _adyadylog_debug_mode 0
|
|
104
|
+
# define _adylog_color 0
|
|
105
|
+
#endif
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
#define _adylog_prefix "" __func__ ":"__LINE__
|
|
109
|
+
|
|
110
|
+
#ifdef __adylog_objc_mode
|
|
111
|
+
# define _adylog_c_str(s, ...) [[NSString stringWithFormat:s, ## __VA_ARGS__] cStringUsingEncoding:NSUTF8StringEncoding]
|
|
112
|
+
#else
|
|
113
|
+
# define _adylog_c_str(s, ...) s, ## __VA_ARGS__
|
|
114
|
+
#endif
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
#define adylog_log(_component, _level, _format, ...) \
|
|
118
|
+
do { \
|
|
119
|
+
if (adylog_component_active(_component, _level)) { \
|
|
120
|
+
adylog_log_linef(_component, _level, __func__, __LINE__, _adylog_c_str(_format, ## __VA_ARGS__)); \
|
|
121
|
+
} \
|
|
122
|
+
} while (0)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
#define adylog_log_if(_component, _level, _predicate, _format, ...) \
|
|
126
|
+
do { \
|
|
127
|
+
if (_predicate) { \
|
|
128
|
+
adylog_log(_component, _level, _format, ##__VA_ARGS__); \
|
|
129
|
+
} \
|
|
130
|
+
} while (0)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
#define adylog_configure(_component, _level) \
|
|
135
|
+
adylog_configure_by_name(log_component_prefix _component, _level)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
#define adylog_critical(...) \
|
|
139
|
+
adylog_log(adylog_component, adylog_vCritical, _ady_str __VA_ARGS__)
|
|
140
|
+
|
|
141
|
+
#define adylog_error(...) \
|
|
142
|
+
adylog_log(adylog_component, adylog_vError, _ady_str __VA_ARGS__)
|
|
143
|
+
|
|
144
|
+
#define adylog_warning(...) \
|
|
145
|
+
adylog_log(adylog_component, adylog_vWarning, _ady_str __VA_ARGS__)
|
|
146
|
+
|
|
147
|
+
#define adylog_info(...) \
|
|
148
|
+
adylog_log(adylog_component, adylog_vInfo, _ady_str __VA_ARGS__)
|
|
149
|
+
|
|
150
|
+
#define adylog_debug(...) \
|
|
151
|
+
adylog_log(adylog_component, adylog_vDebug, _ady_str __VA_ARGS__)
|
|
152
|
+
|
|
153
|
+
#define adylog_trace(...) \
|
|
154
|
+
adylog_log(adylog_component, adylog_vTrace, _ady_str __VA_ARGS__)
|
|
155
|
+
|
|
156
|
+
#define adylog_critical_if(predicate, ...) \
|
|
157
|
+
adylog_log_if(adylog_component, adylog_vCritical, predicate, _ady_str __VA_ARGS__)
|
|
158
|
+
|
|
159
|
+
#define adylog_error_if(predicate, ...) \
|
|
160
|
+
adylog_log_if(adylog_component, adylog_vError, predicate, _ady_str __VA_ARGS__)
|
|
161
|
+
|
|
162
|
+
#define adylog_warning_if(predicate, ...) \
|
|
163
|
+
adylog_log_if(adylog_component, adylog_vWarning, predicate, _ady_str __VA_ARGS__)
|
|
164
|
+
|
|
165
|
+
#define adylog_info_if(predicate, ...) \
|
|
166
|
+
adylog_log_if(adylog_component, adylog_vInfo, predicate, _ady_str __VA_ARGS__)
|
|
167
|
+
|
|
168
|
+
#define adylog_debug_if(predicate, ...) \
|
|
169
|
+
adylog_log_if(adylog_component, adylog_vDebug, predicate, _ady_str __VA_ARGS__)
|
|
170
|
+
|
|
171
|
+
#define adylog_trace_if(predicate, ...) \
|
|
172
|
+
adylog_log_if(adylog_component, adylog_vTrace, predicate, _ady_str __VA_ARGS__)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
#endif /* defined(__Pods__adylog__) */
|
|
176
|
+
|
|
Binary file
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AdyenConstants.h
|
|
3
|
+
// scpComponentRnDeviceServices
|
|
4
|
+
//
|
|
5
|
+
// Created by Aptos on 03/26/2018.
|
|
6
|
+
// Copyright © 2017 Aptos, Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenConstants_h
|
|
10
|
+
#define AdyenConstants_h
|
|
11
|
+
|
|
12
|
+
#import <Foundation/Foundation.h>
|
|
13
|
+
|
|
14
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenLoginFailureEvent;
|
|
15
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenLoginSuccessEvent;
|
|
16
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenLoginUpdateEvent;
|
|
17
|
+
|
|
18
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenRetrieveDeviceEvent;
|
|
19
|
+
|
|
20
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenDeviceManagerWillBeginStepEvent;
|
|
21
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenDeviceManagerDidCompleteStepEvent;
|
|
22
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenDeviceManagerDidFailStepEvent;
|
|
23
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenDeviceManagerDidCompleteEvent;
|
|
24
|
+
|
|
25
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionCompleteEvent;
|
|
26
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionRequiresSignatureEvent;
|
|
27
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionProvidesAdditionalDataEvent;
|
|
28
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionRequiresPrintedReceiptEvent;
|
|
29
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionRequiresReferralEvent;
|
|
30
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionSuggestsDccEvent;
|
|
31
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionGratuityEnteredEvent;
|
|
32
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionApplicationSelectedEvent;
|
|
33
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionPinDigitEnteredEvent;
|
|
34
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionCardRemovedEvent;
|
|
35
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionConnectionLostEvent;
|
|
36
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionConnectionRestoredEvent;
|
|
37
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionStateChangedEvent;
|
|
38
|
+
FOUNDATION_EXPORT NSString * const SCPAdyenTransactionStartedEvent;
|
|
39
|
+
|
|
40
|
+
#endif /* AdyenLoginDelegate_h */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import "AdyenConstants.h"
|
|
3
|
+
|
|
4
|
+
NSString * const SCPAdyenLoginFailureEvent = @"SCPAdyenLoginFailureEvent";
|
|
5
|
+
NSString * const SCPAdyenLoginSuccessEvent = @"SCPAdyenLoginSuccessEvent";
|
|
6
|
+
NSString * const SCPAdyenLoginUpdateEvent = @"SCPAdyenLoginUpdateEvent";
|
|
7
|
+
|
|
8
|
+
NSString * const SCPAdyenRetrieveDeviceEvent = @"SCPAdyenRetrieveDeviceEvent";
|
|
9
|
+
|
|
10
|
+
NSString * const SCPAdyenDeviceManagerWillBeginStepEvent = @"SCPAdyenDeviceManagerWillBeginStepEvent";
|
|
11
|
+
NSString * const SCPAdyenDeviceManagerDidCompleteStepEvent = @"SCPAdyenDeviceManagerDidCompleteStepEvent";
|
|
12
|
+
NSString * const SCPAdyenDeviceManagerDidFailStepEvent = @"SCPAdyenDeviceManagerDidFailStepEvent";
|
|
13
|
+
NSString * const SCPAdyenDeviceManagerDidCompleteEvent = @"SCPAdyenDeviceManagerDidCompleteEvent";
|
|
14
|
+
|
|
15
|
+
NSString * const SCPAdyenTransactionCompleteEvent = @"SCPAdyenTransactionCompleteEvent";
|
|
16
|
+
NSString * const SCPAdyenTransactionRequiresSignatureEvent = @"SCPAdyenTransactionRequiresSignatureEvent";
|
|
17
|
+
NSString * const SCPAdyenTransactionProvidesAdditionalDataEvent = @"SCPAdyenTransactionProvidesAdditionalDataEvent";
|
|
18
|
+
NSString * const SCPAdyenTransactionRequiresPrintedReceiptEvent = @"SCPAdyenTransactionRequiresPrintedReceiptEvent";
|
|
19
|
+
NSString * const SCPAdyenTransactionRequiresReferralEvent = @"SCPAdyenTransactionRequiresReferralEvent";
|
|
20
|
+
NSString * const SCPAdyenTransactionSuggestsDccEvent = @"SCPAdyenTransactionSuggestsDccEvent";
|
|
21
|
+
NSString * const SCPAdyenTransactionGratuityEnteredEvent = @"SCPAdyenTransactionGratuityEnteredEvent";
|
|
22
|
+
NSString * const SCPAdyenTransactionApplicationSelectedEvent = @"SCPAdyenTransactionApplicationSelectedEvent";
|
|
23
|
+
NSString * const SCPAdyenTransactionPinDigitEnteredEvent = @"SCPAdyenTransactionPinDigitEnteredEvent";
|
|
24
|
+
NSString * const SCPAdyenTransactionCardRemovedEvent = @"SCPAdyenTransactionCardRemovedEvent";
|
|
25
|
+
NSString * const SCPAdyenTransactionConnectionLostEvent = @"SCPAdyenTransactionConnectionLostEvent";
|
|
26
|
+
NSString * const SCPAdyenTransactionConnectionRestoredEvent = @"SCPAdyenTransactionConnectionRestoredEvent";
|
|
27
|
+
NSString * const SCPAdyenTransactionStateChangedEvent = @"SCPAdyenTransactionStateChangedEvent";
|
|
28
|
+
NSString * const SCPAdyenTransactionStartedEvent = @"SCPAdyenTransactionStartedEvent";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AdyenDelegate.h
|
|
3
|
+
// scpComponentRnDeviceServices
|
|
4
|
+
//
|
|
5
|
+
// Created by Aptos on 03/26/2018.
|
|
6
|
+
// Copyright © 2017 Aptos, Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenDelegate_h
|
|
10
|
+
#define AdyenDelegate_h
|
|
11
|
+
|
|
12
|
+
#import <Foundation/Foundation.h>
|
|
13
|
+
|
|
14
|
+
@class AdyenPaymentTerminal;
|
|
15
|
+
|
|
16
|
+
@interface AdyenDelegate: NSObject
|
|
17
|
+
|
|
18
|
+
@property AdyenPaymentTerminal* adyenEmitter;
|
|
19
|
+
- (id)initWithEmitter:(AdyenPaymentTerminal *)emiiter;
|
|
20
|
+
|
|
21
|
+
@end
|
|
22
|
+
|
|
23
|
+
#endif /* AdyenDelegate_h */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#import <React/RCTLog.h>
|
|
2
|
+
#import "../AdyenPaymentTerminal.h"
|
|
3
|
+
#import "AdyenDelegate.h"
|
|
4
|
+
|
|
5
|
+
@implementation AdyenDelegate
|
|
6
|
+
|
|
7
|
+
- (id)initWithEmitter:(AdyenPaymentTerminal *)emitter {
|
|
8
|
+
self = [super init];
|
|
9
|
+
if (self) {
|
|
10
|
+
self.adyenEmitter = emitter;
|
|
11
|
+
}
|
|
12
|
+
return self;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AdyenDeviceManagerDelegate.h
|
|
3
|
+
// scpComponentRnDeviceServices
|
|
4
|
+
//
|
|
5
|
+
// Created by Aptos on 03/26/2018.
|
|
6
|
+
// Copyright © 2017 Aptos, Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenDeviceManagerDelegate_h
|
|
10
|
+
#define AdyenDeviceManagerDelegate_h
|
|
11
|
+
|
|
12
|
+
// #import <Foundation/Foundation.h>
|
|
13
|
+
#import <AdyenToolkit/AdyenToolkit.h>
|
|
14
|
+
#import "AdyenDelegate.h"
|
|
15
|
+
|
|
16
|
+
@interface AdyenDeviceManagerDelegate: AdyenDelegate <ADYDeviceManagerDelegate>
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
#endif /* AdyenDeviceManagerDelegate_h */
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#import <React/RCTLog.h>
|
|
2
|
+
#import "AdyenConstants.h"
|
|
3
|
+
#import "../AdyenPaymentTerminal.h"
|
|
4
|
+
#import "AdyenDeviceManagerDelegate.h"
|
|
5
|
+
|
|
6
|
+
@implementation AdyenDeviceManagerDelegate
|
|
7
|
+
|
|
8
|
+
#pragma mark - ADYDeviceManagerDelegate implementation
|
|
9
|
+
|
|
10
|
+
- (void)deviceManagerWillBeginStep:(ADYEMVDeviceManagerStep)step {
|
|
11
|
+
RCTLog(@"%@", [NSString stringWithFormat:@"In AdyenDeviceManagerDelegate.deviceManagerWillBeginStep, calling sendEventWithName:%@ body:%ld", SCPAdyenDeviceManagerWillBeginStepEvent, step]);
|
|
12
|
+
[self.adyenEmitter sendEventWithName:SCPAdyenDeviceManagerWillBeginStepEvent body:@(step)];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
- (void)deviceManagerDidCompleteStep:(ADYEMVDeviceManagerStep)step {
|
|
16
|
+
RCTLog(@"%@", [NSString stringWithFormat:@"In AdyenDeviceManagerDelegate.deviceManagerDidCompleteStep, calling sendEventWithName:%@ body:%ld", SCPAdyenDeviceManagerDidCompleteStepEvent, step]);
|
|
17
|
+
[self.adyenEmitter sendEventWithName:SCPAdyenDeviceManagerDidCompleteStepEvent body:@(step)];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
- (void)deviceManagerDidFailStep:(ADYEMVDeviceManagerStep)step
|
|
21
|
+
withError: (NSError *)error {
|
|
22
|
+
RCTLog(@"%@", [NSString stringWithFormat:@"In AdyenDeviceManagerDelegate.deviceManagerDidCompleteStep, calling sendEventWithName:%@ body:%ld", SCPAdyenDeviceManagerDidFailStepEvent, step]);
|
|
23
|
+
[self.adyenEmitter sendEventWithName:SCPAdyenDeviceManagerDidFailStepEvent body:@{ @"step": @(step), @"error": error.localizedDescription }];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
- (void)deviceManagerDidComplete {
|
|
27
|
+
RCTLog(@"%@", [NSString stringWithFormat:@"In AdyenDeviceManagerDelegate.deviceManagerDidComplete, calling sendEventWithName:%@ body:%@", SCPAdyenDeviceManagerDidCompleteEvent, @"YES"]);
|
|
28
|
+
[self.adyenEmitter sendEventWithName:SCPAdyenDeviceManagerDidCompleteEvent body:@(YES)];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AdyenLoginDelegate.h
|
|
3
|
+
// scpComponentRnDeviceServices
|
|
4
|
+
//
|
|
5
|
+
// Created by Aptos on 03/26/2018.
|
|
6
|
+
// Copyright © 2017 Aptos, Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenLoginDelegate_h
|
|
10
|
+
#define AdyenLoginDelegate_h
|
|
11
|
+
|
|
12
|
+
// #import <Foundation/Foundation.h>
|
|
13
|
+
#import <AdyenToolkit/AdyenToolkit.h>
|
|
14
|
+
#import "AdyenDelegate.h"
|
|
15
|
+
|
|
16
|
+
@interface AdyenLoginDelegate: AdyenDelegate <ADYLoginDelegate>
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
#endif /* AdyenLoginDelegate_h */
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#import <React/RCTLog.h>
|
|
2
|
+
#import "AdyenConstants.h"
|
|
3
|
+
#import "../AdyenPaymentTerminal.h"
|
|
4
|
+
#import "AdyenLoginDelegate.h"
|
|
5
|
+
|
|
6
|
+
@implementation AdyenLoginDelegate
|
|
7
|
+
|
|
8
|
+
#pragma mark - ADYLoginDelegate implementation
|
|
9
|
+
|
|
10
|
+
- (void)loginCompletedSuccessfullyWithInfo:(NSDictionary *)info {
|
|
11
|
+
RCTLog(@"%@", [NSString stringWithFormat:@"In AdyenLoginDelegate.loginCompletedSuccessfullyWithInfo, calling sendEventWithName:%@ body:%@", SCPAdyenLoginSuccessEvent, info]);
|
|
12
|
+
[self.adyenEmitter sendEventWithName:SCPAdyenLoginSuccessEvent body:info];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
- (void)loginFailedWithError:(NSError *)error {
|
|
16
|
+
RCTLog(@"%@", [NSString stringWithFormat:@"In AdyenLoginDelegate.loginFailedWithError, calling sendEventWithName:%@ body:%@", SCPAdyenLoginFailureEvent, error]);
|
|
17
|
+
[self.adyenEmitter sendEventWithName:SCPAdyenLoginFailureEvent body:error.localizedDescription];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
- (void)loginUpdatedProgress:(float)progress
|
|
21
|
+
status:(ADYLoginDelegateStatus) status {
|
|
22
|
+
RCTLog(@"%@", [NSString stringWithFormat:@"In AdyenLoginDelegate.loginUpdatedProgress, calling sendEventWithName:%@ body: {progress: %f, status: %ld}", SCPAdyenLoginUpdateEvent, progress, status]);
|
|
23
|
+
[self.adyenEmitter sendEventWithName:SCPAdyenLoginUpdateEvent body:@{@"progress": @(progress), @"status": @(status)}];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AdyenTransactionProcessorDelegate.h
|
|
3
|
+
// scpComponentRnDeviceServices
|
|
4
|
+
//
|
|
5
|
+
// Created by Aptos on 03/26/2018.
|
|
6
|
+
// Copyright © 2017 Aptos, Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef AdyenTransactionProcessorDelegate_h
|
|
10
|
+
#define AdyenTransactionProcessorDelegate_h
|
|
11
|
+
|
|
12
|
+
// #import <Foundation/Foundation.h>
|
|
13
|
+
#import <AdyenToolkit/AdyenToolkit.h>
|
|
14
|
+
#import "AdyenDelegate.h"
|
|
15
|
+
|
|
16
|
+
@interface AdyenTransactionProcessorDelegate: AdyenDelegate <ADYTransactionProcessorDelegate>
|
|
17
|
+
|
|
18
|
+
@property ADYTransactionRequest* request;
|
|
19
|
+
@property ADYSignatureRequest* signatureRequest;
|
|
20
|
+
@property ADYAdditionalDataRequest* additionalDataRequest;
|
|
21
|
+
@property ADYPrintReceiptRequest* printReceiptRequest;
|
|
22
|
+
@property ADYReferralRequest* referralRequest;
|
|
23
|
+
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
#endif /* AdyenTransactionProcessorDelegate_h */
|