fix: callback metro
This commit is contained in:
		| @@ -44,12 +44,18 @@ export class PpobCallbackController { | ||||
|       statusCode: HttpStatus.OK, | ||||
|       message: 'success', | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   @Public() | ||||
|   @Get('/metro') | ||||
|   async getMetro(@Req() request: FastifyRequest) { | ||||
|     const response = request.query; | ||||
|  | ||||
|     if (response['status'] != 20) { | ||||
|       //TODO: UPDATE GAGAL | ||||
|       const updateTransaction = | ||||
|         await this.transactionService.callbackOrderFailed( | ||||
|           response['clientid'], | ||||
|           response['refid'], | ||||
|           response, | ||||
|         ); | ||||
|  | ||||
| @@ -58,11 +64,12 @@ export class PpobCallbackController { | ||||
|         statusCode: HttpStatus.BAD_REQUEST, | ||||
|         message: 'failed to proccess', | ||||
|       }; | ||||
|     } else { | ||||
|     } | ||||
|  | ||||
|     //TODO: UPDATE BERHASIL | ||||
|     const updateTransaction = | ||||
|       await this.transactionService.callbackOrderSuccess( | ||||
|           response['clientid'], | ||||
|         response['refid'], | ||||
|         response, | ||||
|       ); | ||||
|  | ||||
| @@ -71,7 +78,6 @@ export class PpobCallbackController { | ||||
|       statusCode: HttpStatus.OK, | ||||
|       message: 'success', | ||||
|     }; | ||||
|     } | ||||
|  | ||||
|     this.logger.log({ | ||||
|       requestQuery: request.query, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user