paynl-pos-sdk-react-native 0.0.38 → 0.0.40

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.
@@ -1,6 +1,7 @@
1
1
  import android.annotation.SuppressLint
2
2
  import com.facebook.react.bridge.ReactContext
3
3
  import com.facebook.react.bridge.ReadableMap
4
+ import com.facebook.react.bridge.WritableNativeMap
4
5
  import com.paynl.pos.sdk.shared.models.paynl.PinPadLayoutParams
5
6
  import com.paynl.pos.sdk.shared.models.paynl.transaction.PayNlService
6
7
  import com.paynl.pos.sdk.shared.models.paynl.transaction.PayNlTransaction
@@ -12,6 +13,7 @@ import com.paynl.pos.sdk.shared.models.paynl.transaction.PayNlTransactionOrder
12
13
  import com.paynl.pos.sdk.shared.models.paynl.transaction.PayNlTransactionProduct
13
14
  import com.paynl.pos.sdk.shared.models.paynl.transaction.PayNlTransactionStats
14
15
  import com.paynl.pos.sdk.shared.dialogs.paymentOverlay.PaymentOverlayParams
16
+ import com.paynl.pos.sdk.shared.models.paynl.transaction.PayNlTransactionResult
15
17
 
16
18
  class PayNlUtils {
17
19
  companion object {
@@ -333,5 +335,17 @@ class PayNlUtils {
333
335
  return null
334
336
  }
335
337
  }
338
+
339
+ fun transactionResultToMap(value: PayNlTransactionResult): WritableNativeMap {
340
+ val output = WritableNativeMap()
341
+ output.putString("statusAction", value.statusAction.name)
342
+ output.putString("transactionId", value.transactionId)
343
+ output.putString("payerMessage", value.payerMessage)
344
+ output.putString("orderId", value.orderId)
345
+ output.putString("reference", value.reference)
346
+ output.putString("ticket", value.ticket)
347
+
348
+ return output
349
+ }
336
350
  }
337
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paynl-pos-sdk-react-native",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "A PayNL sdk to accept and process payments",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",