- added logs in ppob callback for metro

This commit is contained in:
Fadli 2022-08-03 19:25:08 +07:00
parent f8c9e4fcd0
commit 1ef47fc7e7

View File

@ -37,8 +37,7 @@ export class PpobCallbackController {
@Get('/metro') @Get('/metro')
async getMetro(@Req() request: FastifyRequest) { async getMetro(@Req() request: FastifyRequest) {
const response = request.query; const response = request.query;
console.log('statusapani', response['status']);
console.log('statusapani2', response.toString());
if (response['message'].toLowerCase().includes('cek tagihan')) { if (response['message'].toLowerCase().includes('cek tagihan')) {
if (response['status'] != 20) { if (response['status'] != 20) {
//TODO: UPDATE GAGAL //TODO: UPDATE GAGAL
@ -67,7 +66,10 @@ export class PpobCallbackController {
); );
// //
} else { } else {
console.log('statusapani', response['status']);
console.log('statusapani2', response.toString());
if (response['status'].toString() != '20') { if (response['status'].toString() != '20') {
console.log("masukkesiniga", "msk")
//TODO: UPDATE GAGAL //TODO: UPDATE GAGAL
const updateTransaction = const updateTransaction =
await this.transactionService.callbackOrderFailed( await this.transactionService.callbackOrderFailed(