mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 17:56:27 +00:00
update
This commit is contained in:
@@ -609,7 +609,7 @@ const loadingBalanceRequest = async (req, res) => {
|
||||
winston.logger.debug(
|
||||
`${uniqueCode} INSERT TO trx.t_d_froud ${JSON.stringify(dataFraud)}`
|
||||
);
|
||||
// const fraud = await model.insertFraud(dataFraud);
|
||||
const fraud = await model.insertFraud(dataFraud);
|
||||
// log debug
|
||||
winston.logger.debug(
|
||||
`${uniqueCode} RESERVE NUMBER FROM trx.t_d_froud ${JSON.stringify(
|
||||
@@ -1284,37 +1284,37 @@ const loadingBalanceInsert = async (param) => {
|
||||
// get last history by card number
|
||||
let lastHistory = await model.getLastHistory(card_number);
|
||||
|
||||
if (lastHistory) {
|
||||
// if last history card is topup (21 = log name id for topup)
|
||||
if (lastHistory.i_log_name == 21 && lastHistory.c_source == 'CMS') {
|
||||
// log warn
|
||||
winston.logger.warn(`${uniqueCode} inserting fraud transaction...`);
|
||||
// if (lastHistory) {
|
||||
// // if last history card is topup (21 = log name id for topup)
|
||||
// if (lastHistory.i_log_name == 21 && lastHistory.c_source == 'CMS') {
|
||||
// // log warn
|
||||
// winston.logger.warn(`${uniqueCode} inserting fraud transaction...`);
|
||||
|
||||
// insert reservation transaction to fraud table
|
||||
await model.insertFraudTransaction(reservation_number);
|
||||
// // insert reservation transaction to fraud table
|
||||
// await model.insertFraudTransaction(reservation_number);
|
||||
|
||||
// log warn
|
||||
winston.logger.warn(`${uniqueCode} suspending reservation...`);
|
||||
// // log warn
|
||||
// winston.logger.warn(`${uniqueCode} suspending reservation...`);
|
||||
|
||||
// update reservation with suspend status
|
||||
await model.suspendReservation(reservation_number, now);
|
||||
// // update reservation with suspend status
|
||||
// await model.suspendReservation(reservation_number, now);
|
||||
|
||||
result = {
|
||||
code: '432',
|
||||
message: 'your card number has fraud transaction',
|
||||
data: {},
|
||||
};
|
||||
// result = {
|
||||
// code: '432',
|
||||
// message: 'your card number has fraud transaction',
|
||||
// data: {},
|
||||
// };
|
||||
|
||||
// log warn
|
||||
winston.logger.warn(
|
||||
`${uniqueCode} RESPONSE load balance insert: ${JSON.stringify(
|
||||
result
|
||||
)}`
|
||||
);
|
||||
// // log warn
|
||||
// winston.logger.warn(
|
||||
// `${uniqueCode} RESPONSE load balance insert: ${JSON.stringify(
|
||||
// result
|
||||
// )}`
|
||||
// );
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
|
||||
// log warn
|
||||
winston.logger.warn(`${uniqueCode} checking fraud transaction...`);
|
||||
|
||||
Reference in New Issue
Block a user