From 0fb2e1d6fa0141c6f3a474c9ec94087cf027ace7 Mon Sep 17 00:00:00 2001 From: Muhammad Fadli Date: Fri, 21 Apr 2023 11:31:53 +0700 Subject: [PATCH] - push logs --- src/helper/irs-api.ts | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/helper/irs-api.ts b/src/helper/irs-api.ts index 125507f..9408695 100644 --- a/src/helper/irs-api.ts +++ b/src/helper/irs-api.ts @@ -122,20 +122,15 @@ export const doTransaction = async ( } } + try { const res = await axios.get( `${supplier.url}?memberID=${supplier.irs_id}&pin=${supplier.irs_pin}&password=${supplier.irs_pass}&product=${productCode}&dest=${destination}&counter=1&refID=${idtrx}`, - ) - .catch((error) => { - if (error.response) { - throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali'; - } else if (error.request) { - throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali'; - } else { - throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali'; - } - }); - - return res.data; + ); + console.log('restransini', res); + return res.data; + } catch (e) { + throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali'; + } } catch (err) { console.log('errtransaction', err);