node-paytmpg 4.0.1 → 4.0.2

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.
@@ -108,7 +108,7 @@ module.exports = function (app, callbacks) {
108
108
  params['ORDER_ID'] = req.body.ORDER_ID;
109
109
  params['CUST_ID'] = req.body.CUST_ID;
110
110
  params['TXN_AMOUNT'] = req.body.TXN_AMOUNT;
111
- params['CALLBACK_URL'] = req.body.CALLBACK_URL;
111
+ params['CALLBACK_URL'] = req.body.CALLBACK_URL + "?order_id="+req.body.ORDER_ID;
112
112
  params['EMAIL'] = req.body.EMAIL;
113
113
  params['MOBILE_NO'] = req.body.MOBILE_NO;
114
114
  params['PRODUCT_NAME'] = req.body.PRODUCT_NAME;
@@ -524,7 +524,7 @@ module.exports = function (app, callbacks) {
524
524
 
525
525
  razorPayInstance.orders.create(options, function (err, order) {
526
526
  if (err) {
527
- res.send({ message: "An error occurred ! " + err.message })
527
+ res.send({ message: "An error occurred ! " + err.description })
528
528
  return;
529
529
  }
530
530
  orderId = order.id
@@ -606,7 +606,7 @@ module.exports = function (app, callbacks) {
606
606
  req.body.razorpay_order_id = orderId
607
607
  }
608
608
  req.body.STATUS = 'TXN_FAILURE'
609
- req.body.ORDERID = req.body.razorpay_order_id
609
+ req.body.ORDERID = req.body.razorpay_order_id || req.query.order_id
610
610
  isCancelled = true;
611
611
  }
612
612
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-paytmpg",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Payment Gateway Integration using NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {