payme-mini-app 0.4.26 → 0.4.28
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.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/paymeminiapp/RNPayMEMiniAppModule.kt +97 -37
- package/ios/RNPayMEMiniApp.swift +45 -33
- package/ios/RNPayMEMiniApp.xcodeproj/project.xcworkspace/xcuserdata/dattm.tran.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNPayMEMiniApp.xcodeproj/xcuserdata/dattm.tran.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/typescript/index.type.d.ts +9 -0
- package/lib/typescript/index.type.d.ts.map +1 -1
- package/package.json +1 -1
- package/payme-mini-app.podspec +1 -1
- package/src/index.type.ts +7 -0
package/android/build.gradle
CHANGED
|
@@ -74,7 +74,7 @@ dependencies {
|
|
|
74
74
|
//noinspection GradleDynamicVersion
|
|
75
75
|
implementation "com.facebook.react:react-native"
|
|
76
76
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
77
|
-
implementation 'com.github.PayME-Miniapp:native-android:0.0.
|
|
77
|
+
implementation 'com.github.PayME-Miniapp:native-android:0.0.78'
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
if (isNewArchitectureEnabled()) {
|
|
@@ -65,39 +65,67 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
65
65
|
val action = openingParam.getString("action") ?: "PAYME"
|
|
66
66
|
val phone = openingParam.getString("phone") ?: ""
|
|
67
67
|
val data = openingParam.getMap("data")
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
|
|
69
|
+
if (action == "DEPOSIT" || action == "WITHDRAW" || action == "TRANSFER") {
|
|
70
|
+
val description = if (data?.hasKey("description") == true) data.getString("description") else ""
|
|
71
|
+
val isBackToApp = if (data?.hasKey("isBackToApp") == true) data.getBoolean("isBackToApp") else true
|
|
72
|
+
val amount = if (data?.hasKey("amount") == true) data.getInt("amount") else null
|
|
73
|
+
val additionalData = DepositWithdrawTransferData(description, amount, isBackToApp)
|
|
74
|
+
val openMiniAppData = getOpenMiniAppData(action, phone, additionalData)
|
|
75
|
+
payMEMiniApp?.openMiniApp(
|
|
76
|
+
getTypeOpenMiniApp(type),
|
|
77
|
+
openMiniAppData
|
|
78
|
+
)
|
|
79
|
+
return
|
|
72
80
|
}
|
|
73
81
|
if (action == "SERVICE") {
|
|
74
|
-
service = data?.getString("service") ?: ""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
val service = data?.getString("service") ?: ""
|
|
83
|
+
val isBackToApp = if (data?.hasKey("isBackToApp") == true) data.getBoolean("isBackToApp") else true
|
|
84
|
+
val additionalData = ServiceData(service, isBackToApp)
|
|
85
|
+
val openMiniAppData = getOpenMiniAppData(action, phone, additionalData)
|
|
86
|
+
payMEMiniApp?.openMiniApp(
|
|
87
|
+
getTypeOpenMiniApp(type),
|
|
88
|
+
openMiniAppData
|
|
89
|
+
)
|
|
90
|
+
return
|
|
79
91
|
}
|
|
80
|
-
var transactionId: String? = null
|
|
81
|
-
var note: String? = null
|
|
82
|
-
var ipnUrl: String? = null
|
|
83
92
|
if (action == "PAY") {
|
|
84
|
-
transactionId = data?.getString("transactionId")
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
val transactionId = data?.getString("transactionId")
|
|
94
|
+
val amount = data?.getInt("amount")
|
|
95
|
+
val note = if (data?.hasKey("note") == true) data.getString("note") else ""
|
|
96
|
+
val ipnUrl = if (data?.hasKey("ipnUrl") == true) data.getString("ipnUrl") else ""
|
|
97
|
+
var paymentData: PaymentData?= null
|
|
98
|
+
if (amount != null && transactionId != null) {
|
|
99
|
+
paymentData = PaymentData(transactionId, amount, note, ipnUrl)
|
|
100
|
+
}
|
|
101
|
+
val openMiniAppData = getOpenMiniAppData(action, phone, paymentData)
|
|
102
|
+
payMEMiniApp?.openMiniApp(
|
|
103
|
+
getTypeOpenMiniApp(type),
|
|
104
|
+
openMiniAppData
|
|
105
|
+
)
|
|
106
|
+
return
|
|
87
107
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
108
|
+
if (action == "PAYMENT") {
|
|
109
|
+
val transaction = data?.getString("transaction")
|
|
110
|
+
var paymentData: PaymentDirectData?= null
|
|
111
|
+
if (transaction != null) {
|
|
112
|
+
paymentData = PaymentDirectData(transaction)
|
|
113
|
+
}
|
|
114
|
+
val openMiniAppData = getOpenMiniAppData(action, phone, paymentData)
|
|
115
|
+
payMEMiniApp?.openMiniApp(
|
|
116
|
+
getTypeOpenMiniApp(type),
|
|
117
|
+
openMiniAppData
|
|
118
|
+
)
|
|
119
|
+
return
|
|
92
120
|
}
|
|
93
|
-
if (action == "
|
|
94
|
-
|
|
121
|
+
if (action == "OPEN" || action == "KYC" || action == "PAYME") {
|
|
122
|
+
val openMiniAppData = getOpenMiniAppData(action, phone)
|
|
123
|
+
payMEMiniApp?.openMiniApp(
|
|
124
|
+
getTypeOpenMiniApp(type),
|
|
125
|
+
openMiniAppData
|
|
126
|
+
)
|
|
127
|
+
return
|
|
95
128
|
}
|
|
96
|
-
val openMiniAppData = getOpenMiniAppData(action, phone, paymentData, additionalData, service)
|
|
97
|
-
payMEMiniApp?.openMiniApp(
|
|
98
|
-
getTypeOpenMiniApp(type),
|
|
99
|
-
openMiniAppData
|
|
100
|
-
)
|
|
101
129
|
}
|
|
102
130
|
|
|
103
131
|
private fun onResponse(actionOpenMiniApp: ActionOpenMiniApp, jsonObject: JSONObject?) {
|
|
@@ -161,33 +189,65 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
161
189
|
private fun getOpenMiniAppData(
|
|
162
190
|
action: String,
|
|
163
191
|
phone: String,
|
|
164
|
-
paymentData: PaymentData? = null,
|
|
165
|
-
additionalData: DepositWithdrawTransferData? = null,
|
|
166
|
-
service: String? = null
|
|
167
192
|
): OpenMiniAppDataInterface {
|
|
168
193
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.OPEN) {
|
|
169
194
|
return OpenMiniAppOpenData(phone)
|
|
170
195
|
}
|
|
171
|
-
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.PAY && paymentData != null) {
|
|
172
|
-
return OpenMiniAppPaymentData(phone, paymentData!!)
|
|
173
|
-
}
|
|
174
196
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.PAYME) {
|
|
175
197
|
return OpenMiniAppPayMEData()
|
|
176
198
|
}
|
|
177
199
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.KYC) {
|
|
178
200
|
return OpenMiniAppKYCData(phone)
|
|
179
201
|
}
|
|
202
|
+
return OpenMiniAppPayMEData()
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
private fun getOpenMiniAppData(
|
|
206
|
+
action: String,
|
|
207
|
+
phone: String,
|
|
208
|
+
additionalData: DepositWithdrawTransferData? = null
|
|
209
|
+
): OpenMiniAppDataInterface {
|
|
180
210
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.DEPOSIT && additionalData != null) {
|
|
181
|
-
return OpenMiniAppDepositData(phone, additionalData
|
|
211
|
+
return OpenMiniAppDepositData(phone, additionalData)
|
|
182
212
|
}
|
|
183
213
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.WITHDRAW && additionalData != null) {
|
|
184
|
-
return OpenMiniAppWithdrawData(phone, additionalData
|
|
214
|
+
return OpenMiniAppWithdrawData(phone, additionalData)
|
|
185
215
|
}
|
|
186
216
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.TRANSFER && additionalData != null) {
|
|
187
|
-
return OpenMiniAppTransferData(phone, additionalData
|
|
217
|
+
return OpenMiniAppTransferData(phone, additionalData)
|
|
188
218
|
}
|
|
189
|
-
|
|
190
|
-
|
|
219
|
+
return OpenMiniAppPayMEData()
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private fun getOpenMiniAppData(
|
|
223
|
+
action: String,
|
|
224
|
+
phone: String,
|
|
225
|
+
paymentData: PaymentData? = null,
|
|
226
|
+
): OpenMiniAppDataInterface {
|
|
227
|
+
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.PAY && paymentData != null) {
|
|
228
|
+
return OpenMiniAppPaymentData(phone, paymentData)
|
|
229
|
+
}
|
|
230
|
+
return OpenMiniAppPayMEData()
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
private fun getOpenMiniAppData(
|
|
234
|
+
action: String,
|
|
235
|
+
phone: String,
|
|
236
|
+
paymentData: PaymentDirectData? = null,
|
|
237
|
+
): OpenMiniAppDataInterface {
|
|
238
|
+
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.PAYMENT && paymentData != null) {
|
|
239
|
+
return OpenMiniAppPaymentDirectData(phone, paymentData)
|
|
240
|
+
}
|
|
241
|
+
return OpenMiniAppPayMEData()
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
private fun getOpenMiniAppData(
|
|
245
|
+
action: String,
|
|
246
|
+
phone: String,
|
|
247
|
+
additionalData: ServiceData? = null
|
|
248
|
+
): OpenMiniAppDataInterface {
|
|
249
|
+
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.SERVICE && additionalData != null) {
|
|
250
|
+
return OpenMiniAppServiceData(phone, additionalData)
|
|
191
251
|
}
|
|
192
252
|
return OpenMiniAppPayMEData()
|
|
193
253
|
}
|
package/ios/RNPayMEMiniApp.swift
CHANGED
|
@@ -4,9 +4,12 @@ import PayMEMiniApp
|
|
|
4
4
|
class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
5
5
|
var payme: PayME!
|
|
6
6
|
|
|
7
|
-
@objc func initPayME(
|
|
7
|
+
@objc func initPayME(
|
|
8
|
+
_ appId: String, publicKey: String, privateKey: String, env: String? = "PRODUCTION",
|
|
9
|
+
mode: String? = "miniapp_product"
|
|
10
|
+
) {
|
|
8
11
|
DispatchQueue.main.sync {
|
|
9
|
-
PayMEConfig.instance.setMode(mode)
|
|
12
|
+
PayMEConfig.instance.setMode(mode ?? "miniapp_product")
|
|
10
13
|
PayMEConfig.instance.env = (env == "SANDBOX") ? .sbx : .prod
|
|
11
14
|
self.payme = PayME(key: PayMEKey(appId: appId, publicKey: publicKey, privateKey: privateKey))
|
|
12
15
|
self.payme.delegate = self
|
|
@@ -16,40 +19,50 @@ class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
16
19
|
@objc func open(_ type: String, param: NSDictionary) {
|
|
17
20
|
let openAction: PayMEAction = {
|
|
18
21
|
switch param["action"] as? String {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
case "PAYME": return PayMEAction.PayME
|
|
23
|
+
case "OPEN": return PayMEAction.Open
|
|
24
|
+
case "PAY": return PayMEAction.Pay
|
|
25
|
+
case "PAYMENT": return PayMEAction.Payment
|
|
26
|
+
case "SERVICE": return PayMEAction.Service
|
|
27
|
+
case "DEPOSIT": return PayMEAction.Deposit
|
|
28
|
+
case "WITHDRAW": return PayMEAction.Withdraw
|
|
29
|
+
case "TRANSFER": return PayMEAction.Transfer
|
|
30
|
+
case "KYC": return PayMEAction.KYC
|
|
31
|
+
default: fatalError("Invalid action!")
|
|
28
32
|
}
|
|
29
33
|
}()
|
|
30
34
|
var openData: Any? {
|
|
31
35
|
guard let data = param["data"] as? NSDictionary else { return nil }
|
|
32
36
|
switch param["action"] as? String {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
case "PAYME", "OPEN": return nil
|
|
38
|
+
case "KYC": return nil
|
|
39
|
+
case "PAY":
|
|
40
|
+
return PayMEPaymentParam(
|
|
41
|
+
amount: data["amount"] as! Int, transactionId: data["transactionId"] as! String,
|
|
42
|
+
note: data["note"] as? String, ipnUrl: data["ipnUrl"] as? String)
|
|
43
|
+
case "PAYMENT":
|
|
44
|
+
return PayMEPaymentDirectParam(transaction: data["transaction"] as! String)
|
|
45
|
+
case "SERVICE":
|
|
46
|
+
return PayMEServiceParam(service: data["service"] as! String)
|
|
47
|
+
case "DEPOSIT":
|
|
48
|
+
return PayMEPayParam(
|
|
49
|
+
amount: data["amount"] as? Int, description: data["description"] as? String)
|
|
50
|
+
case "WITHDRAW":
|
|
51
|
+
return PayMEPayParam(
|
|
52
|
+
amount: data["amount"] as? Int, description: data["description"] as? String)
|
|
53
|
+
case "TRANSFER":
|
|
54
|
+
return PayMEPayParam(
|
|
55
|
+
amount: data["amount"] as? Int, description: data["description"] as? String)
|
|
56
|
+
default: fatalError("Invalid action!")
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
DispatchQueue.main.sync {
|
|
51
61
|
let RNVC = UIApplication.shared.delegate?.window??.rootViewController
|
|
52
|
-
self.payme.open(
|
|
62
|
+
self.payme.open(
|
|
63
|
+
with: PayMEOpeningParam(
|
|
64
|
+
action: openAction, phone: param["phone"] as? String ?? "", data: openData), from: RNVC,
|
|
65
|
+
type: PayMEOpeningType(rawValue: type) ?? .screen)
|
|
53
66
|
}
|
|
54
67
|
}
|
|
55
68
|
|
|
@@ -70,15 +83,14 @@ class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
70
83
|
}
|
|
71
84
|
|
|
72
85
|
func onError(action: PayMEMiniApp.PayMEAction, error: PayMEMiniApp.PayMEError) {
|
|
73
|
-
sendEvent(
|
|
86
|
+
sendEvent(
|
|
87
|
+
withName: "onError",
|
|
88
|
+
body: ["action": action.rawValue, "code": error.code, "description": error.description])
|
|
74
89
|
}
|
|
75
90
|
|
|
76
91
|
func onResponse(action: PayMEMiniApp.PayMEAction, response: [String: Any]) {
|
|
77
|
-
sendEvent(
|
|
92
|
+
sendEvent(
|
|
93
|
+
withName: "onResponse",
|
|
94
|
+
body: ["action": action.rawValue].merging(response) { (_, new) in new })
|
|
78
95
|
}
|
|
79
96
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
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>
|
|
@@ -4,12 +4,17 @@ type PayMEPaymentParam = {
|
|
|
4
4
|
note?: string;
|
|
5
5
|
ipnUrl: string;
|
|
6
6
|
};
|
|
7
|
+
type PayMEPaymentDirectParam = {
|
|
8
|
+
transaction: string;
|
|
9
|
+
};
|
|
7
10
|
type PayMEServiceParam = {
|
|
8
11
|
service: string;
|
|
12
|
+
isBackToApp?: boolean;
|
|
9
13
|
};
|
|
10
14
|
type PayMEPayParam = {
|
|
11
15
|
amount?: number;
|
|
12
16
|
description?: string;
|
|
17
|
+
isBackToApp?: boolean;
|
|
13
18
|
};
|
|
14
19
|
export type PayMEOpeningParam = {
|
|
15
20
|
action: 'PAYME';
|
|
@@ -24,6 +29,10 @@ export type PayMEOpeningParam = {
|
|
|
24
29
|
action: 'PAY';
|
|
25
30
|
phone: string;
|
|
26
31
|
data: PayMEPaymentParam;
|
|
32
|
+
} | {
|
|
33
|
+
action: 'PAYMENT';
|
|
34
|
+
phone?: string;
|
|
35
|
+
data: PayMEPaymentDirectParam;
|
|
27
36
|
} | {
|
|
28
37
|
action: 'SERVICE';
|
|
29
38
|
phone: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.type.d.ts","sourceRoot":"","sources":["../../src/index.type.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.type.d.ts","sourceRoot":"","sources":["../../src/index.type.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,GACzD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,uBAAuB,CAAA;CAAE,GACpE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC7D;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GACzD;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GAC1D;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAE/D,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC;AAEhD,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC"}
|
package/package.json
CHANGED
package/payme-mini-app.podspec
CHANGED
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.swift_versions = "5.0"
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
|
-
s.dependency "PayME-Miniapp", "0.2.
|
|
19
|
+
s.dependency "PayME-Miniapp", "0.2.27"
|
|
20
20
|
s.dependency "React-Core"
|
|
21
21
|
s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
package/src/index.type.ts
CHANGED
|
@@ -5,13 +5,19 @@ type PayMEPaymentParam = {
|
|
|
5
5
|
ipnUrl: string;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
type PayMEPaymentDirectParam = {
|
|
9
|
+
transaction: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
8
12
|
type PayMEServiceParam = {
|
|
9
13
|
service: string;
|
|
14
|
+
isBackToApp?: boolean;
|
|
10
15
|
};
|
|
11
16
|
|
|
12
17
|
type PayMEPayParam = {
|
|
13
18
|
amount?: number;
|
|
14
19
|
description?: string;
|
|
20
|
+
isBackToApp?: boolean;
|
|
15
21
|
};
|
|
16
22
|
|
|
17
23
|
export type PayMEOpeningParam =
|
|
@@ -19,6 +25,7 @@ export type PayMEOpeningParam =
|
|
|
19
25
|
| { action: 'OPEN'; phone: string }
|
|
20
26
|
| { action: 'KYC'; phone: string }
|
|
21
27
|
| { action: 'PAY'; phone: string; data: PayMEPaymentParam }
|
|
28
|
+
| { action: 'PAYMENT'; phone?: string; data: PayMEPaymentDirectParam }
|
|
22
29
|
| { action: 'SERVICE'; phone: string; data: PayMEServiceParam }
|
|
23
30
|
| { action: 'DEPOSIT'; phone: string; data: PayMEPayParam }
|
|
24
31
|
| { action: 'WITHDRAW'; phone: string; data: PayMEPayParam }
|