changed npci reponse body and added redis url to config

This commit is contained in:
2025-11-03 13:27:51 +05:30
parent 9f2f557b03
commit a53bca4a34
2 changed files with 5 additions and 4 deletions

View File

@@ -6,5 +6,6 @@ dotenv.config({ path: path.resolve(__dirname, '../../.env') });
module.exports = {
port: process.env.PORT || 8080,
dbUrl: process.env.DATABASE_URL,
redisUrl: process.env.REDIS_URL,
jwtSecret: process.env.JWT_SECRET,
};

View File

@@ -4,11 +4,11 @@ const { logger } = require('../util/logger');
async function npciResponse(req, res) {
const { resp } = req.body;
logger.info(resp, 'received from NPCI');
if (resp.status === 'Success') {
await handleNPCISuccess(resp);
logger.info(req.body, 'received response from NPCI');
if (resp === 'SUCCESS') {
await handleNPCISuccess(req.body);
} else {
await handleNPCIFailure(resp);
await handleNPCIFailure(req.body);
}
res.send('ok');
}