fix: added feature to validate beneficiaries from NPCI for real

This commit is contained in:
2025-09-11 22:50:36 +05:30
parent a122882764
commit 64e3cf3182
2 changed files with 32 additions and 9 deletions

View File

@@ -6,9 +6,7 @@ const db = require('../config/db');
async function validateWithinBank(accountNo) {
const url = 'http://localhost:8687/kccb/cbs/acctInfo/details';
try {
const response = await axios.get(url, {
params: { stacctno: accountNo },
});
const response = await axios.get(url, { params: { stacctno: accountNo } });
const data = response.data;
const customerName = data.customername;
return customerName;
@@ -20,7 +18,7 @@ async function validateWithinBank(accountNo) {
async function validateOutsideBank(accountNo, ifscCode, name) {
const uuid = `KCC${uuidv4().replace(/-/g, '')}`;
const url = `http://localhost:9091/kccb/benenamelookup/ReqBeneDetails/${uuid}`;
const url = `http://192.168.1.39:9091/kccb/benenamelookup/ReqBeneDetails/${uuid}`;
try {
const response = await axios.post(url, {
acctNo: accountNo,