diff --git a/src/pages/Payment/FPS/AckPage.js b/src/pages/Payment/FPS/AckPage.js index 7c1d020..d046a9b 100644 --- a/src/pages/Payment/FPS/AckPage.js +++ b/src/pages/Payment/FPS/AckPage.js @@ -51,7 +51,7 @@ const AckPage = () => { // const [transactionTime, setTransactionTime] = React.useState(""); const [onReady, setOnReady] = React.useState(false); const paymentStatusApi = "/api/payment/status/"; - + const [onDownload, setOnDownload] = React.useState(false); React.useEffect(() => { loadForm(); @@ -142,8 +142,15 @@ const AckPage = () => { const doPrint = () => { // window.print(); + setOnDownload(true) HttpUtils.fileDownload({ url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"), + onResponse:()=>{ + setOnDownload(false) + }, + onError:()=>{ + setOnDownload(false) + } }); }; @@ -182,6 +189,7 @@ const AckPage = () => { { const [paymentData, setPaymentData] = React.useState({}); const [itemList, setItemList] = React.useState([]); // const [paymentId, setPaymentId] = React.useState(""); + const [onDownload, setOnDownload] = React.useState(false); const [transactionData, setTransactionData] = React.useState({}); // const [transactionDate, setTransactionDate] = React.useState(""); @@ -144,8 +145,15 @@ const Index = () => { const doPrint = () => { // window.print(); + setOnDownload(true) HttpUtils.fileDownload({ url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"), + onResponse:()=>{ + setOnDownload(false) + }, + onError:()=>{ + setOnDownload(false) + } }); }; @@ -184,6 +192,7 @@ const Index = () => {