|
|
@@ -40,7 +40,6 @@ const Index = () => { |
|
|
|
|
|
|
|
const [paymentData, setPaymentData] = React.useState({}); |
|
|
|
const [onReady, setOnReady] = React.useState(false); |
|
|
|
const [redirecturl, setRedirectUrl] = React.useState(""); |
|
|
|
// const [paymentstatuscode, setPaymentstatuscode] = React.useState(""); |
|
|
|
// const [fpsqrcodeurl, setFpsqrcodeurl] = React.useState(""); |
|
|
|
// const pasgPath = 'https://fps.payapps.hkicl.com.hk'; //PRD |
|
|
@@ -59,15 +58,11 @@ const Index = () => { |
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
if (Object.keys(paymentData).length > 0){ |
|
|
|
setOnReady(true); |
|
|
|
loadForm(); |
|
|
|
} |
|
|
|
}, [paymentData]); |
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
setOnReady(true); |
|
|
|
}, [redirecturl]); |
|
|
|
|
|
|
|
|
|
|
|
const loadForm = () => { |
|
|
|
const timeoutdatetime = "2023-10-26T09:04:30Z[UTC]" |
|
|
|
const convertedDateString = timeoutdatetime.replace("[UTC]", ""); |
|
|
@@ -104,8 +99,7 @@ const Index = () => { |
|
|
|
"redirecturl": "<redirecturl>" |
|
|
|
} |
|
|
|
*/ |
|
|
|
setRedirectUrl(responseData.redirecturl); |
|
|
|
window.open(redirecturl); |
|
|
|
window.open(responseData.redirecturl); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|