- added logs in ppob callback for metro
This commit is contained in:
parent
929d06331e
commit
f8c9e4fcd0
|
@ -37,7 +37,8 @@ export class PpobCallbackController {
|
|||
@Get('/metro')
|
||||
async getMetro(@Req() request: FastifyRequest) {
|
||||
const response = request.query;
|
||||
|
||||
console.log('statusapani', response['status']);
|
||||
console.log('statusapani2', response.toString());
|
||||
if (response['message'].toLowerCase().includes('cek tagihan')) {
|
||||
if (response['status'] != 20) {
|
||||
//TODO: UPDATE GAGAL
|
||||
|
@ -79,16 +80,22 @@ export class PpobCallbackController {
|
|||
statusCode: HttpStatus.BAD_REQUEST,
|
||||
message: 'failed to proccess',
|
||||
};
|
||||
} else {
|
||||
|
||||
//TODO: UPDATE BERHASIL
|
||||
const updateTransaction =
|
||||
await this.transactionService.callbackOrderSuccess(
|
||||
response['refid'],
|
||||
response,
|
||||
);
|
||||
|
||||
return {
|
||||
updateTransaction,
|
||||
statusCode: HttpStatus.OK,
|
||||
message: 'success',
|
||||
};
|
||||
}
|
||||
|
||||
//TODO: UPDATE BERHASIL
|
||||
const updateTransaction =
|
||||
await this.transactionService.callbackOrderSuccess(
|
||||
response['refid'],
|
||||
response,
|
||||
);
|
||||
}
|
||||
|
||||
this.logger.log({
|
||||
requestQuery: request.query,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user