Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging
This commit is contained in:
commit
e2ae446f1f
|
@ -18,22 +18,11 @@ export const doTransaction = async (
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
if (supplier.code == 'IRS') {
|
if (supplier.code == 'IRS') {
|
||||||
axios.get(`${irs_url}?id=${irs_id}&pin=${irs_pin}&user=${irs_user}&pass=${irs_pass}&kodeproduk=${productCode}&tujuan=${destination}&counter=1&idtrx=${idtrx}`)
|
const res = await axios.get(
|
||||||
.then(res => {
|
`${irs_url}?id=${irs_id}&pin=${irs_pin}&user=${irs_user}&pass=${irs_pass}&kodeproduk=${productCode}&tujuan=${destination}&counter=1&idtrx=${idtrx}`,
|
||||||
// Handle successful response
|
|
||||||
return res.data;
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
// Handle error
|
|
||||||
console.log('inierrorelang', e)
|
|
||||||
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,
|
|
||||||
);
|
);
|
||||||
});
|
|
||||||
|
return res.data;
|
||||||
} else if (supplier.code == 'NIRS') {
|
} else if (supplier.code == 'NIRS') {
|
||||||
const res = await axios.get(
|
const res = await axios.get(
|
||||||
`${supplier.url}?id=${supplier.irs_id}&pin=${supplier.irs_pin}&user=${supplier.irs_user}&pass=${supplier.irs_pass}&kodeproduk=${productCode}&tujuan=${destination}&counter=1&idtrx=${idtrx}`,
|
`${supplier.url}?id=${supplier.irs_id}&pin=${supplier.irs_pin}&user=${supplier.irs_user}&pass=${supplier.irs_pass}&kodeproduk=${productCode}&tujuan=${destination}&counter=1&idtrx=${idtrx}`,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user