node-paytmpg 7.5.11 → 7.5.12

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.
@@ -209,6 +209,7 @@ class PaymentController {
209
209
  req.body.PRODUCT_NAME = toData.PRODUCT_NAME;
210
210
  req.body.RETURN_URL = toData.RETURN_URL;
211
211
  req.body.CLIENT_ID = toData.CLIENT_ID;
212
+ req.body.STATE = toData.STATE;
212
213
  }
213
214
  const config = (0, buildConfig_1.withClientConfigOverrides)(this.baseConfig, req);
214
215
  utils_1.Utils.sanitizeRequest(req.body);
@@ -387,6 +388,7 @@ class PaymentController {
387
388
  INDUSTRY_TYPE_ID: params['INDUSTRY_TYPE_ID'],
388
389
  CHANNEL_ID: params['CHANNEL_ID'],
389
390
  CALLBACK_URL: params['CALLBACK_URL'],
391
+ STATE: params['STATE'],
390
392
  CHECKSUMHASH: checksum,
391
393
  CLIENT_ID: params['CLIENT_ID'] || txnData.clientId || config.client_id || ''
392
394
  });
@@ -415,6 +417,7 @@ class PaymentController {
415
417
  extra: '',
416
418
  returnUrl: req.body.RETURN_URL || '',
417
419
  webhookUrl: req.body.WEBHOOK_URL || '',
420
+ state: req.body.STATE || '',
418
421
  clientId: req.body.CLIENT_ID || ''
419
422
  };
420
423
  try {
@@ -501,6 +504,7 @@ class PaymentController {
501
504
  CHANNEL_ID: config.CHANNEL_ID,
502
505
  CALLBACK_URL: config.CALLBACK_URL,
503
506
  CHECKSUMHASH: '',
507
+ STATE: (req.body.STATE === undefined ? '' : req.body.STATE),
504
508
  CLIENT_ID: config.client_id || req.body.CLIENT_ID || ''
505
509
  });
506
510
  }
@@ -885,6 +889,7 @@ class PaymentController {
885
889
  returnUrl: req.body.RETURN_URL || '',
886
890
  webhookUrl: req.body.WEBHOOK_URL || '',
887
891
  extra: (req.body.EXTRA || ''),
892
+ state: req.body.STATE || '',
888
893
  clientId: req.body.CLIENT_ID || ''
889
894
  };
890
895
  const txn = await this.insertTransactionInDb(txnTask);
@@ -899,6 +904,7 @@ class PaymentController {
899
904
  PRODUCT_NAME: txn.pname,
900
905
  clientId: txn.clientId,
901
906
  CLIENT_ID: txn.clientId,
907
+ STATE: txn.state,
902
908
  }), req);
903
909
  txn.payurl = config.host_url + '/' + config.path_prefix + '/init?to=' + urlData64;
904
910
  if (txn.clientId) {
@@ -939,6 +945,8 @@ class PaymentController {
939
945
  status: 'status',
940
946
  mobile_no: 'phone',
941
947
  CLIENT_ID: 'clientId',
948
+ state: 'state',
949
+ STATE: 'state',
942
950
  clientId: 'clientId',
943
951
  WEBHOOK_URL: 'webhookUrl',
944
952
  webhookUrl: 'webhookUrl',
@@ -27,6 +27,7 @@ export interface NPTransaction {
27
27
  readonly?: string;
28
28
  txnId?: string;
29
29
  clientId: string;
30
+ state?: string;
30
31
  returnUrl: string;
31
32
  webhookUrl: string;
32
33
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-paytmpg",
3
- "version": "7.5.11",
3
+ "version": "7.5.12",
4
4
  "description": "Payment Gateway Integration using NodeJS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-paytmpg",
3
- "version": "7.5.11",
3
+ "version": "7.5.12",
4
4
  "description": "Payment Gateway Integration using NodeJS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",