added beneficiary routes, controllers and services
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user