Browse Source

success

master
Anna Ho 1 year ago
parent
commit
64d2cd0d93
3 changed files with 9 additions and 6 deletions
  1. +1
    -1
      src/pages/Payment/Card/index.js
  2. +7
    -4
      src/pages/Payment/PaymentSuccess.js
  3. +1
    -1
      src/routes/PublicUserRoutes.js

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

@@ -89,7 +89,7 @@ const Index = () => {
}, },
// "locale":"<locale>", // "locale":"<locale>",
// "eserviceid":"<eserviceid>", // "eserviceid":"<eserviceid>",
"returnurl": "http://"+window.location.hostname+"/paymentPage/success/"+paymentData.transactionid+"/"+paymentData.webtoken
"returnurl": "http://"+window.location.hostname+"/paymentPage/success/"+paymentData.webtoken
}, },
///{state:{transactionid:paymentData.transactionid,webtoken:paymentData.webtoken} } ///{state:{transactionid:paymentData.transactionid,webtoken:paymentData.webtoken} }
onSuccess: function(responseData){ onSuccess: function(responseData){


+ 7
- 4
src/pages/Payment/PaymentSuccess.js View File

@@ -43,14 +43,14 @@ const Index = () => {




React.useEffect(() => { React.useEffect(() => {
if (params.transactionid != "" && params.webtoken != "") {
if (params.webtoken != "") {
loadForm(); loadForm();
} }
}, []); }, []);


React.useEffect(() => { React.useEffect(() => {
console.log(responeData) console.log(responeData)
if (Object.keys(responeData).length > 0 && fpsmerchanttimeoutdatetime != "") {
if (Object.keys(responeData).length > 0) {
setTransactionData(responeData) setTransactionData(responeData)
} }
}, [responeData]); }, [responeData]);
@@ -68,10 +68,13 @@ const Index = () => {
const trnTime = date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); const trnTime = date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
setTransactionDate(trnDate) setTransactionDate(trnDate)
setTransactionTime(trnTime) setTransactionTime(trnTime)
const params = new URLSearchParams(window.location.pathname);
let transactionid = params.get("TRANSACTION_ID")

HttpUtils.post({ HttpUtils.post({
url: paymentPath + paymentStatusApi + params.transactionid,
url: paymentPath + paymentStatusApi + transactionid,
params: { params: {
"apprefid": params.transactionid,
"apprefid": transactionid,
"webtoken": params.webtoken, "webtoken": params.webtoken,
}, },
onSuccess: function (responseData) { onSuccess: function (responseData) {


+ 1
- 1
src/routes/PublicUserRoutes.js View File

@@ -79,7 +79,7 @@ const PublicDashboard = {
element: <Payment_Card/> element: <Payment_Card/>
}, },
{ {
path: 'paymentPage/success/:transactionid/:webtoken',
path: 'paymentPage/success/:webtoken',
element: <Payment_Success/> element: <Payment_Success/>
}, },
{ {


Loading…
Cancel
Save