diff --git a/src/pages/Payment/Details_GLD/index.js b/src/pages/Payment/Details_GLD/index.js index 114cc82..68a1764 100644 --- a/src/pages/Payment/Details_GLD/index.js +++ b/src/pages/Payment/Details_GLD/index.js @@ -58,7 +58,7 @@ const Index = () => { // window.print(); setOnDownload(true) HttpUtils.fileDownload({ - url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id, + url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id+"/"+"en", onResponse:()=>{ setOnDownload(false) }, diff --git a/src/pages/Payment/Details_Public/index.js b/src/pages/Payment/Details_Public/index.js index 96ee14d..5407daf 100644 --- a/src/pages/Payment/Details_Public/index.js +++ b/src/pages/Payment/Details_Public/index.js @@ -42,6 +42,7 @@ const Index = () => { const [onReady, setOnReady] = React.useState(false); const [onDownload, setOnDownload] = React.useState(false); // const [detailsOrder, setDetailsOrder] = React.useState(2); + const { locale } = intl; React.useEffect(() => { loadForm(); @@ -60,8 +61,10 @@ const Index = () => { const doPrint = () => { // window.print(); setOnDownload(true) + const local = locale + // console.log(local) HttpUtils.fileDownload({ - url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id, + url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id+"/"+local, onResponse:()=>{ setOnDownload(false) }, diff --git a/src/pages/Payment/FPS/AckPage.js b/src/pages/Payment/FPS/AckPage.js index ae0d804..a9b01a7 100644 --- a/src/pages/Payment/FPS/AckPage.js +++ b/src/pages/Payment/FPS/AckPage.js @@ -23,7 +23,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('../Details_Public/Payme const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' -import {FormattedMessage} from "react-intl"; +import {FormattedMessage,useIntl} from "react-intl"; const BackgroundHead = { backgroundImage: `url(${titleBackgroundImg})`, width: '100%', @@ -52,6 +52,8 @@ const AckPage = () => { const [onReady, setOnReady] = React.useState(false); const paymentStatusApi = "/api/payment/status/"; const [onDownload, setOnDownload] = React.useState(false); + const intl = useIntl(); + const { locale } = intl; React.useEffect(() => { loadForm(); @@ -143,8 +145,9 @@ const AckPage = () => { const doPrint = () => { // window.print(); setOnDownload(true) + const local = locale HttpUtils.fileDownload({ - url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"), + url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, onResponse:()=>{ setOnDownload(false) }, diff --git a/src/pages/Payment/FPS/fpscallback.js b/src/pages/Payment/FPS/fpscallback.js index 7e2b004..6120c7c 100644 --- a/src/pages/Payment/FPS/fpscallback.js +++ b/src/pages/Payment/FPS/fpscallback.js @@ -23,7 +23,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('../Details_Public/Payme const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' -import {FormattedMessage} from "react-intl"; +import {FormattedMessage,useIntl} from "react-intl"; const BackgroundHead = { backgroundImage: `url(${titleBackgroundImg})`, width: '100%', @@ -52,7 +52,8 @@ const Fpscallback = () => { const [onReady, setOnReady] = React.useState(false); // const paymentStatusApi = "/api/payment/status/"; const [onDownload, setOnDownload] = React.useState(false); - + const intl = useIntl(); + const { locale } = intl; React.useEffect(() => { loadForm(); @@ -162,8 +163,9 @@ const Fpscallback = () => { const params = new URLSearchParams(window.location.search); // window.print(); setOnDownload(true) + const local = locale HttpUtils.fileDownload({ - url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.get("PAYMENT_ID"), + url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.get("PAYMENT_ID")+"/"+local, onResponse:()=>{ setOnDownload(false) }, diff --git a/src/pages/Payment/PaymentCallback.js b/src/pages/Payment/PaymentCallback.js index e261213..0beac0b 100644 --- a/src/pages/Payment/PaymentCallback.js +++ b/src/pages/Payment/PaymentCallback.js @@ -20,7 +20,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('./Details_Public/Paymen const DataGrid = Loadable(React.lazy(() => import('./Details_Public/DataGrid'))); import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' -import {FormattedMessage} from "react-intl"; +import {FormattedMessage,useIntl} from "react-intl"; const BackgroundHead = { backgroundImage: `url(${titleBackgroundImg})`, width: '100%', @@ -48,6 +48,8 @@ const Index = () => { const [onReady, setOnReady] = React.useState(false); const updatePaymentApi = "/api/payment/updatepayment"; const paymentStatusApi = "/api/payment/status/"; + const intl = useIntl(); + const { locale } = intl; React.useEffect(() => { @@ -146,8 +148,10 @@ const Index = () => { const doPrint = () => { // window.print(); setOnDownload(true) + const local = locale + // console.log(local) HttpUtils.fileDownload({ - url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"), + url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, onResponse:()=>{ setOnDownload(false) },