feat: Limit of trasnaction

This commit is contained in:
2025-11-04 11:12:55 +05:30
18 changed files with 204 additions and 32 deletions

View File

@@ -12,7 +12,8 @@ async function send(
ifscCode,
beneficiaryName,
beneficiaryAcctType = 'SAVINGS',
remarks = ''
remarks = '',
client
) {
try {
const reqData = {
@@ -42,7 +43,8 @@ async function send(
amount,
'',
'',
response.data
response.data,
client
);
return response.data;
} catch (error) {

View File

@@ -11,7 +11,8 @@ async function send(
ifscCode,
beneficiaryName,
remitterName,
remarks
remarks,
client
) {
const commission = 0;
try {
@@ -28,7 +29,7 @@ async function send(
stAddress1: '',
stAddress2: '',
stAddress3: '',
narration: remarks
narration: remarks,
}
);
await recordInterBankTransaction(
@@ -41,7 +42,8 @@ async function send(
commission,
beneficiaryName,
remitterName,
response.data.status
response.data.status,
client
);
return response.data;
} catch (error) {
@@ -49,8 +51,6 @@ async function send(
'API call failed: ' + (error.response?.data?.message || error.message)
);
}
}
module.exports = { send };

View File

@@ -107,6 +107,13 @@ async function SendOtp(req, res) {
case 'USERNAME_SAVED':
message = templates.USERNAME_SAVED(PreferName);
break;
case 'TLIMIT':
otp = generateOTP(6);
message = templates.TLIMIT(otp);
break;
case 'TLIMIT_SET':
message = templates.TLIMIT_SET(amount);
break;
default:
return res.status(400).json({ error: 'Invalid OTP type' });
}

View File

@@ -11,7 +11,8 @@ async function send(
ifscCode,
beneficiaryName,
remitterName,
remarks
remarks,
client
) {
const commission = 0;
try {
@@ -28,7 +29,8 @@ async function send(
stAddress1: '',
stAddress2: '',
stAddress3: '',
narration: remarks
narration: remarks,
client,
}
);
await recordInterBankTransaction(
@@ -41,7 +43,8 @@ async function send(
commission,
beneficiaryName,
remitterName,
response.data.status
response.data.status,
client
);
return response.data;
} catch (error) {

View File

@@ -9,7 +9,8 @@ async function transfer(
toAccountType,
amount,
customerNo,
narration = ''
narration = '',
client
) {
try {
const response = await axios.post(
@@ -28,7 +29,8 @@ async function transfer(
toAccountNo,
toAccountType,
amount,
response.data.status
response.data.status,
client
);
return response.data;
} catch (error) {