- fix order prod error when checking status
This commit is contained in:
parent
52d712fd05
commit
c58e3f281b
|
@ -310,15 +310,15 @@ export class TransactionService {
|
|||
'prepaid',
|
||||
);
|
||||
|
||||
if (!productData.statusHistory.status.includes('ACTIVE')) {
|
||||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
error: `Transaction Failed because product is not active`,
|
||||
},
|
||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
);
|
||||
} else {
|
||||
// if (!productData.statusHistory.status.includes('ACTIVE')) {
|
||||
// throw new HttpException(
|
||||
// {
|
||||
// statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
// error: `Transaction Failed because product is not active`,
|
||||
// },
|
||||
// HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
// );
|
||||
// } else {
|
||||
|
||||
const trxId = Array(6)
|
||||
.fill(null)
|
||||
|
@ -454,7 +454,7 @@ export class TransactionService {
|
|||
amount: product_price.mark_up_price + product_price.price,
|
||||
status: statusTransaction[statusTransaction.SUCCESS],
|
||||
};
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
async orderTransactionProd(
|
||||
|
@ -467,15 +467,15 @@ export class TransactionService {
|
|||
'prepaid',
|
||||
);
|
||||
|
||||
if (!productData.statusHistory.status.includes('ACTIVE')) {
|
||||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
error: `Transaction Failed because product is not active`,
|
||||
},
|
||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
);
|
||||
} else {
|
||||
// if (!productData.statusHistory.status.includes('ACTIVE')) {
|
||||
// throw new HttpException(
|
||||
// {
|
||||
// statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
// error: `Transaction Failed because product is not active`,
|
||||
// },
|
||||
// HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
// );
|
||||
// } else {
|
||||
let status;
|
||||
const amount = 0;
|
||||
//GET USER DATA
|
||||
|
@ -692,7 +692,7 @@ export class TransactionService {
|
|||
amount: product_price.mark_up_price + product_price.price,
|
||||
status: status,
|
||||
};
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
async orderTransactionBillProd(
|
||||
|
|
Loading…
Reference in New Issue
Block a user