|
|
@@ -8,9 +8,8 @@ import { |
|
|
|
} from '@mui/material'; |
|
|
|
import * as React from "react"; |
|
|
|
import * as HttpUtils from "utils/HttpUtils"; |
|
|
|
// import { useNavigate } from "react-router-dom"; |
|
|
|
// import FpsIcon from "assets/images/icons/fps.svg"; |
|
|
|
import { useParams } from 'react-router-dom'; |
|
|
|
import { useNavigate } from 'react-router-dom'; |
|
|
|
import { paymentPath } from "auth/utils"; |
|
|
|
// import {poll} from "utils/Utils"; |
|
|
|
|
|
|
@@ -31,8 +30,7 @@ const BackgroundHead = { |
|
|
|
// ==============================|| DASHBOARD - DEFAULT ||============================== // |
|
|
|
|
|
|
|
const Index = () => { |
|
|
|
// const navigate = useNavigate() |
|
|
|
const params = useParams(); |
|
|
|
const navigate = useNavigate() |
|
|
|
const [responeData, setResponeDataData] = React.useState({}); |
|
|
|
|
|
|
|
const [transactionData, setTransactionData] = React.useState({}); |
|
|
@@ -41,11 +39,16 @@ const Index = () => { |
|
|
|
const [onReady, setOnReady] = React.useState(false); |
|
|
|
const updatePaymentApi = "/api/payment/updatepayment"; |
|
|
|
const paymentStatusApi = "/api/payment/status/"; |
|
|
|
let webtoken = ""; |
|
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
if (params.webtoken != "") { |
|
|
|
if (localStorage.getItem("webtoken") != null && localStorage.getItem("webtoken") != "") { |
|
|
|
webtoken = localStorage.getItem("webtoken"); |
|
|
|
localStorage.removeItem("webtoken"); |
|
|
|
loadForm(); |
|
|
|
}else{ |
|
|
|
navigate("/dashboard"); |
|
|
|
} |
|
|
|
}, []); |
|
|
|
|
|
|
@@ -69,7 +72,7 @@ const Index = () => { |
|
|
|
const trnTime = date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); |
|
|
|
setTransactionDate(trnDate) |
|
|
|
setTransactionTime(trnTime) |
|
|
|
const params = new URLSearchParams(window.location.pathname); |
|
|
|
const params = new URLSearchParams(window.location.search); |
|
|
|
let transactionid = params.get("TRANSACTION_ID") |
|
|
|
let receipt_token = params.get("RECEIPT_TOKEN").replace("%3D", "=") |
|
|
|
|
|
|
@@ -107,7 +110,7 @@ const Index = () => { |
|
|
|
url: paymentPath + paymentStatusApi + transactionid, |
|
|
|
params: { |
|
|
|
"apprefid": transactionid, |
|
|
|
"webtoken": params.webtoken, |
|
|
|
"webtoken": webtoken, |
|
|
|
}, |
|
|
|
onSuccess: function (responseData) { |
|
|
|
setResponeDataData(responseData) |
|
|
|