|
|
@@ -8,10 +8,8 @@ import { |
|
|
|
} from '@mui/material'; |
|
|
|
import * as React from "react"; |
|
|
|
import * as HttpUtils from "utils/HttpUtils"; |
|
|
|
// import FpsIcon from "assets/images/icons/fps.svg"; |
|
|
|
import { useNavigate } from 'react-router-dom'; |
|
|
|
//import { useNavigate } from 'react-router-dom'; |
|
|
|
import { paymentPath } from "auth/utils"; |
|
|
|
// import {poll} from "utils/Utils"; |
|
|
|
|
|
|
|
import Loadable from 'components/Loadable'; |
|
|
|
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); |
|
|
@@ -30,7 +28,7 @@ const BackgroundHead = { |
|
|
|
// ==============================|| DASHBOARD - DEFAULT ||============================== // |
|
|
|
|
|
|
|
const Index = () => { |
|
|
|
const navigate = useNavigate() |
|
|
|
//const navigate = useNavigate() |
|
|
|
const [responeData, setResponeDataData] = React.useState({}); |
|
|
|
|
|
|
|
const [transactionData, setTransactionData] = React.useState({}); |
|
|
@@ -39,17 +37,16 @@ const Index = () => { |
|
|
|
const [onReady, setOnReady] = React.useState(false); |
|
|
|
const updatePaymentApi = "/api/payment/updatepayment"; |
|
|
|
const paymentStatusApi = "/api/payment/status/"; |
|
|
|
let webtoken = ""; |
|
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
console.log("webtoken: "+localStorage.getItem("webtoken")); |
|
|
|
if (localStorage.getItem("webtoken") != null && localStorage.getItem("webtoken") != "") { |
|
|
|
webtoken = localStorage.getItem("webtoken"); |
|
|
|
localStorage.removeItem("webtoken"); |
|
|
|
loadForm(); |
|
|
|
}else{ |
|
|
|
navigate("/dashboard"); |
|
|
|
} |
|
|
|
// else{ |
|
|
|
// navigate("/dashboard"); |
|
|
|
// } |
|
|
|
}, []); |
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
@@ -110,10 +107,11 @@ const Index = () => { |
|
|
|
url: paymentPath + paymentStatusApi + transactionid, |
|
|
|
params: { |
|
|
|
"apprefid": transactionid, |
|
|
|
"webtoken": webtoken, |
|
|
|
"webtoken": localStorage.getItem("webtoken"), |
|
|
|
}, |
|
|
|
onSuccess: function (responseData) { |
|
|
|
setResponeDataData(responseData) |
|
|
|
localStorage.removeItem("webtoken"); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|