Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging
This commit is contained in:
commit
21ed1f5f03
|
@ -21,17 +21,7 @@ export const doTransaction = async (
|
||||||
axios.get(`${irs_url}?id=${irs_id}&pin=${irs_pin}&user=${irs_user}&pass=${irs_pass}&kodeproduk=${productCode}&tujuan=${destination}&counter=1&idtrx=${idtrx}`)
|
axios.get(`${irs_url}?id=${irs_id}&pin=${irs_pin}&user=${irs_user}&pass=${irs_pass}&kodeproduk=${productCode}&tujuan=${destination}&counter=1&idtrx=${idtrx}`)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
// Handle successful response
|
// Handle successful response
|
||||||
if (res.data.includes('saldo tidak cukup')) {
|
|
||||||
throw new HttpException(
|
|
||||||
{
|
|
||||||
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
||||||
error: 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali',
|
|
||||||
},
|
|
||||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
// Handle error
|
// Handle error
|
||||||
|
|
Loading…
Reference in New Issue
Block a user