diff --git a/src/transaction/transaction.service.ts b/src/transaction/transaction.service.ts index ecfd394..f7bb270 100644 --- a/src/transaction/transaction.service.ts +++ b/src/transaction/transaction.service.ts @@ -1222,23 +1222,23 @@ export class TransactionService { 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 { + // 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( @@ -1254,7 +1254,7 @@ export class TransactionService { }, HttpStatus.BAD_REQUEST, ); - } + // } } async checkCallbackOrderSuccess(supplier_trx_id: string, callback: any) { @@ -1262,23 +1262,23 @@ export class TransactionService { 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 { + // 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.callbackOrderSuccess( supplier_trx_id, callback, @@ -1292,7 +1292,7 @@ export class TransactionService { }, HttpStatus.OK, ); - } + // } } async findDataTransactionBySupplierTrxId(supplier_trx_id: string) {