added beneficiary routes, controllers and services

This commit is contained in:
2025-07-30 12:26:04 +05:30
parent d4d741b8cc
commit b88e00f758
3 changed files with 34 additions and 4 deletions

View File

@@ -1,10 +1,13 @@
const axios = require('axios');
const { logger } = require('../util/logger');
async function validateWithinBank(accountNo) {
const url = `http://localhost:8687/kccb/cbs/acctInfo/details?stacctno=${accountNo}`;
const url = 'http://localhost:8687/kccb/cbs/acctInfo/details';
try {
const response = await fetch(url);
const data = await response.json();
const response = await axios.get(url, {
params: { stacctno: accountNo },
});
const data = response.data;
const customerName = data.customername;
return customerName;
} catch (error) {