payme-mini-app 0.1.4 → 0.1.5

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.
@@ -1,20 +1,20 @@
1
- type PayMEPaymentParam = {
2
- amount: number;
3
- transactionId: string;
4
- note?: string;
5
- ipnUrl: string;
6
- };
7
- export type PayMEOpeningParam = {
8
- action: 'PAYME';
9
- phone: string;
10
- } | {
11
- action: 'OPEN';
12
- phone: string;
13
- } | {
14
- action: 'PAY';
15
- phone: string;
16
- data: PayMEPaymentParam;
17
- };
18
- export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';
19
- export {};
1
+ type PayMEPaymentParam = {
2
+ amount: number;
3
+ transactionId: string;
4
+ note?: string;
5
+ ipnUrl: string;
6
+ };
7
+ export type PayMEOpeningParam = {
8
+ action: 'PAYME';
9
+ phone: string;
10
+ } | {
11
+ action: 'OPEN';
12
+ phone: string;
13
+ } | {
14
+ action: 'PAY';
15
+ phone: string;
16
+ data: PayMEPaymentParam;
17
+ };
18
+ export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';
19
+ export {};
20
20
  //# sourceMappingURL=index.type.d.ts.map
package/package.json CHANGED
@@ -1,160 +1,160 @@
1
- {
2
- "name": "payme-mini-app",
3
- "version": "0.1.4",
4
- "description": "test",
5
- "main": "lib/commonjs/index",
6
- "module": "lib/module/index",
7
- "types": "lib/typescript/index.d.ts",
8
- "react-native": "src/index",
9
- "source": "src/index",
10
- "files": [
11
- "src",
12
- "lib",
13
- "android",
14
- "ios",
15
- "cpp",
16
- "*.podspec",
17
- "!lib/typescript/example",
18
- "!ios/build",
19
- "!android/build",
20
- "!android/gradle",
21
- "!android/gradlew",
22
- "!android/gradlew.bat",
23
- "!android/local.properties",
24
- "!**/__tests__",
25
- "!**/__fixtures__",
26
- "!**/__mocks__",
27
- "!**/.*"
28
- ],
29
- "scripts": {
30
- "test": "jest",
31
- "typecheck": "tsc --noEmit",
32
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
- "prepack": "bob build",
34
- "release": "release-it",
35
- "example": "yarn --cwd example",
36
- "bootstrap": "yarn example && yarn install && yarn example pods",
37
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
38
- },
39
- "keywords": [
40
- "react-native",
41
- "ios",
42
- "android"
43
- ],
44
- "repository": "https://github.com/nampt2903/payme-mini-app",
45
- "author": "Phan Thanh Nam <nampt@payme.vn> (https://github.com/nampt2903)",
46
- "license": "MIT",
47
- "bugs": {
48
- "url": "https://github.com/nampt2903/payme-mini-app/issues"
49
- },
50
- "homepage": "https://github.com/nampt2903/payme-mini-app#readme",
51
- "publishConfig": {
52
- "registry": "https://registry.npmjs.org/"
53
- },
54
- "devDependencies": {
55
- "@evilmartians/lefthook": "^1.2.2",
56
- "@commitlint/config-conventional": "^17.0.2",
57
- "@react-native-community/eslint-config": "^3.0.2",
58
- "@release-it/conventional-changelog": "^5.0.0",
59
- "@types/jest": "^28.1.2",
60
- "@types/react": "~17.0.21",
61
- "@types/react-native": "0.70.0",
62
- "commitlint": "^17.0.2",
63
- "del-cli": "^5.0.0",
64
- "eslint": "^8.4.1",
65
- "eslint-config-prettier": "^8.5.0",
66
- "eslint-plugin-prettier": "^4.0.0",
67
- "jest": "^28.1.1",
68
- "pod-install": "^0.1.0",
69
- "prettier": "^2.0.5",
70
- "react": "18.1.0",
71
- "react-native": "0.70.6",
72
- "react-native-builder-bob": "^0.20.0",
73
- "release-it": "^15.0.0",
74
- "typescript": "^4.5.2"
75
- },
76
- "resolutions": {
77
- "@types/react": "17.0.21"
78
- },
79
- "peerDependencies": {
80
- "react": "*",
81
- "react-native": "*"
82
- },
83
- "engines": {
84
- "node": ">= 16.0.0"
85
- },
86
- "packageManager": "^yarn@1.22.15",
87
- "jest": {
88
- "preset": "react-native",
89
- "modulePathIgnorePatterns": [
90
- "<rootDir>/example/node_modules",
91
- "<rootDir>/lib/"
92
- ]
93
- },
94
- "commitlint": {
95
- "extends": [
96
- "@commitlint/config-conventional"
97
- ]
98
- },
99
- "release-it": {
100
- "git": {
101
- "commitMessage": "chore: release ${version}",
102
- "tagName": "v${version}"
103
- },
104
- "npm": {
105
- "publish": true
106
- },
107
- "github": {
108
- "release": true
109
- },
110
- "plugins": {
111
- "@release-it/conventional-changelog": {
112
- "preset": "angular"
113
- }
114
- }
115
- },
116
- "eslintConfig": {
117
- "root": true,
118
- "extends": [
119
- "@react-native-community",
120
- "prettier"
121
- ],
122
- "rules": {
123
- "prettier/prettier": [
124
- "error",
125
- {
126
- "quoteProps": "consistent",
127
- "singleQuote": true,
128
- "tabWidth": 2,
129
- "trailingComma": "es5",
130
- "useTabs": false
131
- }
132
- ]
133
- }
134
- },
135
- "eslintIgnore": [
136
- "node_modules/",
137
- "lib/"
138
- ],
139
- "prettier": {
140
- "quoteProps": "consistent",
141
- "singleQuote": true,
142
- "tabWidth": 2,
143
- "trailingComma": "es5",
144
- "useTabs": false
145
- },
146
- "react-native-builder-bob": {
147
- "source": "src",
148
- "output": "lib",
149
- "targets": [
150
- "commonjs",
151
- "module",
152
- [
153
- "typescript",
154
- {
155
- "project": "tsconfig.build.json"
156
- }
157
- ]
158
- ]
159
- }
160
- }
1
+ {
2
+ "name": "payme-mini-app",
3
+ "version": "0.1.5",
4
+ "description": "test",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "*.podspec",
17
+ "!lib/typescript/example",
18
+ "!ios/build",
19
+ "!android/build",
20
+ "!android/gradle",
21
+ "!android/gradlew",
22
+ "!android/gradlew.bat",
23
+ "!android/local.properties",
24
+ "!**/__tests__",
25
+ "!**/__fixtures__",
26
+ "!**/__mocks__",
27
+ "!**/.*"
28
+ ],
29
+ "scripts": {
30
+ "test": "jest",
31
+ "typecheck": "tsc --noEmit",
32
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
+ "prepack": "bob build",
34
+ "release": "release-it",
35
+ "example": "yarn --cwd example",
36
+ "bootstrap": "yarn example && yarn install && yarn example pods",
37
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
38
+ },
39
+ "keywords": [
40
+ "react-native",
41
+ "ios",
42
+ "android"
43
+ ],
44
+ "repository": "https://github.com/nampt2903/payme-mini-app",
45
+ "author": "Phan Thanh Nam <nampt@payme.vn> (https://github.com/nampt2903)",
46
+ "license": "MIT",
47
+ "bugs": {
48
+ "url": "https://github.com/nampt2903/payme-mini-app/issues"
49
+ },
50
+ "homepage": "https://github.com/nampt2903/payme-mini-app#readme",
51
+ "publishConfig": {
52
+ "registry": "https://registry.npmjs.org/"
53
+ },
54
+ "devDependencies": {
55
+ "@evilmartians/lefthook": "^1.2.2",
56
+ "@commitlint/config-conventional": "^17.0.2",
57
+ "@react-native-community/eslint-config": "^3.0.2",
58
+ "@release-it/conventional-changelog": "^5.0.0",
59
+ "@types/jest": "^28.1.2",
60
+ "@types/react": "~17.0.21",
61
+ "@types/react-native": "0.70.0",
62
+ "commitlint": "^17.0.2",
63
+ "del-cli": "^5.0.0",
64
+ "eslint": "^8.4.1",
65
+ "eslint-config-prettier": "^8.5.0",
66
+ "eslint-plugin-prettier": "^4.0.0",
67
+ "jest": "^28.1.1",
68
+ "pod-install": "^0.1.0",
69
+ "prettier": "^2.0.5",
70
+ "react": "18.1.0",
71
+ "react-native": "0.70.6",
72
+ "react-native-builder-bob": "^0.20.0",
73
+ "release-it": "^15.0.0",
74
+ "typescript": "^4.5.2"
75
+ },
76
+ "resolutions": {
77
+ "@types/react": "17.0.21"
78
+ },
79
+ "peerDependencies": {
80
+ "react": "*",
81
+ "react-native": "*"
82
+ },
83
+ "engines": {
84
+ "node": ">= 16.0.0"
85
+ },
86
+ "packageManager": "^yarn@1.22.15",
87
+ "jest": {
88
+ "preset": "react-native",
89
+ "modulePathIgnorePatterns": [
90
+ "<rootDir>/example/node_modules",
91
+ "<rootDir>/lib/"
92
+ ]
93
+ },
94
+ "commitlint": {
95
+ "extends": [
96
+ "@commitlint/config-conventional"
97
+ ]
98
+ },
99
+ "release-it": {
100
+ "git": {
101
+ "commitMessage": "chore: release ${version}",
102
+ "tagName": "v${version}"
103
+ },
104
+ "npm": {
105
+ "publish": true
106
+ },
107
+ "github": {
108
+ "release": true
109
+ },
110
+ "plugins": {
111
+ "@release-it/conventional-changelog": {
112
+ "preset": "angular"
113
+ }
114
+ }
115
+ },
116
+ "eslintConfig": {
117
+ "root": true,
118
+ "extends": [
119
+ "@react-native-community",
120
+ "prettier"
121
+ ],
122
+ "rules": {
123
+ "prettier/prettier": [
124
+ "error",
125
+ {
126
+ "quoteProps": "consistent",
127
+ "singleQuote": true,
128
+ "tabWidth": 2,
129
+ "trailingComma": "es5",
130
+ "useTabs": false
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ "eslintIgnore": [
136
+ "node_modules/",
137
+ "lib/"
138
+ ],
139
+ "prettier": {
140
+ "quoteProps": "consistent",
141
+ "singleQuote": true,
142
+ "tabWidth": 2,
143
+ "trailingComma": "es5",
144
+ "useTabs": false
145
+ },
146
+ "react-native-builder-bob": {
147
+ "source": "src",
148
+ "output": "lib",
149
+ "targets": [
150
+ "commonjs",
151
+ "module",
152
+ [
153
+ "typescript",
154
+ {
155
+ "project": "tsconfig.build.json"
156
+ }
157
+ ]
158
+ ]
159
+ }
160
+ }
@@ -1,37 +1,37 @@
1
- require "json"
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
-
6
- Pod::Spec.new do |s|
7
- s.name = "payme-mini-app"
8
- s.version = package["version"]
9
- s.summary = package["description"]
10
- s.homepage = package["homepage"]
11
- s.license = package["license"]
12
- s.authors = package["author"]
13
-
14
- s.platforms = { :ios => "13.0" }
15
- s.source = { :git => "http://git.mecorp.vn/paymeproject/payme-miniapp-reactnative.git", :tag => "#{s.version}" }
16
- s.swift_versions = "5.0"
17
- s.source_files = "ios/**/*.{h,m,mm,swift}"
18
-
19
- s.dependency "PayMEMiniApp", "0.0.1"
20
- s.dependency "React-Core"
21
- s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
22
- # Don't install the dependencies when we run `pod install` in the old architecture.
23
- if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
24
- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
25
- s.pod_target_xcconfig = {
26
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
27
- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
28
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
29
- "BUILD_LIBRARY_FOR_DISTRIBUTION" => "YES",
30
- }
31
- s.dependency "React-Codegen"
32
- s.dependency "RCT-Folly"
33
- s.dependency "RCTRequired"
34
- s.dependency "RCTTypeSafety"
35
- s.dependency "ReactCommon/turbomodule/core"
36
- end
37
- end
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
+
6
+ Pod::Spec.new do |s|
7
+ s.name = "payme-mini-app"
8
+ s.version = package["version"]
9
+ s.summary = package["description"]
10
+ s.homepage = package["homepage"]
11
+ s.license = package["license"]
12
+ s.authors = package["author"]
13
+
14
+ s.platforms = { :ios => "13.0" }
15
+ s.source = { :git => "http://git.mecorp.vn/paymeproject/payme-miniapp-reactnative.git", :tag => "#{s.version}" }
16
+ s.swift_versions = "5.0"
17
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
18
+
19
+ s.dependency "PayMEMiniApp", "0.0.1"
20
+ s.dependency "React-Core"
21
+ s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
22
+ # Don't install the dependencies when we run `pod install` in the old architecture.
23
+ if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
24
+ s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
25
+ s.pod_target_xcconfig = {
26
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
27
+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
28
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
29
+ "BUILD_LIBRARY_FOR_DISTRIBUTION" => "YES",
30
+ }
31
+ s.dependency "React-Codegen"
32
+ s.dependency "RCT-Folly"
33
+ s.dependency "RCTRequired"
34
+ s.dependency "RCTTypeSafety"
35
+ s.dependency "ReactCommon/turbomodule/core"
36
+ end
37
+ end
package/src/index.tsx CHANGED
@@ -1,19 +1,19 @@
1
- import { NativeEventEmitter, NativeModules } from 'react-native';
2
- import type { PayMEEnv, PayMEOpeningParam } from './index.type';
3
-
4
- const RNPayMEMiniApp = NativeModules.RNPayMEMiniApp;
5
-
6
- export function init(
7
- appId: string,
8
- publicKey: string,
9
- privateKey: string,
10
- env: PayMEEnv
11
- ) {
12
- return RNPayMEMiniApp.initPayME(appId, publicKey, privateKey, env);
13
- }
14
-
15
- export function open(type: string, openingParam: PayMEOpeningParam) {
16
- return RNPayMEMiniApp.open(type, openingParam);
17
- }
18
-
19
- export const PayMEMiniAppEvents = new NativeEventEmitter(RNPayMEMiniApp);
1
+ import { NativeEventEmitter, NativeModules } from 'react-native';
2
+ import type { PayMEEnv, PayMEOpeningParam } from './index.type';
3
+
4
+ const RNPayMEMiniApp = NativeModules.RNPayMEMiniApp;
5
+
6
+ export function init(
7
+ appId: string,
8
+ publicKey: string,
9
+ privateKey: string,
10
+ env: PayMEEnv
11
+ ) {
12
+ return RNPayMEMiniApp.initPayME(appId, publicKey, privateKey, env);
13
+ }
14
+
15
+ export function open(type: string, openingParam: PayMEOpeningParam) {
16
+ return RNPayMEMiniApp.open(type, openingParam);
17
+ }
18
+
19
+ export const PayMEMiniAppEvents = new NativeEventEmitter(RNPayMEMiniApp);
package/src/index.type.ts CHANGED
@@ -1,13 +1,13 @@
1
- type PayMEPaymentParam = {
2
- amount: number;
3
- transactionId: string;
4
- note?: string;
5
- ipnUrl: string;
6
- };
7
-
8
- export type PayMEOpeningParam =
9
- | { action: 'PAYME'; phone: string }
10
- | { action: 'OPEN'; phone: string }
11
- | { action: 'PAY'; phone: string; data: PayMEPaymentParam };
12
-
13
- export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';
1
+ type PayMEPaymentParam = {
2
+ amount: number;
3
+ transactionId: string;
4
+ note?: string;
5
+ ipnUrl: string;
6
+ };
7
+
8
+ export type PayMEOpeningParam =
9
+ | { action: 'PAYME'; phone: string }
10
+ | { action: 'OPEN'; phone: string }
11
+ | { action: 'PAY'; phone: string; data: PayMEPaymentParam };
12
+
13
+ export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';