@dev_innovations_labs/phonepe-pg-sdk 1.0.3 → 1.0.4
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 +9 -27
- package/package.json +15 -1
package/README.md
CHANGED
|
@@ -41,10 +41,10 @@ npm install @dev_innovations_labs/phonepe-pg-sdk
|
|
|
41
41
|
|
|
42
42
|
# ⚙️ Environments
|
|
43
43
|
|
|
44
|
-
Input
|
|
45
|
-
|
|
46
|
-
production, Production
|
|
47
|
-
sandbox,
|
|
44
|
+
Input Interpreted As
|
|
45
|
+
------------------ ----------------
|
|
46
|
+
production, prod Production
|
|
47
|
+
sandbox, SANDBOX Sandbox
|
|
48
48
|
|
|
49
49
|
------------------------------------------------------------------------
|
|
50
50
|
|
|
@@ -81,20 +81,11 @@ console.log(res.redirectUrl);
|
|
|
81
81
|
``` jsx
|
|
82
82
|
import { PhonePeCheckoutWeb } from "@dev_innovations_labs/phonepe-pg-sdk";
|
|
83
83
|
|
|
84
|
-
export default function Checkout() {
|
|
84
|
+
export default function Checkout({ redirectUrl }) {
|
|
85
85
|
return (
|
|
86
86
|
<PhonePeCheckoutWeb
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
clientSecret="YOUR_SECRET"
|
|
90
|
-
request={{
|
|
91
|
-
merchantId: "M123",
|
|
92
|
-
merchantOrderId: "uuid-321",
|
|
93
|
-
amount: 10000,
|
|
94
|
-
redirectUrl: "https://yourapp.com/redirect",
|
|
95
|
-
callbackUrl: "https://yourapp.com/callback"
|
|
96
|
-
}}
|
|
97
|
-
onSuccess={(r) => console.log("Success", r)}
|
|
87
|
+
redirectUrl={redirectUrl}
|
|
88
|
+
onSuccess={(d) => console.log("Success", d)}
|
|
98
89
|
onError={(e) => console.log("Error", e)}
|
|
99
90
|
/>
|
|
100
91
|
);
|
|
@@ -108,19 +99,10 @@ export default function Checkout() {
|
|
|
108
99
|
``` jsx
|
|
109
100
|
import { PhonePeCheckoutNative } from "@dev_innovations_labs/phonepe-pg-sdk/native";
|
|
110
101
|
|
|
111
|
-
export default function App() {
|
|
102
|
+
export default function App({ redirectUrl }) {
|
|
112
103
|
return (
|
|
113
104
|
<PhonePeCheckoutNative
|
|
114
|
-
|
|
115
|
-
clientId="YOUR_CLIENT_ID"
|
|
116
|
-
clientSecret="YOUR_SECRET"
|
|
117
|
-
request={{
|
|
118
|
-
merchantId: "M123",
|
|
119
|
-
merchantOrderId: "uuid-xyz",
|
|
120
|
-
amount: 10000,
|
|
121
|
-
redirectUrl: "https://yourapp.com/redirect",
|
|
122
|
-
callbackUrl: "https://yourapp.com/callback"
|
|
123
|
-
}}
|
|
105
|
+
redirectUrl={redirectUrl}
|
|
124
106
|
onSuccess={(data) => console.log("Success", data)}
|
|
125
107
|
onError={(e) => console.log("Error", e)}
|
|
126
108
|
/>
|
package/package.json
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev_innovations_labs/phonepe-pg-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"phonepe",
|
|
10
|
+
"phonepe-pg",
|
|
11
|
+
"payment-gateway",
|
|
12
|
+
"pg-sdk",
|
|
13
|
+
"checkout-v2",
|
|
14
|
+
"upi",
|
|
15
|
+
"react",
|
|
16
|
+
"react-native",
|
|
17
|
+
"nodejs",
|
|
18
|
+
"javascript",
|
|
19
|
+
"typescript",
|
|
20
|
+
"web-payments"
|
|
21
|
+
],
|
|
8
22
|
"exports": {
|
|
9
23
|
".": "./dist/index.esm.js",
|
|
10
24
|
"./native": "./dist/native.esm.js"
|