-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.js
30 lines (26 loc) · 786 Bytes
/
utils.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const axios = require('axios');
var conf = require('./config');
// Make HTTP request to Razorpay to get IFSC details
exports.callRazorpay = function(code) {
return axios.get(conf.base_url + code)
.then(function (response) {
switch (response) {
case "Not Found":
conf.response.status = 404;
break;
default:
conf.response.status = 200;
break;
}
conf.response.data = response.data;
return conf.response;
})
.catch(function (error) {
conf.response.status = error.response.status;
conf.response.err = error.response.statusText;
return conf.response;
})
}
exports.trasnformDataId= function(id){
return id.toUpperCase();
}