revert back status failed

This commit is contained in:
Fadli 2022-09-06 13:14:50 +07:00
parent a650657a8d
commit 606864ec3b

View File

@ -1107,27 +1107,27 @@ export class TransactionService {
async checkCallbackOrderFailed(supplier_trx_id: string, callback: any) {
const transactionData = await this.findDataTransactionBySupplierTrxId(
supplier_trx_id
);
if (transactionData.status == statusTransaction.FAILED) {
throw new HttpException(
{
statusCode: HttpStatus.BAD_REQUEST,
error: 'failed to update, the transaction already failed',
},
HttpStatus.BAD_REQUEST,
);
} else if (transactionData.status == statusTransaction.SUCCESS) {
throw new HttpException(
{
statusCode: HttpStatus.BAD_REQUEST,
error: 'failed to update, the transaction already success',
},
HttpStatus.BAD_REQUEST,
);
} else {
// const transactionData = await this.findDataTransactionBySupplierTrxId(
// supplier_trx_id
// );
//
// if (transactionData.status == statusTransaction.FAILED) {
// throw new HttpException(
// {
// statusCode: HttpStatus.BAD_REQUEST,
// error: 'failed to update, the transaction already failed',
// },
// HttpStatus.BAD_REQUEST,
// );
// } else if (transactionData.status == statusTransaction.SUCCESS) {
// throw new HttpException(
// {
// statusCode: HttpStatus.BAD_REQUEST,
// error: 'failed to update, the transaction already success',
// },
// HttpStatus.BAD_REQUEST,
// );
// } else {
const updateTransaction = await this.callbackOrderFailed(
supplier_trx_id,
callback,
@ -1142,7 +1142,7 @@ export class TransactionService {
HttpStatus.BAD_REQUEST,
);
}
// }
}