payme-mini-app 0.4.7 → 0.4.9

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.
@@ -60,18 +60,32 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
60
60
  val action = openingParam.getString("action") ?: "PAYME"
61
61
  val phone = openingParam.getString("phone") ?: ""
62
62
  val data = openingParam.getMap("data")
63
- val amount = data?.getInt("amount")
64
- val service = data?.getString("service") ?: ""
65
- val description = data?.getString("amount")
66
- val transactionId = data?.getString("transactionId")
67
- val note = data?.getString("note")
68
- val ipnUrl = data?.getString("ipnUrl")
63
+ var amount: Int? = null
64
+ var service: String? = null
65
+ if (action != "SERVICE") {
66
+ amount = data?.getInt("amount")
67
+ }
68
+ if (action == "SERVICE") {
69
+ service = data?.getString("service") ?: ""
70
+ }
71
+ var description: String? = null
72
+ if (action == "DEPOSIT" || action == "WITHDRAW" || action == "TRANSFER") {
73
+ description = data?.getString("description")
74
+ }
75
+ var transactionId: String? = null
76
+ var note: String? = null
77
+ var ipnUrl: String? = null
78
+ if (action == "PAY") {
79
+ transactionId = data?.getString("transactionId")
80
+ note = data?.getString("note")
81
+ ipnUrl = data?.getString("ipnUrl")
82
+ }
69
83
  var paymentData: PaymentData? = null
70
84
  var additionalData: DepositWithdrawTransferData? = null
71
85
  if (amount != null && transactionId != null && action === "PAY") {
72
86
  paymentData = PaymentData(transactionId, amount, note, ipnUrl)
73
87
  }
74
- if (action === "DEPOSIT" || action === "WITHDRAW" || action === "TRANSFER") {
88
+ if (action == "DEPOSIT" || action == "WITHDRAW" || action == "TRANSFER") {
75
89
  additionalData = DepositWithdrawTransferData(description, amount)
76
90
  }
77
91
  val openMiniAppData = getOpenMiniAppData(action, phone, paymentData, additionalData, service)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payme-mini-app",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>RNPayMEMiniApp.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>