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'); } 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`,