add : Add supplier: Metro, logic for the callback
This commit is contained in:
parent
3ff8193949
commit
06f12b0140
|
@ -24,6 +24,40 @@ export class PpobCallbackController {
|
||||||
response['clientid'],
|
response['clientid'],
|
||||||
response,
|
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 {
|
} else {
|
||||||
//TODO: UPDATE BERHASIL
|
//TODO: UPDATE BERHASIL
|
||||||
const updateTransaction =
|
const updateTransaction =
|
||||||
|
@ -31,7 +65,14 @@ export class PpobCallbackController {
|
||||||
response['clientid'],
|
response['clientid'],
|
||||||
response,
|
response,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return {
|
||||||
|
updateTransaction,
|
||||||
|
statusCode: HttpStatus.OK,
|
||||||
|
message: 'success',
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.log({
|
this.logger.log({
|
||||||
requestQuery: request.query,
|
requestQuery: request.query,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user