payme-mini-app 1.2.2 → 2.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/android/build.gradle +2 -6
- package/android/gradle.properties +5 -4
- package/lib/typescript/{commonjs/src → src}/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/index.type.d.ts.map +1 -0
- package/package.json +88 -101
- package/payme-mini-app.podspec +1 -1
- package/lib/commonjs/index.js +0 -36
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/index.type.js +0 -2
- package/lib/commonjs/index.type.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.type.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -10
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/index.type.d.ts +0 -80
- package/lib/typescript/module/src/index.type.d.ts.map +0 -1
- /package/lib/typescript/{module/package.json → package.json} +0 -0
- /package/lib/typescript/{commonjs/src → src}/index.type.d.ts +0 -0
package/android/build.gradle
CHANGED
|
@@ -9,14 +9,11 @@ buildscript {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
dependencies {
|
|
12
|
-
classpath "com.android.tools.build:gradle:
|
|
13
|
-
// noinspection DifferentKotlinGradleVersion
|
|
14
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
|
|
12
|
+
classpath "com.android.tools.build:gradle:9.1.1"
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
apply plugin: "com.android.library"
|
|
19
|
-
apply plugin: "kotlin-android"
|
|
20
17
|
|
|
21
18
|
def getExtOrIntegerDefault(name) {
|
|
22
19
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["PaymeMiniApp_" + name]).toInteger()
|
|
@@ -76,6 +73,5 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
|
76
73
|
dependencies {
|
|
77
74
|
implementation "com.facebook.react:react-android"
|
|
78
75
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
79
|
-
implementation 'com.github.PayME-Miniapp:native-android:0.
|
|
76
|
+
implementation 'com.github.PayME-Miniapp:native-android:0.7.2'
|
|
80
77
|
}
|
|
81
|
-
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
PaymeMiniApp_kotlinVersion=2.
|
|
2
|
-
PaymeMiniApp_minSdkVersion=
|
|
3
|
-
PaymeMiniApp_targetSdkVersion=
|
|
4
|
-
PaymeMiniApp_compileSdkVersion=
|
|
1
|
+
PaymeMiniApp_kotlinVersion=2.2.10
|
|
2
|
+
PaymeMiniApp_minSdkVersion=26
|
|
3
|
+
PaymeMiniApp_targetSdkVersion=36
|
|
4
|
+
PaymeMiniApp_compileSdkVersion=37
|
|
5
5
|
PaymeMiniApp_ndkversion=27.1.12297006
|
|
6
|
+
android.uniquePackageNames=false
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NativeEventEmitter } from 'react-native';
|
|
2
|
-
import type { PayMEEnv, PayMELocale, PayMEMode, PayMEOpeningParam, PayMEOpeningType } from './index.type';
|
|
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
5
|
export declare function getBalance(phone: string): any;
|
|
6
6
|
export declare function getAccountInfo(phone: string): any;
|
|
7
7
|
export declare function setLanguage(language: string): any;
|
|
8
8
|
export declare function close(): any;
|
|
9
|
-
export declare const PayMEMiniAppEvents: NativeEventEmitter
|
|
9
|
+
export declare const PayMEMiniAppEvents: NativeEventEmitter<Readonly<Record<string, readonly Object[]>>>;
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,KAAK,EAAE,MAAM,OAEvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,OAE3C;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,OAE3C;AAED,wBAAgB,KAAK,QAEpB;AAGD,eAAO,MAAM,kBAAkB,iEAGD,CAAC"}
|
|
@@ -0,0 +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;I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ChC;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,GACzD;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,oBAAoB,CAAA;CAAE,GACpE;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,GAAG,SAAS,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payme-mini-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Thư viện tích hợp PayME Miniapp",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"module": "./lib/module/index.js",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
16
|
-
"default": "./lib/commonjs/index.js"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
9
|
+
"payme-mini-app-source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
19
14
|
},
|
|
20
15
|
"files": [
|
|
21
16
|
"src",
|
|
@@ -24,7 +19,7 @@
|
|
|
24
19
|
"ios",
|
|
25
20
|
"cpp",
|
|
26
21
|
"*.podspec",
|
|
27
|
-
"react-native.config.
|
|
22
|
+
"react-native.config.js",
|
|
28
23
|
"!ios/build",
|
|
29
24
|
"!android/build",
|
|
30
25
|
"!android/gradle",
|
|
@@ -38,12 +33,12 @@
|
|
|
38
33
|
],
|
|
39
34
|
"scripts": {
|
|
40
35
|
"example": "yarn workspace payme-mini-app-example",
|
|
41
|
-
"test": "jest",
|
|
42
|
-
"typecheck": "tsc",
|
|
43
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
44
36
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
45
37
|
"prepare": "bob build",
|
|
46
|
-
"
|
|
38
|
+
"typecheck": "tsc",
|
|
39
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
+
"test": "jest",
|
|
41
|
+
"release": "release-it --only-version"
|
|
47
42
|
},
|
|
48
43
|
"keywords": [
|
|
49
44
|
"react-native",
|
|
@@ -64,30 +59,31 @@
|
|
|
64
59
|
"registry": "https://registry.npmjs.org/"
|
|
65
60
|
},
|
|
66
61
|
"devDependencies": {
|
|
67
|
-
"@commitlint/config-conventional": "^
|
|
68
|
-
"@eslint/compat": "^1.
|
|
69
|
-
"@eslint/eslintrc": "^3.3.
|
|
70
|
-
"@eslint/js": "^
|
|
71
|
-
"@
|
|
72
|
-
"@react-native-
|
|
73
|
-
"@react-native/
|
|
74
|
-
"@react-native/
|
|
75
|
-
"@release-it/conventional-changelog": "^
|
|
76
|
-
"@types/
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"eslint": "^9.35.0",
|
|
62
|
+
"@commitlint/config-conventional": "^21.0.2",
|
|
63
|
+
"@eslint/compat": "^2.1.0",
|
|
64
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
65
|
+
"@eslint/js": "^10.0.1",
|
|
66
|
+
"@jest/globals": "^29.7.0",
|
|
67
|
+
"@react-native/babel-preset": "0.85.0",
|
|
68
|
+
"@react-native/eslint-config": "0.85.0",
|
|
69
|
+
"@react-native/jest-preset": "0.85.0",
|
|
70
|
+
"@release-it/conventional-changelog": "^11.0.1",
|
|
71
|
+
"@types/react": "^19.2.0",
|
|
72
|
+
"commitlint": "^21.0.2",
|
|
73
|
+
"del-cli": "^7.0.0",
|
|
74
|
+
"eslint": "^9.39.4",
|
|
81
75
|
"eslint-config-prettier": "^10.1.8",
|
|
82
|
-
"eslint-plugin-
|
|
76
|
+
"eslint-plugin-ft-flow": "^3.0.11",
|
|
77
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
83
78
|
"jest": "^29.7.0",
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"react
|
|
87
|
-
"react-native
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
79
|
+
"lefthook": "^2.1.9",
|
|
80
|
+
"prettier": "^3.8.3",
|
|
81
|
+
"react": "19.2.3",
|
|
82
|
+
"react-native": "0.85.0",
|
|
83
|
+
"react-native-builder-bob": "^0.43.0",
|
|
84
|
+
"release-it": "^20.2.0",
|
|
85
|
+
"turbo": "^2.9.16",
|
|
86
|
+
"typescript": "^6.0.3"
|
|
91
87
|
},
|
|
92
88
|
"peerDependencies": {
|
|
93
89
|
"react": "*",
|
|
@@ -96,9 +92,41 @@
|
|
|
96
92
|
"workspaces": [
|
|
97
93
|
"example"
|
|
98
94
|
],
|
|
99
|
-
"packageManager": "yarn@
|
|
95
|
+
"packageManager": "yarn@4.11.0",
|
|
96
|
+
"react-native-builder-bob": {
|
|
97
|
+
"source": "src",
|
|
98
|
+
"output": "lib",
|
|
99
|
+
"targets": [
|
|
100
|
+
[
|
|
101
|
+
"module",
|
|
102
|
+
{
|
|
103
|
+
"esm": true
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
[
|
|
107
|
+
"typescript",
|
|
108
|
+
{
|
|
109
|
+
"project": "tsconfig.build.json"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"prettier": {
|
|
115
|
+
"quoteProps": "consistent",
|
|
116
|
+
"singleQuote": true,
|
|
117
|
+
"tabWidth": 2,
|
|
118
|
+
"trailingComma": "es5",
|
|
119
|
+
"useTabs": false
|
|
120
|
+
},
|
|
100
121
|
"jest": {
|
|
101
|
-
"preset": "react-native",
|
|
122
|
+
"preset": "@react-native/jest-preset",
|
|
123
|
+
"testEnvironmentOptions": {
|
|
124
|
+
"customExportConditions": [
|
|
125
|
+
"require",
|
|
126
|
+
"react-native",
|
|
127
|
+
"payme-mini-app-source"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
102
130
|
"modulePathIgnorePatterns": [
|
|
103
131
|
"<rootDir>/example/node_modules",
|
|
104
132
|
"<rootDir>/lib/"
|
|
@@ -107,7 +135,14 @@
|
|
|
107
135
|
"commitlint": {
|
|
108
136
|
"extends": [
|
|
109
137
|
"@commitlint/config-conventional"
|
|
110
|
-
]
|
|
138
|
+
],
|
|
139
|
+
"rules": {
|
|
140
|
+
"header-max-length": [
|
|
141
|
+
2,
|
|
142
|
+
"always",
|
|
143
|
+
200
|
|
144
|
+
]
|
|
145
|
+
}
|
|
111
146
|
},
|
|
112
147
|
"release-it": {
|
|
113
148
|
"git": {
|
|
@@ -122,69 +157,21 @@
|
|
|
122
157
|
},
|
|
123
158
|
"plugins": {
|
|
124
159
|
"@release-it/conventional-changelog": {
|
|
125
|
-
"preset":
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"eslintConfig": {
|
|
130
|
-
"root": true,
|
|
131
|
-
"extends": [
|
|
132
|
-
"@react-native",
|
|
133
|
-
"prettier"
|
|
134
|
-
],
|
|
135
|
-
"rules": {
|
|
136
|
-
"react/react-in-jsx-scope": "off",
|
|
137
|
-
"prettier/prettier": [
|
|
138
|
-
"error",
|
|
139
|
-
{
|
|
140
|
-
"quoteProps": "consistent",
|
|
141
|
-
"singleQuote": true,
|
|
142
|
-
"tabWidth": 2,
|
|
143
|
-
"trailingComma": "es5",
|
|
144
|
-
"useTabs": false
|
|
160
|
+
"preset": {
|
|
161
|
+
"name": "angular"
|
|
145
162
|
}
|
|
146
|
-
|
|
163
|
+
}
|
|
147
164
|
}
|
|
148
165
|
},
|
|
149
|
-
"eslintIgnore": [
|
|
150
|
-
"node_modules/",
|
|
151
|
-
"lib/"
|
|
152
|
-
],
|
|
153
|
-
"prettier": {
|
|
154
|
-
"quoteProps": "consistent",
|
|
155
|
-
"singleQuote": true,
|
|
156
|
-
"tabWidth": 2,
|
|
157
|
-
"trailingComma": "es5",
|
|
158
|
-
"useTabs": false
|
|
159
|
-
},
|
|
160
|
-
"react-native-builder-bob": {
|
|
161
|
-
"source": "src",
|
|
162
|
-
"output": "lib",
|
|
163
|
-
"targets": [
|
|
164
|
-
[
|
|
165
|
-
"commonjs",
|
|
166
|
-
{
|
|
167
|
-
"esm": true
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
[
|
|
171
|
-
"module",
|
|
172
|
-
{
|
|
173
|
-
"esm": true
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
[
|
|
177
|
-
"typescript",
|
|
178
|
-
{
|
|
179
|
-
"project": "tsconfig.build.json",
|
|
180
|
-
"esm": true
|
|
181
|
-
}
|
|
182
|
-
]
|
|
183
|
-
]
|
|
184
|
-
},
|
|
185
166
|
"create-react-native-library": {
|
|
186
167
|
"type": "legacy-module",
|
|
187
168
|
"languages": "kotlin-swift",
|
|
188
|
-
"
|
|
169
|
+
"tools": [
|
|
170
|
+
"eslint",
|
|
171
|
+
"jest",
|
|
172
|
+
"lefthook",
|
|
173
|
+
"release-it"
|
|
174
|
+
],
|
|
175
|
+
"version": "0.49.8"
|
|
189
176
|
}
|
|
190
177
|
}
|
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.7.
|
|
18
|
+
s.dependency "PayME-Miniapp", "0.7.6"
|
|
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/lib/commonjs/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PayMEMiniAppEvents = void 0;
|
|
7
|
-
exports.close = close;
|
|
8
|
-
exports.getAccountInfo = getAccountInfo;
|
|
9
|
-
exports.getBalance = getBalance;
|
|
10
|
-
exports.init = init;
|
|
11
|
-
exports.open = open;
|
|
12
|
-
exports.setLanguage = setLanguage;
|
|
13
|
-
var _reactNative = require("react-native");
|
|
14
|
-
const RNPayMEMiniApp = _reactNative.NativeModules.PaymeMiniApp;
|
|
15
|
-
function init(appId, publicKey, privateKey, locale = 'vi', env = 'PRODUCTION', mode = 'miniapp_product') {
|
|
16
|
-
return RNPayMEMiniApp.initPayME(appId, publicKey, privateKey, locale, env, mode);
|
|
17
|
-
}
|
|
18
|
-
function open(type, openingParam) {
|
|
19
|
-
return RNPayMEMiniApp.open(type, openingParam);
|
|
20
|
-
}
|
|
21
|
-
function getBalance(phone) {
|
|
22
|
-
return RNPayMEMiniApp.getBalance(phone);
|
|
23
|
-
}
|
|
24
|
-
function getAccountInfo(phone) {
|
|
25
|
-
return RNPayMEMiniApp.getAccountInfo(phone);
|
|
26
|
-
}
|
|
27
|
-
function setLanguage(language) {
|
|
28
|
-
return RNPayMEMiniApp.setLanguage(language);
|
|
29
|
-
}
|
|
30
|
-
function close() {
|
|
31
|
-
return RNPayMEMiniApp.closeMiniApp();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Updated for React Native 0.78.0: Instantiate NativeEventEmitter without passing the native module
|
|
35
|
-
const PayMEMiniAppEvents = exports.PayMEMiniAppEvents = _reactNative.Platform.OS === 'ios' ? new _reactNative.NativeEventEmitter(RNPayMEMiniApp) : new _reactNative.NativeEventEmitter();
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","RNPayMEMiniApp","NativeModules","PaymeMiniApp","init","appId","publicKey","privateKey","locale","env","mode","initPayME","open","type","openingParam","getBalance","phone","getAccountInfo","setLanguage","language","close","closeMiniApp","PayMEMiniAppEvents","exports","Platform","OS","NativeEventEmitter"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,MAAMC,cAAc,GAAGC,0BAAa,CAACC,YAAY;AAE1C,SAASC,IAAIA,CAClBC,KAAa,EACbC,SAAiB,EACjBC,UAAkB,EAClBC,MAAmB,GAAG,IAAI,EAC1BC,GAAa,GAAG,YAAY,EAC5BC,IAAe,GAAG,iBAAiB,EACnC;EACA,OAAOT,cAAc,CAACU,SAAS,CAC7BN,KAAK,EACLC,SAAS,EACTC,UAAU,EACVC,MAAM,EACNC,GAAG,EACHC,IACF,CAAC;AACH;AAEO,SAASE,IAAIA,CAACC,IAAsB,EAAEC,YAA+B,EAAE;EAC5E,OAAOb,cAAc,CAACW,IAAI,CAACC,IAAI,EAAEC,YAAY,CAAC;AAChD;AAEO,SAASC,UAAUA,CAACC,KAAa,EAAE;EACxC,OAAOf,cAAc,CAACc,UAAU,CAACC,KAAK,CAAC;AACzC;AAEO,SAASC,cAAcA,CAACD,KAAa,EAAE;EAC5C,OAAOf,cAAc,CAACgB,cAAc,CAACD,KAAK,CAAC;AAC7C;AAEO,SAASE,WAAWA,CAACC,QAAgB,EAAE;EAC5C,OAAOlB,cAAc,CAACiB,WAAW,CAACC,QAAQ,CAAC;AAC7C;AAEO,SAASC,KAAKA,CAAA,EAAG;EACtB,OAAOnB,cAAc,CAACoB,YAAY,CAAC,CAAC;AACtC;;AAEA;AACO,MAAMC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAC7BE,qBAAQ,CAACC,EAAE,KAAK,KAAK,GACjB,IAAIC,+BAAkB,CAACzB,cAAc,CAAC,GACtC,IAAIyB,+BAAkB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,cAAc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AS,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,GAAG,SAAS,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NativeEventEmitter } from 'react-native';
|
|
2
|
-
import type { PayMEEnv, PayMELocale, PayMEMode, PayMEOpeningParam, PayMEOpeningType } from './index.type';
|
|
3
|
-
export declare function init(appId: string, publicKey: string, privateKey: string, locale?: PayMELocale, env?: PayMEEnv, mode?: PayMEMode): any;
|
|
4
|
-
export declare function open(type: PayMEOpeningType, openingParam: PayMEOpeningParam): any;
|
|
5
|
-
export declare function getBalance(phone: string): any;
|
|
6
|
-
export declare function getAccountInfo(phone: string): any;
|
|
7
|
-
export declare function setLanguage(language: string): any;
|
|
8
|
-
export declare function close(): any;
|
|
9
|
-
export declare const PayMEMiniAppEvents: NativeEventEmitter;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,cAAc,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,KAAK,EAAE,MAAM,OAEvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,OAE3C;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,OAE3C;AAED,wBAAgB,KAAK,QAEpB;AAGD,eAAO,MAAM,kBAAkB,oBAGD,CAAC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
type PayMEPaymentParam = {
|
|
2
|
-
amount: number;
|
|
3
|
-
transactionId: string;
|
|
4
|
-
note?: string;
|
|
5
|
-
ipnUrl: string;
|
|
6
|
-
extraData?: Record<string, string | object>;
|
|
7
|
-
isShowResult?: boolean;
|
|
8
|
-
};
|
|
9
|
-
type PayMEPaymentDirectParam = {
|
|
10
|
-
transaction: string;
|
|
11
|
-
extraData?: Record<string, string | object>;
|
|
12
|
-
isShowResult?: boolean;
|
|
13
|
-
};
|
|
14
|
-
type PayMETransferQRParam = {
|
|
15
|
-
amount: number;
|
|
16
|
-
bankNumber: string;
|
|
17
|
-
swiftCode: string;
|
|
18
|
-
cardHolder: string;
|
|
19
|
-
note?: string;
|
|
20
|
-
partnerTransaction?: string;
|
|
21
|
-
extraData?: Record<string, string | object>;
|
|
22
|
-
isShowResult?: boolean;
|
|
23
|
-
};
|
|
24
|
-
type PayMEServiceParam = {
|
|
25
|
-
service: string;
|
|
26
|
-
extraData?: Record<string, string | object>;
|
|
27
|
-
isBackToApp?: boolean;
|
|
28
|
-
isShowResult?: boolean;
|
|
29
|
-
};
|
|
30
|
-
type PayMEPayParam = {
|
|
31
|
-
amount?: number;
|
|
32
|
-
description?: string;
|
|
33
|
-
extraData?: Record<string, string | object>;
|
|
34
|
-
isBackToApp?: boolean;
|
|
35
|
-
isShowResult?: boolean;
|
|
36
|
-
};
|
|
37
|
-
export type PayMEOpeningParam = {
|
|
38
|
-
action: 'PAYME';
|
|
39
|
-
phone: string;
|
|
40
|
-
} | {
|
|
41
|
-
action: 'OPEN';
|
|
42
|
-
phone: string;
|
|
43
|
-
} | {
|
|
44
|
-
action: 'KYC';
|
|
45
|
-
phone: string;
|
|
46
|
-
} | {
|
|
47
|
-
action: 'PAY';
|
|
48
|
-
phone: string;
|
|
49
|
-
data: PayMEPaymentParam;
|
|
50
|
-
} | {
|
|
51
|
-
action: 'TRANSFER_QR';
|
|
52
|
-
phone: string;
|
|
53
|
-
data: PayMETransferQRParam;
|
|
54
|
-
} | {
|
|
55
|
-
action: 'PAYMENT';
|
|
56
|
-
phone?: string;
|
|
57
|
-
data: PayMEPaymentDirectParam;
|
|
58
|
-
} | {
|
|
59
|
-
action: 'SERVICE';
|
|
60
|
-
phone: string;
|
|
61
|
-
data: PayMEServiceParam;
|
|
62
|
-
} | {
|
|
63
|
-
action: 'DEPOSIT';
|
|
64
|
-
phone: string;
|
|
65
|
-
data: PayMEPayParam;
|
|
66
|
-
} | {
|
|
67
|
-
action: 'WITHDRAW';
|
|
68
|
-
phone: string;
|
|
69
|
-
data: PayMEPayParam;
|
|
70
|
-
} | {
|
|
71
|
-
action: 'TRANSFER';
|
|
72
|
-
phone: string;
|
|
73
|
-
data: PayMEPayParam;
|
|
74
|
-
};
|
|
75
|
-
export type PayMEEnv = 'PRODUCTION' | 'STAGING' | 'SANDBOX';
|
|
76
|
-
export type PayMEMode = 'miniapp_sandbox' | 'miniapp_product';
|
|
77
|
-
export type PayMEOpeningType = 'screen' | 'modal';
|
|
78
|
-
export type PayMELocale = 'vi' | 'en';
|
|
79
|
-
export {};
|
|
80
|
-
//# sourceMappingURL=index.type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CAA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