payme-mini-app 0.5.0 → 0.5.1
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 +8 -4
- package/ios/RNPayMEMiniApp.swift +9 -6
- package/lib/typescript/index.type.d.ts +4 -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 +4 -0
- 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 +0 -14
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.80'
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
if (isNewArchitectureEnabled()) {
|
|
@@ -69,8 +69,9 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
69
69
|
if (action == "DEPOSIT" || action == "WITHDRAW" || action == "TRANSFER") {
|
|
70
70
|
val description = if (data?.hasKey("description") == true) data.getString("description") else ""
|
|
71
71
|
val isBackToApp = if (data?.hasKey("isBackToApp") == true) data.getBoolean("isBackToApp") else true
|
|
72
|
+
val isShowResult = if (data?.hasKey("isShowResult") == true) data.getBoolean("isShowResult") else true
|
|
72
73
|
val amount = if (data?.hasKey("amount") == true) data.getInt("amount") else null
|
|
73
|
-
val additionalData = DepositWithdrawTransferData(description, amount, isBackToApp)
|
|
74
|
+
val additionalData = DepositWithdrawTransferData(description, amount, isBackToApp, isShowResult)
|
|
74
75
|
val openMiniAppData = getOpenMiniAppData(action, phone, additionalData)
|
|
75
76
|
payMEMiniApp?.openMiniApp(
|
|
76
77
|
getTypeOpenMiniApp(type),
|
|
@@ -81,7 +82,8 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
81
82
|
if (action == "SERVICE") {
|
|
82
83
|
val service = data?.getString("service") ?: ""
|
|
83
84
|
val isBackToApp = if (data?.hasKey("isBackToApp") == true) data.getBoolean("isBackToApp") else true
|
|
84
|
-
val
|
|
85
|
+
val isShowResult = if (data?.hasKey("isShowResult") == true) data.getBoolean("isShowResult") else true
|
|
86
|
+
val additionalData = ServiceData(service, isBackToApp, isShowResult)
|
|
85
87
|
val openMiniAppData = getOpenMiniAppData(action, phone, additionalData)
|
|
86
88
|
payMEMiniApp?.openMiniApp(
|
|
87
89
|
getTypeOpenMiniApp(type),
|
|
@@ -94,9 +96,10 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
94
96
|
val amount = data?.getInt("amount")
|
|
95
97
|
val note = if (data?.hasKey("note") == true) data.getString("note") else ""
|
|
96
98
|
val ipnUrl = if (data?.hasKey("ipnUrl") == true) data.getString("ipnUrl") else ""
|
|
99
|
+
val isShowResult = if (data?.hasKey("isShowResult") == true) data.getBoolean("isShowResult") else true
|
|
97
100
|
var paymentData: PaymentData?= null
|
|
98
101
|
if (amount != null && transactionId != null) {
|
|
99
|
-
paymentData = PaymentData(transactionId, amount, note, ipnUrl)
|
|
102
|
+
paymentData = PaymentData(transactionId, amount, note, ipnUrl, isShowResult)
|
|
100
103
|
}
|
|
101
104
|
val openMiniAppData = getOpenMiniAppData(action, phone, paymentData)
|
|
102
105
|
payMEMiniApp?.openMiniApp(
|
|
@@ -107,9 +110,10 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
|
|
|
107
110
|
}
|
|
108
111
|
if (action == "PAYMENT") {
|
|
109
112
|
val transaction = data?.getString("transaction")
|
|
113
|
+
val isShowResult = if (data?.hasKey("isShowResult") == true) data.getBoolean("isShowResult") else true
|
|
110
114
|
var paymentData: PaymentDirectData?= null
|
|
111
115
|
if (transaction != null) {
|
|
112
|
-
paymentData = PaymentDirectData(transaction)
|
|
116
|
+
paymentData = PaymentDirectData(transaction, isShowResult)
|
|
113
117
|
}
|
|
114
118
|
val openMiniAppData = getOpenMiniAppData(action, phone, paymentData)
|
|
115
119
|
payMEMiniApp?.openMiniApp(
|
package/ios/RNPayMEMiniApp.swift
CHANGED
|
@@ -39,24 +39,27 @@ class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
39
39
|
case "PAY":
|
|
40
40
|
return PayMEPaymentParam(
|
|
41
41
|
amount: data["amount"] as! Int, transactionId: data["transactionId"] as! String,
|
|
42
|
-
note: data["note"] as? String, ipnUrl: data["ipnUrl"] as? String
|
|
42
|
+
note: data["note"] as? String, ipnUrl: data["ipnUrl"] as? String,
|
|
43
|
+
isShowResult: data["isShowResult"] as? Bool)
|
|
43
44
|
case "PAYMENT":
|
|
44
|
-
return PayMEPaymentDirectParam(
|
|
45
|
+
return PayMEPaymentDirectParam(
|
|
46
|
+
transaction: data["transaction"] as! String, isShowResult: data["isShowResult"] as? Bool)
|
|
45
47
|
case "SERVICE":
|
|
46
48
|
return PayMEServiceParam(
|
|
47
|
-
service: data["service"] as! String, isBackToApp: data["isBackToApp"] as? Bool
|
|
49
|
+
service: data["service"] as! String, isBackToApp: data["isBackToApp"] as? Bool,
|
|
50
|
+
isShowResult: data["isShowResult"] as? Bool)
|
|
48
51
|
case "DEPOSIT":
|
|
49
52
|
return PayMEPayParam(
|
|
50
53
|
amount: data["amount"] as? Int, description: data["description"] as? String,
|
|
51
|
-
isBackToApp: data["isBackToApp"] as? Bool)
|
|
54
|
+
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool)
|
|
52
55
|
case "WITHDRAW":
|
|
53
56
|
return PayMEPayParam(
|
|
54
57
|
amount: data["amount"] as? Int, description: data["description"] as? String,
|
|
55
|
-
isBackToApp: data["isBackToApp"] as? Bool)
|
|
58
|
+
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool)
|
|
56
59
|
case "TRANSFER":
|
|
57
60
|
return PayMEPayParam(
|
|
58
61
|
amount: data["amount"] as? Int, description: data["description"] as? String,
|
|
59
|
-
isBackToApp: data["isBackToApp"] as? Bool)
|
|
62
|
+
isBackToApp: data["isBackToApp"] as? Bool, isShowResult: data["isShowResult"] as? Bool)
|
|
60
63
|
default: fatalError("Invalid action!")
|
|
61
64
|
}
|
|
62
65
|
}
|
|
@@ -3,18 +3,22 @@ type PayMEPaymentParam = {
|
|
|
3
3
|
transactionId: string;
|
|
4
4
|
note?: string;
|
|
5
5
|
ipnUrl: string;
|
|
6
|
+
isShowResult?: boolean;
|
|
6
7
|
};
|
|
7
8
|
type PayMEPaymentDirectParam = {
|
|
8
9
|
transaction: string;
|
|
10
|
+
isShowResult?: boolean;
|
|
9
11
|
};
|
|
10
12
|
type PayMEServiceParam = {
|
|
11
13
|
service: string;
|
|
12
14
|
isBackToApp?: boolean;
|
|
15
|
+
isShowResult?: boolean;
|
|
13
16
|
};
|
|
14
17
|
type PayMEPayParam = {
|
|
15
18
|
amount?: number;
|
|
16
19
|
description?: string;
|
|
17
20
|
isBackToApp?: boolean;
|
|
21
|
+
isShowResult?: boolean;
|
|
18
22
|
};
|
|
19
23
|
export type PayMEOpeningParam = {
|
|
20
24
|
action: 'PAYME';
|
|
@@ -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,C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;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.29"
|
|
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
|
@@ -3,21 +3,25 @@ type PayMEPaymentParam = {
|
|
|
3
3
|
transactionId: string;
|
|
4
4
|
note?: string;
|
|
5
5
|
ipnUrl: string;
|
|
6
|
+
isShowResult?: boolean;
|
|
6
7
|
};
|
|
7
8
|
|
|
8
9
|
type PayMEPaymentDirectParam = {
|
|
9
10
|
transaction: string;
|
|
11
|
+
isShowResult?: boolean;
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
type PayMEServiceParam = {
|
|
13
15
|
service: string;
|
|
14
16
|
isBackToApp?: boolean;
|
|
17
|
+
isShowResult?: boolean;
|
|
15
18
|
};
|
|
16
19
|
|
|
17
20
|
type PayMEPayParam = {
|
|
18
21
|
amount?: number;
|
|
19
22
|
description?: string;
|
|
20
23
|
isBackToApp?: boolean;
|
|
24
|
+
isShowResult?: boolean;
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
export type PayMEOpeningParam =
|
|
Binary file
|
|
@@ -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>
|