Merge branch 'devops-staging' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend
This commit is contained in:
		| @@ -1117,23 +1117,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( | ||||
|               supplier_trx_id, | ||||
|               callback, | ||||
| @@ -1148,33 +1148,33 @@ export class TransactionService { | ||||
|           HttpStatus.BAD_REQUEST, | ||||
|       ); | ||||
|  | ||||
|     // } | ||||
|     } | ||||
|  | ||||
|   } | ||||
|  | ||||
|   async checkCallbackOrderSuccess(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.callbackOrderSuccess( | ||||
| @@ -1191,7 +1191,7 @@ export class TransactionService { | ||||
|           HttpStatus.OK, | ||||
|       ); | ||||
|  | ||||
|     // } | ||||
|     } | ||||
|  | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user