node-paytmpg 7.5.4 → 7.5.7
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.
|
@@ -190,7 +190,13 @@ class PaymentController {
|
|
|
190
190
|
const vp = this.viewPath;
|
|
191
191
|
const razorPayInstance = this.razorPayInstance;
|
|
192
192
|
if (!req.body.ORDER_ID && !req.body.EMAIL && ((_a = req.query) === null || _a === void 0 ? void 0 : _a.to)) {
|
|
193
|
-
let toData =
|
|
193
|
+
let toData = {};
|
|
194
|
+
try {
|
|
195
|
+
toData = JSON.parse(this.decodeTxnDataFromUrl(req.query.to, req));
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
console.log("Error parsing 'to' query param data");
|
|
199
|
+
}
|
|
194
200
|
req.body.NAME = toData.NAME;
|
|
195
201
|
req.body.EMAIL = toData.EMAIL;
|
|
196
202
|
req.body.TXN_AMOUNT = toData.TXN_AMOUNT;
|
|
@@ -876,6 +882,9 @@ class PaymentController {
|
|
|
876
882
|
CLIENT_ID: txn.clientId,
|
|
877
883
|
}), req);
|
|
878
884
|
txn.payurl = config.host_url + '/' + config.path_prefix + '/init?to=' + urlData64;
|
|
885
|
+
if (txn.clientId) {
|
|
886
|
+
txn.payurl += `&client_id=${txn.clientId}`;
|
|
887
|
+
}
|
|
879
888
|
res.send(txn);
|
|
880
889
|
}
|
|
881
890
|
catch (err) {
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-paytmpg",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.7",
|
|
4
4
|
"description": "Payment Gateway Integration using NodeJS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"copy:public": "copyfiles -u 1 \"public/**/*\" dist/public",
|
|
13
13
|
"build": "npm-run-all clean build:ts copy:views copy:public",
|
|
14
14
|
"prepare": "npm run build",
|
|
15
|
-
"prepublishOnly": "npm run build"
|
|
15
|
+
"prepublishOnly": "npm version patch && npm run build"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-paytmpg",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.7",
|
|
4
4
|
"description": "Payment Gateway Integration using NodeJS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"copy:public": "copyfiles -u 1 \"public/**/*\" dist/public",
|
|
13
13
|
"build": "npm-run-all clean build:ts copy:views copy:public",
|
|
14
14
|
"prepare": "npm run build",
|
|
15
|
-
"prepublishOnly": "npm run build"
|
|
15
|
+
"prepublishOnly": "npm version patch && npm run build"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
"README.MD",
|
|
66
66
|
"LICENSE"
|
|
67
67
|
]
|
|
68
|
-
}
|
|
68
|
+
}
|