paynl-pos-sdk-react-native 0.0.56 → 0.0.57

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.
@@ -40,7 +40,7 @@ import PayNlPOSSdkSwift
40
40
 
41
41
  @objc public func initSdk(integrationId: String, core: String, resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
42
42
  Task {
43
- let result = await self.posService.initSdk(configuration: PayNlConfiguation(integrationId: integrationId, core: self.getCore(value: core))
43
+ let result = await self.posService.initSdk(configuration: PayNlConfiguation(integrationId: integrationId, core: self.getCore(value: core)))
44
44
  switch result {
45
45
  case .needsLogin:
46
46
  resolve("needs_login")
@@ -202,7 +202,11 @@ import PayNlPOSSdkSwift
202
202
  }
203
203
  }
204
204
 
205
- private func getCore(value: String?) -> PayNlCore {
205
+ @objc public func setConfiguration(integrationId: String, core: String) {
206
+ self.posService.setConfiguration(configuration: PayNlConfiguation(integrationId: integrationId, core: self.getCore(value: core)))
207
+ }
208
+
209
+ private func getCore(value: String?) -> PayNlPOSSdkSwift.PayNlCore {
206
210
  switch value {
207
211
  case "ZERO":
208
212
  return PayNlCore.ZERO
package/ios/PaynlSdk.mm CHANGED
@@ -119,9 +119,6 @@ RCT_EXPORT_MODULE(PaynlSdk)
119
119
  reject(@"UNSUPPORTED", @"This feature is not supported on iOS", nil);
120
120
  }
121
121
 
122
- - (void)initSdk:(JS::NativePayNlSdk::NativeInitModel &)params {
123
- }
124
-
125
122
  - (nonnull NSDictionary *)getOfflineQueue {
126
123
  return @{
127
124
  @"size": @0,
@@ -140,6 +137,10 @@ RCT_EXPORT_MODULE(PaynlSdk)
140
137
  }
141
138
 
142
139
  - (void)setConfiguration:(JS::NativePayNlSdk::NativeInitModel &)params {
140
+ if (@available(iOS 18, *)) {
141
+ [[PayNlPosService instance] setConfigurationWithIntegrationId:params.integrationId() core:params.payNlCore()];
142
+ }
143
+
143
144
  }
144
145
 
145
146
  - (NSDictionary *)mapTransaction:(const JS::NativePayNlSdk::Transaction &)transaction {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paynl-pos-sdk-react-native",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "description": "A PayNL sdk to accept and process payments",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",