fix: added feature to validate beneficiaries from NPCI for real
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user