implemented RTGS payment feature

This commit is contained in:
asif
2025-08-10 15:29:09 +05:30
parent bfd062be80
commit 2000ec3e4e
4 changed files with 123 additions and 1 deletions

View File

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