paynl-pos-sdk-react-native 0.0.60 → 0.0.62
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/PaynlSdkReactNative.podspec +1 -1
- package/ios/PayNlPosService.swift +1 -1
- package/ios/PaynlSdk.mm +11 -11
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.license = package["license"]
|
|
12
12
|
s.authors = package["author"]
|
|
13
13
|
|
|
14
|
-
s.platforms = { :ios => '
|
|
14
|
+
s.platforms = { :ios => '17.0' }
|
|
15
15
|
s.source = { :git => "https://github.com/paynl/pos-sdk.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,mm,swift}"
|
package/ios/PaynlSdk.mm
CHANGED
|
@@ -16,7 +16,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
- (void)initSdk:(JS::NativePayNlSdk::NativeInitModel &)params resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
19
|
-
if (@available(iOS
|
|
19
|
+
if (@available(iOS 17, *)) {
|
|
20
20
|
[[PayNlPosService instance] initSdkWithIntegrationId:params.integrationId() core:params.payNlCore() resolve:resolve rejecter:reject];
|
|
21
21
|
} else {
|
|
22
22
|
reject(@"UNSUPPORTED", @"iOS 18 is required for the PayNL SDK", nil);
|
|
@@ -24,7 +24,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
- (void)getActivationCode:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
27
|
-
if (@available(iOS
|
|
27
|
+
if (@available(iOS 17, *)) {
|
|
28
28
|
[[PayNlPosService instance] getActivationCodeWithResolve:resolve rejecter:reject];
|
|
29
29
|
} else {
|
|
30
30
|
reject(@"UNSUPPORTED", @"iOS 18 is required for the PayNL SDK", nil);
|
|
@@ -32,7 +32,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
- (void)loginViaCode:(nonnull NSString *)code resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
35
|
-
if (@available(iOS
|
|
35
|
+
if (@available(iOS 17, *)) {
|
|
36
36
|
[[PayNlPosService instance] loginViaCodeWithPin:code resolve:resolve rejecter:reject];
|
|
37
37
|
} else {
|
|
38
38
|
reject(@"UNSUPPORTED", @"iOS 18 is required for the PayNL SDK", nil);
|
|
@@ -40,7 +40,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
- (void)loginViaCredentials:(nonnull NSString *)aCode serviceCode:(nonnull NSString *)serviceCode serviceSecret:(nonnull NSString *)serviceSecret resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
43
|
-
if (@available(iOS
|
|
43
|
+
if (@available(iOS 17, *)) {
|
|
44
44
|
[[PayNlPosService instance] loginViaCredentialsWithACode:aCode serviceCode:serviceCode serviceSecret:serviceSecret resolve:resolve rejecter:reject];
|
|
45
45
|
} else {
|
|
46
46
|
reject(@"UNSUPPORTED", @"iOS 18 is required for the PayNL SDK", nil);
|
|
@@ -48,7 +48,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
- (void)startTransaction:(JS::NativePayNlSdk::SpecStartTransactionParams &)params resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
51
|
-
if (@available(iOS
|
|
51
|
+
if (@available(iOS 17, *)) {
|
|
52
52
|
NSDictionary *transactionModel = [self mapTransaction:params.transaction()];
|
|
53
53
|
NSDictionary *serviceData = params.forService().has_value() ? @{
|
|
54
54
|
@"serviceId": params.forService().value().serviceId(),
|
|
@@ -62,7 +62,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
- (NSArray<NSDictionary *> * _Nullable)getAllowedCurrencies {
|
|
65
|
-
if (@available(iOS
|
|
65
|
+
if (@available(iOS 17, *)) {
|
|
66
66
|
return [[PayNlPosService instance] getAllowedCurrencies];
|
|
67
67
|
} else {
|
|
68
68
|
return nil;
|
|
@@ -71,7 +71,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
- (NSDictionary * _Nullable)getTerminalInfo {
|
|
74
|
-
if (@available(iOS
|
|
74
|
+
if (@available(iOS 17, *)) {
|
|
75
75
|
return [[PayNlPosService instance] getTerminalInfo];
|
|
76
76
|
} else {
|
|
77
77
|
return nil;
|
|
@@ -79,7 +79,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
- (void) sendTicketViaEmail:(nonnull NSString *) email transactionId:(nonnull NSString *) transactionId ticket:(nonnull NSString *) ticket resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
82
|
-
if (@available(iOS
|
|
82
|
+
if (@available(iOS 17, *)) {
|
|
83
83
|
[[PayNlPosService instance] sendTicketWithEmail:email transactionId:transactionId ticket:ticket resolve:resolve rejecter:reject];
|
|
84
84
|
} else {
|
|
85
85
|
return;
|
|
@@ -88,13 +88,13 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
- (void)logout {
|
|
91
|
-
if (@available(iOS
|
|
91
|
+
if (@available(iOS 17, *)) {
|
|
92
92
|
[[PayNlPosService instance] logout];
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
- (void)sendLogs:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
97
|
-
if (@available(iOS
|
|
97
|
+
if (@available(iOS 17, *)) {
|
|
98
98
|
[[PayNlPosService instance] sendLogsWithResolve:resolve rejecter:reject];
|
|
99
99
|
} else {
|
|
100
100
|
reject(@"UNSUPPORTED", @"iOS 18 is required for the PayNL SDK", nil);
|
|
@@ -137,7 +137,7 @@ RCT_EXPORT_MODULE(PaynlSdk)
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
- (void)setConfiguration:(JS::NativePayNlSdk::NativeInitModel &)params {
|
|
140
|
-
if (@available(iOS
|
|
140
|
+
if (@available(iOS 17, *)) {
|
|
141
141
|
[[PayNlPosService instance] setConfigurationWithIntegrationId:params.integrationId() core:params.payNlCore()];
|
|
142
142
|
}
|
|
143
143
|
|