add : Add supplier: Metro, logic for the callback

This commit is contained in:
Fadli 2022-04-28 17:26:56 +07:00
parent 3ff8193949
commit 06f12b0140

View File

@ -24,6 +24,40 @@ export class PpobCallbackController {
response['clientid'],
response,
);
return {
updateTransaction,
statusCode: HttpStatus.BAD_REQUEST,
message: 'failed to proccess',
};
}
//TODO: UPDATE BERHASIL
const updateTransaction =
await this.transactionService.callbackOrderSuccess(
response['clientid'],
response,
);
return {
updateTransaction,
statusCode: HttpStatus.OK,
message: 'success',
};
if (response['status'] != 20) {
//TODO: UPDATE GAGAL
const updateTransaction =
await this.transactionService.callbackOrderFailed(
response['clientid'],
response,
);
return {
updateTransaction,
statusCode: HttpStatus.BAD_REQUEST,
message: 'failed to proccess',
};
} else {
//TODO: UPDATE BERHASIL
const updateTransaction =
@ -31,7 +65,14 @@ export class PpobCallbackController {
response['clientid'],
response,
);
return {
updateTransaction,
statusCode: HttpStatus.OK,
message: 'success',
};
}
this.logger.log({
requestQuery: request.query,
});