implemented neft transaction feature

This commit is contained in:
asif
2025-08-10 15:17:44 +05:30
parent 6f07e9beb9
commit 33ef65de32
3 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
const axios = require('axios');
const { logger } = require('../util/logger');
async function send(
fromAccount,
toAccount,
amount,
ifscCode,
beneficiaryName,
remitterName
) {
try {
const response = await axios.post(
'http://localhost:8690/kccb/Neftfundtransfer',
{
stFromAcc: fromAccount,
stToAcc: toAccount,
stTranAmt: amount,
stCommission: 0,
stIfscCode: ifscCode,
stFullName: remitterName,
stBeneName: beneficiaryName,
stAddress1: '',
stAddress2: '',
stAddress3: '',
}
);
return response.data;
} catch (error) {
logger.error(error);
throw new Error(
'API call failed: ' + (error.response?.data?.message || error.message)
);
}
}
module.exports = { send };