From a53bca4a34a7715499870709ecdeaebf3fb11251 Mon Sep 17 00:00:00 2001 From: asif Date: Mon, 3 Nov 2025 13:27:51 +0530 Subject: [PATCH 1/2] changed npci reponse body and added redis url to config --- src/config/config.js | 1 + src/controllers/npci.controller.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/config/config.js b/src/config/config.js index c2e8ebe..376b2b3 100644 --- a/src/config/config.js +++ b/src/config/config.js @@ -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, }; diff --git a/src/controllers/npci.controller.js b/src/controllers/npci.controller.js index 7c42d87..e510154 100644 --- a/src/controllers/npci.controller.js +++ b/src/controllers/npci.controller.js @@ -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'); } From 2c210f07c7955e7165744bd97bffaa2390e715f3 Mon Sep 17 00:00:00 2001 From: "nabanita.jana" Date: Tue, 4 Nov 2025 12:11:01 +0530 Subject: [PATCH 2/2] fix: add template --- src/util/sms_template.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/sms_template.js b/src/util/sms_template.js index 63d8251..220031c 100644 --- a/src/util/sms_template.js +++ b/src/util/sms_template.js @@ -55,7 +55,7 @@ const templates = { `Dear Customer, Your Preferred Name -${PreferName} has been updated successfully. If this change was not made by you, please contact our support team immediately.`, TLIMIT :(otp) => - `Dear Customer,Please complete the transaction limit set with ${otp}. -KCCB`, + `Dear Customer,Please complete the transaction limit set with OTP -${otp}. -KCCB`, TLIMIT_SET :(amount) => `Dear Customer,Your transaction limit for Internet Banking is set to Rs ${amount}. -KCCB`,