|
@@ -8,10 +8,15 @@ import { |
|
|
import * as React from "react"; |
|
|
import * as React from "react"; |
|
|
import * as HttpUtils from "utils/HttpUtils"; |
|
|
import * as HttpUtils from "utils/HttpUtils"; |
|
|
import { useNavigate } from "react-router-dom"; |
|
|
import { useNavigate } from "react-router-dom"; |
|
|
import FpsIcon from "assets/images/icons/fps.svg"; |
|
|
|
|
|
|
|
|
|
|
|
import { useLocation } from 'react-router-dom'; |
|
|
import { useLocation } from 'react-router-dom'; |
|
|
import {paymentPath} from "auth/utils"; |
|
|
import {paymentPath} from "auth/utils"; |
|
|
// import {poll} from "utils/Utils"; |
|
|
// import {poll} from "utils/Utils"; |
|
|
|
|
|
import VisaIcon from "assets/images/icons/visacard.svg"; |
|
|
|
|
|
import MasterIcon from "assets/images/icons/mastercard.svg"; |
|
|
|
|
|
import JcbIcon from "assets/images/icons/jcb.svg"; |
|
|
|
|
|
import UnionPayIcon from "assets/images/icons/unionpay.svg"; |
|
|
|
|
|
import PpsIcon from "assets/images/icons/ppshk.svg"; |
|
|
|
|
|
|
|
|
import Loadable from 'components/Loadable'; |
|
|
import Loadable from 'components/Loadable'; |
|
|
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); |
|
|
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); |
|
@@ -74,7 +79,7 @@ const Index = () => { |
|
|
setFpsmerchanttimeoutdatetime(convertedDateString) |
|
|
setFpsmerchanttimeoutdatetime(convertedDateString) |
|
|
|
|
|
|
|
|
HttpUtils.post({ |
|
|
HttpUtils.post({ |
|
|
url: paymentPath+loadPaymentUrl+paymentData.type, |
|
|
|
|
|
|
|
|
url: paymentPath+loadPaymentUrl+(paymentData.type=="PPS"?"pps":"creditcard"), |
|
|
params:{ |
|
|
params:{ |
|
|
"transactionid": paymentData.transactionid, |
|
|
"transactionid": paymentData.transactionid, |
|
|
"apprefid:": paymentData.transactionid, |
|
|
"apprefid:": paymentData.transactionid, |
|
@@ -105,7 +110,7 @@ const Index = () => { |
|
|
} |
|
|
} |
|
|
*/ |
|
|
*/ |
|
|
setRedirectUrl(responseData.redirecturl); |
|
|
setRedirectUrl(responseData.redirecturl); |
|
|
|
|
|
|
|
|
|
|
|
window.open(redirecturl); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@@ -187,6 +192,14 @@ const Index = () => { |
|
|
// }); |
|
|
// }); |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
const getIcon = () => { |
|
|
|
|
|
if(paymentData.type=="Visa") return VisaIcon; |
|
|
|
|
|
if(paymentData.type=="Mastercard") return MasterIcon; |
|
|
|
|
|
if(paymentData.type=="UnionPay") return UnionPayIcon; |
|
|
|
|
|
if(paymentData.type=="JCB") return JcbIcon; |
|
|
|
|
|
if(paymentData.type=="PPS") return PpsIcon; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
!onReady ? |
|
|
!onReady ? |
|
|
<LoadingComponent /> |
|
|
<LoadingComponent /> |
|
@@ -207,7 +220,7 @@ const Index = () => { |
|
|
<Grid item xs={12} md={12} > |
|
|
<Grid item xs={12} md={12} > |
|
|
|
|
|
|
|
|
<Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> |
|
|
<Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> |
|
|
<img src={FpsIcon} width="80" height="80" alt="FPS"></img> |
|
|
|
|
|
|
|
|
<img src={getIcon()} width="80" height="80" alt={paymentData.type}></img> |
|
|
<br /> |
|
|
<br /> |
|
|
支付金額 |
|
|
支付金額 |
|
|
<br /> |
|
|
<br /> |
|
|