payme-mini-app 2.0.0 → 3.0.0
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/README.md +18 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/paymeminiapp/PaymeMiniAppModule.kt +27 -26
- package/ios/PaymeMiniApp.mm +2 -2
- package/ios/PaymeMiniApp.swift +69 -70
- package/lib/module/index.js +8 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.type.d.ts +14 -10
- package/lib/typescript/src/index.type.d.ts.map +1 -1
- package/package.json +1 -1
- package/payme-mini-app.podspec +1 -1
- package/src/index.tsx +6 -4
- package/src/index.type.ts +15 -10
package/README.md
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
Vui lòng xem tài liệu tích hợp đầy đủ [tại đây](https://github.com/PayME-Miniapp/payme-mini-app#readme)
|
|
1
|
+
Vui lòng xem tài liệu tích hợp đầy đủ [tại đây](https://github.com/PayME-Miniapp/payme-mini-app#readme)
|
|
2
|
+
## 3.0.0: identityToken thay cho phone (không tương thích với 2.x)
|
|
3
|
+
|
|
4
|
+
Dùng PayME Miniapp SDK iOS `0.8.1` và Android `0.8.2` (SDK 1.0.24). App không còn truyền số điện thoại: server của đối tác gọi API cấp chuỗi của BE PayME để lấy `identityToken` cho người dùng, rồi app truyền chuỗi này vào SDK.
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
open('modal', { action: 'OPEN', identityToken });
|
|
8
|
+
open('modal', { action: 'PAY', identityToken, data: { amount: 10000, transactionId: 'TXN', ipnUrl: '' } });
|
|
9
|
+
open('modal', { action: 'PAYMENT', data: { transaction: 'TXN' } }); // không có identityToken: khách vãng lai (thẻ, QR)
|
|
10
|
+
open('screen', { action: 'PAYME' }); // ví PayME: người dùng tự nhập số và PIN
|
|
11
|
+
getBalance(identityToken);
|
|
12
|
+
getAccountInfo(identityToken);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- `identityToken` bắt buộc với mọi action, trừ `PAYMENT` (tuỳ chọn) và `PAYME` (không dùng).
|
|
16
|
+
- Chuỗi sai hoặc hết hạn: `onError` trả code `401`. Chuỗi rỗng ở action bắt buộc, `getBalance`, `getAccountInfo`: `onError` trả code `IDENTITY_TOKEN_REQUIRED`.
|
|
17
|
+
- Chỉ giữ `identityToken` trong bộ nhớ: không log, không lưu, không đưa lên URL.
|
|
18
|
+
- iOS cần Xcode 26.2 trở lên.
|
package/android/build.gradle
CHANGED
|
@@ -73,5 +73,5 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
|
73
73
|
dependencies {
|
|
74
74
|
implementation "com.facebook.react:react-android"
|
|
75
75
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
76
|
-
implementation 'com.github.PayME-Miniapp:native-android:0.
|
|
76
|
+
implementation 'com.github.PayME-Miniapp:native-android:0.8.2'
|
|
77
77
|
}
|
|
@@ -90,13 +90,13 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
@ReactMethod
|
|
93
|
-
fun getBalance(
|
|
94
|
-
payMEMiniApp?.getBalance(
|
|
93
|
+
fun getBalance(identityToken: String) {
|
|
94
|
+
payMEMiniApp?.getBalance(identityToken)
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
@ReactMethod
|
|
98
|
-
fun getAccountInfo(
|
|
99
|
-
payMEMiniApp?.getAccountInformation(
|
|
98
|
+
fun getAccountInfo(identityToken: String) {
|
|
99
|
+
payMEMiniApp?.getAccountInformation(identityToken)
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
@ReactMethod
|
|
@@ -113,7 +113,8 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
113
113
|
@ReactMethod
|
|
114
114
|
fun open(type: String, openingParam: ReadableMap) {
|
|
115
115
|
val action = openingParam.getString("action") ?: "PAYME"
|
|
116
|
-
|
|
116
|
+
// identityToken do BE PayME ký; chỉ giữ trong bộ nhớ, không log.
|
|
117
|
+
val identityToken = if (openingParam.hasKey("identityToken")) openingParam.getString("identityToken") ?: "" else ""
|
|
117
118
|
val data = openingParam.getMap("data")
|
|
118
119
|
|
|
119
120
|
if (action == "DEPOSIT" || action == "WITHDRAW" || action == "TRANSFER") {
|
|
@@ -129,7 +130,7 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
129
130
|
val amount = if (data?.hasKey("amount") == true) data.getInt("amount") else null
|
|
130
131
|
val additionalData =
|
|
131
132
|
DepositWithdrawTransferData(description, amount, extraData, isBackToApp, isShowResult)
|
|
132
|
-
val openMiniAppData = getOpenMiniAppData(action,
|
|
133
|
+
val openMiniAppData = getOpenMiniAppData(action, identityToken, additionalData)
|
|
133
134
|
payMEMiniApp?.openMiniApp(
|
|
134
135
|
getTypeOpenMiniApp(type),
|
|
135
136
|
openMiniAppData
|
|
@@ -146,7 +147,7 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
146
147
|
val isShowResult =
|
|
147
148
|
if (data?.hasKey("isShowResult") == true) data.getBoolean("isShowResult") else true
|
|
148
149
|
val additionalData = ServiceData(service, extraData, isBackToApp, isShowResult)
|
|
149
|
-
val openMiniAppData = getOpenMiniAppData(action,
|
|
150
|
+
val openMiniAppData = getOpenMiniAppData(action, identityToken, additionalData)
|
|
150
151
|
payMEMiniApp?.openMiniApp(
|
|
151
152
|
getTypeOpenMiniApp(type),
|
|
152
153
|
openMiniAppData
|
|
@@ -167,7 +168,7 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
167
168
|
if (amount != null && transactionId != null) {
|
|
168
169
|
paymentData = PaymentData(transactionId, amount, note, ipnUrl, extraData, isShowResult)
|
|
169
170
|
}
|
|
170
|
-
val openMiniAppData = getOpenMiniAppData(action,
|
|
171
|
+
val openMiniAppData = getOpenMiniAppData(action, identityToken, paymentData)
|
|
171
172
|
payMEMiniApp?.openMiniApp(
|
|
172
173
|
getTypeOpenMiniApp(type),
|
|
173
174
|
openMiniAppData
|
|
@@ -185,7 +186,7 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
185
186
|
if (transaction != null) {
|
|
186
187
|
paymentData = PaymentDirectData(transaction, extraData, isShowResult)
|
|
187
188
|
}
|
|
188
|
-
val openMiniAppData = getOpenMiniAppData(action,
|
|
189
|
+
val openMiniAppData = getOpenMiniAppData(action, identityToken, paymentData)
|
|
189
190
|
payMEMiniApp?.openMiniApp(
|
|
190
191
|
getTypeOpenMiniApp(type),
|
|
191
192
|
openMiniAppData
|
|
@@ -218,7 +219,7 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
218
219
|
isShowResult
|
|
219
220
|
)
|
|
220
221
|
}
|
|
221
|
-
val openMiniAppData = getOpenMiniAppData(action,
|
|
222
|
+
val openMiniAppData = getOpenMiniAppData(action, identityToken, transferQRData)
|
|
222
223
|
payMEMiniApp?.openMiniApp(
|
|
223
224
|
getTypeOpenMiniApp(type),
|
|
224
225
|
openMiniAppData
|
|
@@ -226,7 +227,7 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
226
227
|
return
|
|
227
228
|
}
|
|
228
229
|
if (action == "OPEN" || action == "KYC" || action == "PAYME") {
|
|
229
|
-
val openMiniAppData = getOpenMiniAppData(action,
|
|
230
|
+
val openMiniAppData = getOpenMiniAppData(action, identityToken)
|
|
230
231
|
payMEMiniApp?.openMiniApp(
|
|
231
232
|
getTypeOpenMiniApp(type),
|
|
232
233
|
openMiniAppData
|
|
@@ -308,77 +309,77 @@ class PaymeMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
308
309
|
|
|
309
310
|
private fun getOpenMiniAppData(
|
|
310
311
|
action: String,
|
|
311
|
-
|
|
312
|
+
identityToken: String,
|
|
312
313
|
): OpenMiniAppDataInterface {
|
|
313
314
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.OPEN) {
|
|
314
|
-
return OpenMiniAppOpenData(
|
|
315
|
+
return OpenMiniAppOpenData(identityToken)
|
|
315
316
|
}
|
|
316
317
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.PAYME) {
|
|
317
318
|
return OpenMiniAppPayMEData()
|
|
318
319
|
}
|
|
319
320
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.KYC) {
|
|
320
|
-
return OpenMiniAppKYCData(
|
|
321
|
+
return OpenMiniAppKYCData(identityToken)
|
|
321
322
|
}
|
|
322
323
|
return OpenMiniAppPayMEData()
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
private fun getOpenMiniAppData(
|
|
326
327
|
action: String,
|
|
327
|
-
|
|
328
|
+
identityToken: String,
|
|
328
329
|
additionalData: DepositWithdrawTransferData? = null
|
|
329
330
|
): OpenMiniAppDataInterface {
|
|
330
331
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.DEPOSIT && additionalData != null) {
|
|
331
|
-
return OpenMiniAppDepositData(
|
|
332
|
+
return OpenMiniAppDepositData(identityToken, additionalData)
|
|
332
333
|
}
|
|
333
334
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.WITHDRAW && additionalData != null) {
|
|
334
|
-
return OpenMiniAppWithdrawData(
|
|
335
|
+
return OpenMiniAppWithdrawData(identityToken, additionalData)
|
|
335
336
|
}
|
|
336
337
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.TRANSFER && additionalData != null) {
|
|
337
|
-
return OpenMiniAppTransferData(
|
|
338
|
+
return OpenMiniAppTransferData(identityToken, additionalData)
|
|
338
339
|
}
|
|
339
340
|
return OpenMiniAppPayMEData()
|
|
340
341
|
}
|
|
341
342
|
|
|
342
343
|
private fun getOpenMiniAppData(
|
|
343
344
|
action: String,
|
|
344
|
-
|
|
345
|
+
identityToken: String,
|
|
345
346
|
paymentData: PaymentData? = null,
|
|
346
347
|
): OpenMiniAppDataInterface {
|
|
347
348
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.PAY && paymentData != null) {
|
|
348
|
-
return OpenMiniAppPaymentData(
|
|
349
|
+
return OpenMiniAppPaymentData(identityToken, paymentData)
|
|
349
350
|
}
|
|
350
351
|
return OpenMiniAppPayMEData()
|
|
351
352
|
}
|
|
352
353
|
|
|
353
354
|
private fun getOpenMiniAppData(
|
|
354
355
|
action: String,
|
|
355
|
-
|
|
356
|
+
identityToken: String,
|
|
356
357
|
paymentData: PaymentDirectData? = null,
|
|
357
358
|
): OpenMiniAppDataInterface {
|
|
358
359
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.PAYMENT && paymentData != null) {
|
|
359
|
-
return OpenMiniAppPaymentDirectData(
|
|
360
|
+
return OpenMiniAppPaymentDirectData(identityToken = identityToken.ifEmpty { null }, paymentDirectData = paymentData)
|
|
360
361
|
}
|
|
361
362
|
return OpenMiniAppPayMEData()
|
|
362
363
|
}
|
|
363
364
|
|
|
364
365
|
private fun getOpenMiniAppData(
|
|
365
366
|
action: String,
|
|
366
|
-
|
|
367
|
+
identityToken: String,
|
|
367
368
|
transferQRData: TransferQRData? = null,
|
|
368
369
|
): OpenMiniAppDataInterface {
|
|
369
370
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.TRANSFER_QR && transferQRData != null) {
|
|
370
|
-
return OpenMiniAppTransferQRData(
|
|
371
|
+
return OpenMiniAppTransferQRData(identityToken, transferQRData)
|
|
371
372
|
}
|
|
372
373
|
return OpenMiniAppPayMEData()
|
|
373
374
|
}
|
|
374
375
|
|
|
375
376
|
private fun getOpenMiniAppData(
|
|
376
377
|
action: String,
|
|
377
|
-
|
|
378
|
+
identityToken: String,
|
|
378
379
|
additionalData: ServiceData? = null
|
|
379
380
|
): OpenMiniAppDataInterface {
|
|
380
381
|
if (getActionOpenMiniApp(action) == ActionOpenMiniApp.SERVICE && additionalData != null) {
|
|
381
|
-
return OpenMiniAppServiceData(
|
|
382
|
+
return OpenMiniAppServiceData(identityToken, additionalData)
|
|
382
383
|
}
|
|
383
384
|
return OpenMiniAppPayMEData()
|
|
384
385
|
}
|
package/ios/PaymeMiniApp.mm
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
RCT_EXTERN_METHOD(initPayME:(NSString*)appId publicKey:(NSString)publicKey privateKey:(NSString)privateKey locale:(NSString)locale env:(NSString)env mode:(NSString)mode)
|
|
7
7
|
RCT_EXTERN_METHOD(open:(NSString*)type param:(NSDictionary)param)
|
|
8
|
-
RCT_EXTERN_METHOD(getBalance:(NSString*)
|
|
9
|
-
RCT_EXTERN_METHOD(getAccountInfo:(NSString*)
|
|
8
|
+
RCT_EXTERN_METHOD(getBalance:(NSString*)identityToken)
|
|
9
|
+
RCT_EXTERN_METHOD(getAccountInfo:(NSString*)identityToken)
|
|
10
10
|
RCT_EXTERN_METHOD(setLanguage:(NSString*)language)
|
|
11
11
|
RCT_EXTERN_METHOD(closeMiniApp)
|
|
12
12
|
|
package/ios/PaymeMiniApp.swift
CHANGED
|
@@ -20,77 +20,76 @@ class PaymeMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
@objc func open(_ type: String, param: NSDictionary) {
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
case "WITHDRAW": return PayMEAction.Withdraw
|
|
33
|
-
case "TRANSFER": return PayMEAction.Transfer
|
|
34
|
-
case "KYC": return PayMEAction.KYC
|
|
35
|
-
default: fatalError("Invalid action!")
|
|
36
|
-
}
|
|
37
|
-
}()
|
|
38
|
-
var openData: Any? {
|
|
39
|
-
guard let data = param["data"] as? NSDictionary else { return nil }
|
|
40
|
-
switch param["action"] as? String {
|
|
41
|
-
case "PAYME", "OPEN": return nil
|
|
42
|
-
case "KYC": return nil
|
|
43
|
-
case "PAY":
|
|
44
|
-
return PayMEPaymentParam(
|
|
45
|
-
amount: data["amount"] as! Int, transactionId: data["transactionId"] as! String,
|
|
46
|
-
note: data["note"] as? String, ipnUrl: data["ipnUrl"] as? String,
|
|
47
|
-
extraData: data["extraData"] as? [String: Any],
|
|
48
|
-
isShowResult: data["isShowResult"] as? Bool)
|
|
49
|
-
case "PAYMENT":
|
|
50
|
-
return PayMEPaymentDirectParam(
|
|
51
|
-
transaction: data["transaction"] as! String,
|
|
52
|
-
extraData: data["extraData"] as? [String: Any],
|
|
53
|
-
isShowResult: data["isShowResult"] as? Bool)
|
|
54
|
-
case "TRANSFER_QR":
|
|
55
|
-
return PayMETransferQRParam(
|
|
56
|
-
amount: data["amount"] as! Int, swiftCode: data["swiftCode"] as! String,
|
|
57
|
-
bankNumber: data["bankNumber"] as! String, cardHolder: data["cardHolder"] as! String,
|
|
58
|
-
partnerTransaction: data["partnerTransaction"] as? String,
|
|
59
|
-
note: data["note"] as? String, extraData: data["extraData"] as? [String: Any],
|
|
60
|
-
isShowResult: data["isShowResult"] as? Bool)
|
|
61
|
-
case "SERVICE":
|
|
62
|
-
return PayMEServiceParam(
|
|
63
|
-
service: data["service"] as! String, extraData: data["extraData"] as? [String: Any],
|
|
64
|
-
isBackToApp: data["isBackToApp"] as? Bool,
|
|
65
|
-
isShowResult: data["isShowResult"] as? Bool)
|
|
66
|
-
case "DEPOSIT":
|
|
67
|
-
return PayMEPayParam(
|
|
68
|
-
amount: data["amount"] as? Int, extraData: data["extraData"] as? [String: Any],
|
|
69
|
-
description: data["description"] as? String,
|
|
70
|
-
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool)
|
|
71
|
-
case "WITHDRAW":
|
|
72
|
-
return PayMEPayParam(
|
|
73
|
-
amount: data["amount"] as? Int, extraData: data["extraData"] as? [String: Any],
|
|
74
|
-
description: data["description"] as? String,
|
|
75
|
-
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool)
|
|
76
|
-
case "TRANSFER":
|
|
77
|
-
return PayMEPayParam(
|
|
78
|
-
amount: data["amount"] as? Int, extraData: data["extraData"] as? [String: Any],
|
|
79
|
-
description: data["description"] as? String,
|
|
80
|
-
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool)
|
|
81
|
-
default: fatalError("Invalid action!")
|
|
82
|
-
}
|
|
23
|
+
let action = param["action"] as? String ?? ""
|
|
24
|
+
let data = param["data"] as? NSDictionary
|
|
25
|
+
// identityToken do BE PayME ký; chỉ giữ trong bộ nhớ, không log.
|
|
26
|
+
let identityToken = param["identityToken"] as? String ?? ""
|
|
27
|
+
guard let opening = Self.openingParam(action: action, identityToken: identityToken, data: data) else {
|
|
28
|
+
sendEvent(
|
|
29
|
+
withName: "onError",
|
|
30
|
+
body: ["action": action, "code": "INVALID_PARAM", "description": "Thiếu hoặc sai data cho action \(action)"])
|
|
31
|
+
return
|
|
83
32
|
}
|
|
84
|
-
|
|
85
33
|
DispatchQueue.main.sync {
|
|
86
34
|
let RNVC = UIApplication.shared.delegate?.window??.rootViewController
|
|
87
|
-
self.payme.open(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
35
|
+
self.payme.open(with: opening, from: RNVC, type: PayMEOpeningType(rawValue: type) ?? .screen)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/// SDK 0.8.x: mỗi action có một factory; identityToken bắt buộc trừ PAYMENT (tuỳ chọn) và PAYME (không dùng).
|
|
40
|
+
private static func openingParam(action: String, identityToken: String, data: NSDictionary?) -> PayMEOpeningParam? {
|
|
41
|
+
switch action {
|
|
42
|
+
case "PAYME": return .payme()
|
|
43
|
+
case "OPEN": return .open(identityToken: identityToken)
|
|
44
|
+
case "KYC": return .kyc(identityToken: identityToken)
|
|
45
|
+
case "PAY":
|
|
46
|
+
guard let data, let amount = data["amount"] as? Int, let transactionId = data["transactionId"] as? String
|
|
47
|
+
else { return nil }
|
|
48
|
+
return .pay(
|
|
49
|
+
identityToken: identityToken,
|
|
50
|
+
data: PayMEPaymentParam(
|
|
51
|
+
amount: amount, transactionId: transactionId, note: data["note"] as? String,
|
|
52
|
+
ipnUrl: data["ipnUrl"] as? String, extraData: data["extraData"] as? [String: Any],
|
|
53
|
+
isShowResult: data["isShowResult"] as? Bool))
|
|
54
|
+
case "PAYMENT":
|
|
55
|
+
guard let data, let transaction = data["transaction"] as? String else { return nil }
|
|
56
|
+
return .payment(
|
|
57
|
+
identityToken: identityToken.isEmpty ? nil : identityToken,
|
|
58
|
+
data: PayMEPaymentDirectParam(
|
|
59
|
+
transaction: transaction, extraData: data["extraData"] as? [String: Any],
|
|
60
|
+
isShowResult: data["isShowResult"] as? Bool))
|
|
61
|
+
case "TRANSFER_QR":
|
|
62
|
+
guard let data, let amount = data["amount"] as? Int, let swiftCode = data["swiftCode"] as? String,
|
|
63
|
+
let bankNumber = data["bankNumber"] as? String, let cardHolder = data["cardHolder"] as? String
|
|
64
|
+
else { return nil }
|
|
65
|
+
return .transferQR(
|
|
66
|
+
identityToken: identityToken,
|
|
67
|
+
data: PayMETransferQRParam(
|
|
68
|
+
amount: amount, swiftCode: swiftCode, bankNumber: bankNumber, cardHolder: cardHolder,
|
|
69
|
+
partnerTransaction: data["partnerTransaction"] as? String, note: data["note"] as? String,
|
|
70
|
+
extraData: data["extraData"] as? [String: Any], isShowResult: data["isShowResult"] as? Bool))
|
|
71
|
+
case "SERVICE":
|
|
72
|
+
guard let data, let service = data["service"] as? String else { return nil }
|
|
73
|
+
return .service(
|
|
74
|
+
identityToken: identityToken,
|
|
75
|
+
data: PayMEServiceParam(
|
|
76
|
+
service: service, extraData: data["extraData"] as? [String: Any],
|
|
77
|
+
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool))
|
|
78
|
+
case "DEPOSIT": return .deposit(identityToken: identityToken, data: payParam(data))
|
|
79
|
+
case "WITHDRAW": return .withdraw(identityToken: identityToken, data: payParam(data))
|
|
80
|
+
case "TRANSFER": return .transfer(identityToken: identityToken, data: payParam(data))
|
|
81
|
+
default: return nil
|
|
91
82
|
}
|
|
92
83
|
}
|
|
93
|
-
|
|
84
|
+
|
|
85
|
+
private static func payParam(_ data: NSDictionary?) -> PayMEPayParam? {
|
|
86
|
+
guard let data else { return nil }
|
|
87
|
+
return PayMEPayParam(
|
|
88
|
+
amount: data["amount"] as? Int, extraData: data["extraData"] as? [String: Any],
|
|
89
|
+
description: data["description"] as? String,
|
|
90
|
+
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool)
|
|
91
|
+
}
|
|
92
|
+
|
|
94
93
|
@objc func closeMiniApp() {
|
|
95
94
|
DispatchQueue.main.sync {
|
|
96
95
|
let RNVC = UIApplication.shared.delegate?.window??.rootViewController
|
|
@@ -98,9 +97,9 @@ class PaymeMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
|
|
101
|
-
@objc func getBalance(_
|
|
100
|
+
@objc func getBalance(_ identityToken: String) {
|
|
102
101
|
DispatchQueue.main.sync {
|
|
103
|
-
self.payme.getBalance(
|
|
102
|
+
self.payme.getBalance(identityToken: identityToken)
|
|
104
103
|
}
|
|
105
104
|
}
|
|
106
105
|
|
|
@@ -110,9 +109,9 @@ class PaymeMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
@objc func getAccountInfo(_
|
|
112
|
+
@objc func getAccountInfo(_ identityToken: String) {
|
|
114
113
|
DispatchQueue.main.sync {
|
|
115
|
-
self.payme.getAccountInformation(
|
|
114
|
+
self.payme.getAccountInformation(identityToken: identityToken)
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
|
package/lib/module/index.js
CHANGED
|
@@ -8,11 +8,15 @@ export function init(appId, publicKey, privateKey, locale = 'vi', env = 'PRODUCT
|
|
|
8
8
|
export function open(type, openingParam) {
|
|
9
9
|
return RNPayMEMiniApp.open(type, openingParam);
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
|
|
12
|
+
/** identityToken sai hoặc hết hạn: onError trả code `401`; rỗng: `IDENTITY_TOKEN_REQUIRED`. */
|
|
13
|
+
export function getBalance(identityToken) {
|
|
14
|
+
return RNPayMEMiniApp.getBalance(identityToken);
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
/** identityToken sai hoặc hết hạn: onError trả code `401`; rỗng: `IDENTITY_TOKEN_REQUIRED`. */
|
|
18
|
+
export function getAccountInfo(identityToken) {
|
|
19
|
+
return RNPayMEMiniApp.getAccountInfo(identityToken);
|
|
16
20
|
}
|
|
17
21
|
export function setLanguage(language) {
|
|
18
22
|
return RNPayMEMiniApp.setLanguage(language);
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","RNPayMEMiniApp","PaymeMiniApp","init","appId","publicKey","privateKey","locale","env","mode","initPayME","open","type","openingParam","getBalance","
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","RNPayMEMiniApp","PaymeMiniApp","init","appId","publicKey","privateKey","locale","env","mode","initPayME","open","type","openingParam","getBalance","identityToken","getAccountInfo","setLanguage","language","close","closeMiniApp","PayMEMiniAppEvents","OS"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAS1E,MAAMC,cAAc,GAAGF,aAAa,CAACG,YAAY;AAEjD,OAAO,SAASC,IAAIA,CAClBC,KAAa,EACbC,SAAiB,EACjBC,UAAkB,EAClBC,MAAmB,GAAG,IAAI,EAC1BC,GAAa,GAAG,YAAY,EAC5BC,IAAe,GAAG,iBAAiB,EACnC;EACA,OAAOR,cAAc,CAACS,SAAS,CAC7BN,KAAK,EACLC,SAAS,EACTC,UAAU,EACVC,MAAM,EACNC,GAAG,EACHC,IACF,CAAC;AACH;AAEA,OAAO,SAASE,IAAIA,CAACC,IAAsB,EAAEC,YAA+B,EAAE;EAC5E,OAAOZ,cAAc,CAACU,IAAI,CAACC,IAAI,EAAEC,YAAY,CAAC;AAChD;;AAEA;AACA,OAAO,SAASC,UAAUA,CAACC,aAAqB,EAAE;EAChD,OAAOd,cAAc,CAACa,UAAU,CAACC,aAAa,CAAC;AACjD;;AAEA;AACA,OAAO,SAASC,cAAcA,CAACD,aAAqB,EAAE;EACpD,OAAOd,cAAc,CAACe,cAAc,CAACD,aAAa,CAAC;AACrD;AAEA,OAAO,SAASE,WAAWA,CAACC,QAAgB,EAAE;EAC5C,OAAOjB,cAAc,CAACgB,WAAW,CAACC,QAAQ,CAAC;AAC7C;AAEA,OAAO,SAASC,KAAKA,CAAA,EAAG;EACtB,OAAOlB,cAAc,CAACmB,YAAY,CAAC,CAAC;AACtC;;AAEA;AACA,OAAO,MAAMC,kBAAkB,GAC7BrB,QAAQ,CAACsB,EAAE,KAAK,KAAK,GACjB,IAAIxB,kBAAkB,CAACG,cAAc,CAAC,GACtC,IAAIH,kBAAkB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,8 +2,10 @@ import { NativeEventEmitter } from 'react-native';
|
|
|
2
2
|
import type { PayMEEnv, PayMELocale, PayMEMode, PayMEOpeningParam, PayMEOpeningType } from './index.type.js';
|
|
3
3
|
export declare function init(appId: string, publicKey: string, privateKey: string, locale?: PayMELocale, env?: PayMEEnv, mode?: PayMEMode): any;
|
|
4
4
|
export declare function open(type: PayMEOpeningType, openingParam: PayMEOpeningParam): any;
|
|
5
|
-
|
|
6
|
-
export declare function
|
|
5
|
+
/** identityToken sai hoặc hết hạn: onError trả code `401`; rỗng: `IDENTITY_TOKEN_REQUIRED`. */
|
|
6
|
+
export declare function getBalance(identityToken: string): any;
|
|
7
|
+
/** identityToken sai hoặc hết hạn: onError trả code `401`; rỗng: `IDENTITY_TOKEN_REQUIRED`. */
|
|
8
|
+
export declare function getAccountInfo(identityToken: string): any;
|
|
7
9
|
export declare function setLanguage(language: string): any;
|
|
8
10
|
export declare function close(): any;
|
|
9
11
|
export declare const PayMEMiniAppEvents: NativeEventEmitter<Readonly<Record<string, readonly Object[]>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,iBAAc,CAAC;AAItB,wBAAgB,IAAI,CAClB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,WAAkB,EAC1B,GAAG,GAAE,QAAuB,EAC5B,IAAI,GAAE,SAA6B,OAUpC;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,OAE3E;AAED,wBAAgB,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,iBAAc,CAAC;AAItB,wBAAgB,IAAI,CAClB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,WAAkB,EAC1B,GAAG,GAAE,QAAuB,EAC5B,IAAI,GAAE,SAA6B,OAUpC;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,OAE3E;AAED,+FAA+F;AAC/F,wBAAgB,UAAU,CAAC,aAAa,EAAE,MAAM,OAE/C;AAED,+FAA+F;AAC/F,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,OAEnD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,OAE3C;AAED,wBAAgB,KAAK,QAEpB;AAGD,eAAO,MAAM,kBAAkB,iEAGD,CAAC"}
|
|
@@ -34,42 +34,46 @@ type PayMEPayParam = {
|
|
|
34
34
|
isBackToApp?: boolean;
|
|
35
35
|
isShowResult?: boolean;
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* identityToken: chuỗi do BE PayME ký cho người dùng của đối tác (server đối tác gọi API cấp chuỗi).
|
|
39
|
+
* Chỉ giữ trong bộ nhớ: không log, không lưu, không đưa lên URL.
|
|
40
|
+
* - Bắt buộc với mọi action, trừ PAYMENT (tuỳ chọn: không có thì chỉ trả bằng thẻ/QR) và PAYME (không dùng).
|
|
41
|
+
*/
|
|
37
42
|
export type PayMEOpeningParam = {
|
|
38
43
|
action: 'PAYME';
|
|
39
|
-
phone: string;
|
|
40
44
|
} | {
|
|
41
45
|
action: 'OPEN';
|
|
42
|
-
|
|
46
|
+
identityToken: string;
|
|
43
47
|
} | {
|
|
44
48
|
action: 'KYC';
|
|
45
|
-
|
|
49
|
+
identityToken: string;
|
|
46
50
|
} | {
|
|
47
51
|
action: 'PAY';
|
|
48
|
-
|
|
52
|
+
identityToken: string;
|
|
49
53
|
data: PayMEPaymentParam;
|
|
50
54
|
} | {
|
|
51
55
|
action: 'TRANSFER_QR';
|
|
52
|
-
|
|
56
|
+
identityToken: string;
|
|
53
57
|
data: PayMETransferQRParam;
|
|
54
58
|
} | {
|
|
55
59
|
action: 'PAYMENT';
|
|
56
|
-
|
|
60
|
+
identityToken?: string;
|
|
57
61
|
data: PayMEPaymentDirectParam;
|
|
58
62
|
} | {
|
|
59
63
|
action: 'SERVICE';
|
|
60
|
-
|
|
64
|
+
identityToken: string;
|
|
61
65
|
data: PayMEServiceParam;
|
|
62
66
|
} | {
|
|
63
67
|
action: 'DEPOSIT';
|
|
64
|
-
|
|
68
|
+
identityToken: string;
|
|
65
69
|
data: PayMEPayParam;
|
|
66
70
|
} | {
|
|
67
71
|
action: 'WITHDRAW';
|
|
68
|
-
|
|
72
|
+
identityToken: string;
|
|
69
73
|
data: PayMEPayParam;
|
|
70
74
|
} | {
|
|
71
75
|
action: 'TRANSFER';
|
|
72
|
-
|
|
76
|
+
identityToken: string;
|
|
73
77
|
data: PayMEPayParam;
|
|
74
78
|
};
|
|
75
79
|
export type PayMEEnv = 'PRODUCTION' | 'STAGING' | 'SANDBOX';
|
|
@@ -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;IACf,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.type.d.ts","sourceRoot":"","sources":["../../../src/index.type.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
package/payme-mini-app.podspec
CHANGED
|
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.source = { :git => "http://git.mecorp.vn/paymeproject/payme-miniapp-reactnative.git", :tag => "#{s.version}" }
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
17
|
s.resource_bundles = {'payme-mini-app_PrivacyInfo' => ['ios/PrivacyInfo.xcprivacy'] }
|
|
18
|
-
s.dependency "PayME-Miniapp", "0.
|
|
18
|
+
s.dependency "PayME-Miniapp", "0.8.1"
|
|
19
19
|
s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
|
|
20
20
|
|
|
21
21
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
package/src/index.tsx
CHANGED
|
@@ -31,12 +31,14 @@ export function open(type: PayMEOpeningType, openingParam: PayMEOpeningParam) {
|
|
|
31
31
|
return RNPayMEMiniApp.open(type, openingParam);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
/** identityToken sai hoặc hết hạn: onError trả code `401`; rỗng: `IDENTITY_TOKEN_REQUIRED`. */
|
|
35
|
+
export function getBalance(identityToken: string) {
|
|
36
|
+
return RNPayMEMiniApp.getBalance(identityToken);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
/** identityToken sai hoặc hết hạn: onError trả code `401`; rỗng: `IDENTITY_TOKEN_REQUIRED`. */
|
|
40
|
+
export function getAccountInfo(identityToken: string) {
|
|
41
|
+
return RNPayMEMiniApp.getAccountInfo(identityToken);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
export function setLanguage(language: string) {
|
package/src/index.type.ts
CHANGED
|
@@ -39,17 +39,22 @@ type PayMEPayParam = {
|
|
|
39
39
|
isShowResult?: boolean;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* identityToken: chuỗi do BE PayME ký cho người dùng của đối tác (server đối tác gọi API cấp chuỗi).
|
|
44
|
+
* Chỉ giữ trong bộ nhớ: không log, không lưu, không đưa lên URL.
|
|
45
|
+
* - Bắt buộc với mọi action, trừ PAYMENT (tuỳ chọn: không có thì chỉ trả bằng thẻ/QR) và PAYME (không dùng).
|
|
46
|
+
*/
|
|
42
47
|
export type PayMEOpeningParam =
|
|
43
|
-
| { action: 'PAYME'
|
|
44
|
-
| { action: 'OPEN';
|
|
45
|
-
| { action: 'KYC';
|
|
46
|
-
| { action: 'PAY';
|
|
47
|
-
| { action: 'TRANSFER_QR';
|
|
48
|
-
| { action: 'PAYMENT';
|
|
49
|
-
| { action: 'SERVICE';
|
|
50
|
-
| { action: 'DEPOSIT';
|
|
51
|
-
| { action: 'WITHDRAW';
|
|
52
|
-
| { action: 'TRANSFER';
|
|
48
|
+
| { action: 'PAYME' }
|
|
49
|
+
| { action: 'OPEN'; identityToken: string }
|
|
50
|
+
| { action: 'KYC'; identityToken: string }
|
|
51
|
+
| { action: 'PAY'; identityToken: string; data: PayMEPaymentParam }
|
|
52
|
+
| { action: 'TRANSFER_QR'; identityToken: string; data: PayMETransferQRParam }
|
|
53
|
+
| { action: 'PAYMENT'; identityToken?: string; data: PayMEPaymentDirectParam }
|
|
54
|
+
| { action: 'SERVICE'; identityToken: string; data: PayMEServiceParam }
|
|
55
|
+
| { action: 'DEPOSIT'; identityToken: string; data: PayMEPayParam }
|
|
56
|
+
| { action: 'WITHDRAW'; identityToken: string; data: PayMEPayParam }
|
|
57
|
+
| { action: 'TRANSFER'; identityToken: string; data: PayMEPayParam };
|
|
53
58
|
|
|
54
59
|
export type PayMEEnv = 'PRODUCTION' | 'STAGING' | 'SANDBOX';
|
|
55
60
|
|