Browse Source

update receipt with cn

master
Alex Cheung 1 year ago
parent
commit
bfa8afc93c
5 changed files with 21 additions and 9 deletions
  1. +1
    -1
      src/pages/Payment/Details_GLD/index.js
  2. +4
    -1
      src/pages/Payment/Details_Public/index.js
  3. +5
    -2
      src/pages/Payment/FPS/AckPage.js
  4. +5
    -3
      src/pages/Payment/FPS/fpscallback.js
  5. +6
    -2
      src/pages/Payment/PaymentCallback.js

+ 1
- 1
src/pages/Payment/Details_GLD/index.js View File

@@ -58,7 +58,7 @@ const Index = () => {
// window.print(); // window.print();
setOnDownload(true) setOnDownload(true)
HttpUtils.fileDownload({ HttpUtils.fileDownload({
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id,
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id+"/"+"en",
onResponse:()=>{ onResponse:()=>{
setOnDownload(false) setOnDownload(false)
}, },


+ 4
- 1
src/pages/Payment/Details_Public/index.js View File

@@ -42,6 +42,7 @@ const Index = () => {
const [onReady, setOnReady] = React.useState(false); const [onReady, setOnReady] = React.useState(false);
const [onDownload, setOnDownload] = React.useState(false); const [onDownload, setOnDownload] = React.useState(false);
// const [detailsOrder, setDetailsOrder] = React.useState(2); // const [detailsOrder, setDetailsOrder] = React.useState(2);
const { locale } = intl;


React.useEffect(() => { React.useEffect(() => {
loadForm(); loadForm();
@@ -60,8 +61,10 @@ const Index = () => {
const doPrint = () => { const doPrint = () => {
// window.print(); // window.print();
setOnDownload(true) setOnDownload(true)
const local = locale
// console.log(local)
HttpUtils.fileDownload({ HttpUtils.fileDownload({
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id,
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id+"/"+local,
onResponse:()=>{ onResponse:()=>{
setOnDownload(false) setOnDownload(false)
}, },


+ 5
- 2
src/pages/Payment/FPS/AckPage.js View File

@@ -23,7 +23,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('../Details_Public/Payme
const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid')));


import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
import {FormattedMessage} from "react-intl";
import {FormattedMessage,useIntl} from "react-intl";
const BackgroundHead = { const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`, backgroundImage: `url(${titleBackgroundImg})`,
width: '100%', width: '100%',
@@ -52,6 +52,8 @@ const AckPage = () => {
const [onReady, setOnReady] = React.useState(false); const [onReady, setOnReady] = React.useState(false);
const paymentStatusApi = "/api/payment/status/"; const paymentStatusApi = "/api/payment/status/";
const [onDownload, setOnDownload] = React.useState(false); const [onDownload, setOnDownload] = React.useState(false);
const intl = useIntl();
const { locale } = intl;


React.useEffect(() => { React.useEffect(() => {
loadForm(); loadForm();
@@ -143,8 +145,9 @@ const AckPage = () => {
const doPrint = () => { const doPrint = () => {
// window.print(); // window.print();
setOnDownload(true) setOnDownload(true)
const local = locale
HttpUtils.fileDownload({ HttpUtils.fileDownload({
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"),
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local,
onResponse:()=>{ onResponse:()=>{
setOnDownload(false) setOnDownload(false)
}, },


+ 5
- 3
src/pages/Payment/FPS/fpscallback.js View File

@@ -23,7 +23,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('../Details_Public/Payme
const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid')));


import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
import {FormattedMessage} from "react-intl";
import {FormattedMessage,useIntl} from "react-intl";
const BackgroundHead = { const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`, backgroundImage: `url(${titleBackgroundImg})`,
width: '100%', width: '100%',
@@ -52,7 +52,8 @@ const Fpscallback = () => {
const [onReady, setOnReady] = React.useState(false); const [onReady, setOnReady] = React.useState(false);
// const paymentStatusApi = "/api/payment/status/"; // const paymentStatusApi = "/api/payment/status/";
const [onDownload, setOnDownload] = React.useState(false); const [onDownload, setOnDownload] = React.useState(false);

const intl = useIntl();
const { locale } = intl;


React.useEffect(() => { React.useEffect(() => {
loadForm(); loadForm();
@@ -162,8 +163,9 @@ const Fpscallback = () => {
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
// window.print(); // window.print();
setOnDownload(true) setOnDownload(true)
const local = locale
HttpUtils.fileDownload({ HttpUtils.fileDownload({
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.get("PAYMENT_ID"),
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.get("PAYMENT_ID")+"/"+local,
onResponse:()=>{ onResponse:()=>{
setOnDownload(false) setOnDownload(false)
}, },


+ 6
- 2
src/pages/Payment/PaymentCallback.js View File

@@ -20,7 +20,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('./Details_Public/Paymen
const DataGrid = Loadable(React.lazy(() => import('./Details_Public/DataGrid'))); const DataGrid = Loadable(React.lazy(() => import('./Details_Public/DataGrid')));


import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
import {FormattedMessage} from "react-intl";
import {FormattedMessage,useIntl} from "react-intl";
const BackgroundHead = { const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`, backgroundImage: `url(${titleBackgroundImg})`,
width: '100%', width: '100%',
@@ -48,6 +48,8 @@ const Index = () => {
const [onReady, setOnReady] = React.useState(false); const [onReady, setOnReady] = React.useState(false);
const updatePaymentApi = "/api/payment/updatepayment"; const updatePaymentApi = "/api/payment/updatepayment";
const paymentStatusApi = "/api/payment/status/"; const paymentStatusApi = "/api/payment/status/";
const intl = useIntl();
const { locale } = intl;




React.useEffect(() => { React.useEffect(() => {
@@ -146,8 +148,10 @@ const Index = () => {
const doPrint = () => { const doPrint = () => {
// window.print(); // window.print();
setOnDownload(true) setOnDownload(true)
const local = locale
// console.log(local)
HttpUtils.fileDownload({ HttpUtils.fileDownload({
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"),
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local,
onResponse:()=>{ onResponse:()=>{
setOnDownload(false) setOnDownload(false)
}, },


Loading…
Cancel
Save