paynl-pos-sdk-react-native 0.0.91 → 0.0.93

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.
@@ -4,4 +4,4 @@ PaynlSdkReactNative_targetSdkVersion=34
4
4
  PaynlSdkReactNative_compileSdkVersion=35
5
5
  PaynlSdkReactNative_ndkVersion=27.1.12297006
6
6
  PaynlSdkReactNative_paynlPackage=sdk.softpos
7
- PaynlSdkReactNative_paynlVersion=0.0.120
7
+ PaynlSdkReactNative_paynlVersion=0.0.122
@@ -1,3 +1,5 @@
1
+ package com.paynl.sdk.reactnative
2
+
1
3
  import android.annotation.SuppressLint
2
4
  import com.facebook.react.bridge.ReactContext
3
5
  import com.facebook.react.bridge.ReadableMap
@@ -1,8 +1,6 @@
1
1
  package com.paynl.sdk.reactnative
2
2
 
3
- import PayNlUtils
4
3
  import android.os.Bundle
5
- import android.util.Log
6
4
  import com.facebook.react.bridge.Promise
7
5
  import com.facebook.react.bridge.ReactApplicationContext
8
6
  import com.facebook.react.bridge.LifecycleEventListener
@@ -16,13 +14,10 @@ import com.paynl.pos.sdk.PosService
16
14
  import com.paynl.pos.sdk.shared.events.PaymentEvent
17
15
  import com.paynl.pos.sdk.shared.exceptions.SVErrorBaseException
18
16
  import com.paynl.pos.sdk.shared.exceptions.SV_0000_UNEXPECTED_ERROR
19
- import com.paynl.pos.sdk.shared.models.paynl.PayNlConfigurationBuilder
20
17
  import com.paynl.pos.sdk.shared.models.paynl.PayNlInitResult
21
18
  import java.text.DateFormat
22
19
  import java.text.SimpleDateFormat
23
20
  import java.util.concurrent.CompletableFuture
24
- import java.util.concurrent.ExecutorService
25
- import java.util.concurrent.Executors
26
21
 
27
22
  @ReactModule(name = PayNlSdkModule.NAME)
28
23
  class PayNlSdkModule(private val reactContext: ReactApplicationContext) :
@@ -264,8 +259,8 @@ class PayNlSdkModule(private val reactContext: ReactApplicationContext) :
264
259
  }
265
260
  }
266
261
 
267
- override fun queryLogs(days: Int, promise: Promise) {
268
- val result = posService.queryLogs(days)
262
+ override fun queryLogs(days: Double, promise: Promise) {
263
+ val result = posService.queryLogs(days.toInt())
269
264
  promise.resolve(PayNlUtils.parseLogs(result))
270
265
  }
271
266
 
@@ -283,8 +283,8 @@ class PayNlSdkModule(private val reactContext: ReactApplicationContext) :
283
283
  }
284
284
 
285
285
  @ReactMethod
286
- fun queryLogs(days: Int, promise: Promise) {
287
- val result = posService.queryLogs(days)
286
+ fun queryLogs(days: Double, promise: Promise) {
287
+ val result = posService.queryLogs(days.toInt())
288
288
  promise.resolve(PayNlUtils.parseLogs(result))
289
289
  }
290
290
 
@@ -234,14 +234,14 @@ import PayNlPOSSdkSwift
234
234
 
235
235
  @objc public func queryLogs(days: Double, resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
236
236
  Task {
237
- let result = self.posService.queryLogs(days: Int(days))
238
- let output [[String: Any]] = result.map { log in
237
+ let result = self.posService.queryLogs(days: Int(days))
238
+ let output: [[String: Any]] = result.map { log in
239
239
  return [
240
240
  "date": log.date,
241
241
  "level": log.level,
242
242
  "message": log.message,
243
243
  "line": log.line
244
- ] as? [String: Any]
244
+ ] as [String: Any]
245
245
  }
246
246
 
247
247
  resolve(output)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paynl-pos-sdk-react-native",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
4
4
  "description": "A PayNL sdk to accept and process payments",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",