payme-mini-app 0.4.8 → 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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
|
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)
|