Merge branch 'development' into 'devops-staging'

add : Add supplier: Metro, logic for the callback

See merge request empatnusabangsa/ppob/ppob-backend!150
This commit is contained in:
muhammad fadil 2022-04-28 10:45:41 +00:00
commit ebf1df2fad

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,
});