feat: added transactions record keeping feature

This commit is contained in:
2025-09-08 20:04:55 +05:30
parent 05068634fe
commit f675f1561a
9 changed files with 120 additions and 6 deletions

View File

@@ -1,11 +1,14 @@
const axios = require('axios');
const {
recordIntraBankTransaction,
} = require('../services/recordkeeping.service');
async function transfer(
fromAccountNo,
toAccountNo,
toAccountType,
amount,
// narration = 'transfer from mobile'
customerNo,
narration = ''
) {
try {
@@ -19,6 +22,14 @@ async function transfer(
narration,
}
);
await recordIntraBankTransaction(
customerNo,
fromAccountNo,
toAccountNo,
toAccountType,
amount,
response.data.status
);
return response.data;
} catch (error) {
throw new Error(