feat: added transactions record keeping feature
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user