paytabs_pt2 2.0.8 → 2.0.9

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.
Files changed (2) hide show
  1. package/main.js +10 -1
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -101,7 +101,16 @@ function _sendPost(url,objData,callback){
101
101
  callback(res.data);
102
102
  }).catch((error) => {
103
103
  //This error will happen catch exceptions
104
- callback({ 'response_code:': 400, 'result': error.errno });
104
+ if(error.response)
105
+ {
106
+ result = error.response.data.message;
107
+ }
108
+ else
109
+ {
110
+ result = error.errno;
111
+ }
112
+
113
+ callback({ 'response_code:': 400, 'result': result });
105
114
  });
106
115
 
107
116
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "paytabs_pt2",
3
3
  "description": "PayTabs payment integration with nodejs V10.X",
4
- "version": "2.0.8",
4
+ "version": "2.0.9",
5
5
  "_location": "/paytabs",
6
6
  "author": {
7
7
  "name": "Walaa Elsaeed",