changed npci reponse body and added redis url to config
This commit is contained in:
@@ -6,5 +6,6 @@ dotenv.config({ path: path.resolve(__dirname, '../../.env') });
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
port: process.env.PORT || 8080,
|
port: process.env.PORT || 8080,
|
||||||
dbUrl: process.env.DATABASE_URL,
|
dbUrl: process.env.DATABASE_URL,
|
||||||
|
redisUrl: process.env.REDIS_URL,
|
||||||
jwtSecret: process.env.JWT_SECRET,
|
jwtSecret: process.env.JWT_SECRET,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ const { logger } = require('../util/logger');
|
|||||||
|
|
||||||
async function npciResponse(req, res) {
|
async function npciResponse(req, res) {
|
||||||
const { resp } = req.body;
|
const { resp } = req.body;
|
||||||
logger.info(resp, 'received from NPCI');
|
logger.info(req.body, 'received response from NPCI');
|
||||||
if (resp.status === 'Success') {
|
if (resp === 'SUCCESS') {
|
||||||
await handleNPCISuccess(resp);
|
await handleNPCISuccess(req.body);
|
||||||
} else {
|
} else {
|
||||||
await handleNPCIFailure(resp);
|
await handleNPCIFailure(req.body);
|
||||||
}
|
}
|
||||||
res.send('ok');
|
res.send('ok');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user