@@ -82,7 +82,7 @@ const MultiPaymentWindow = (props) => { | |||||
}; | }; | ||||
const confirmPaymentHandle = () => () =>{ | const confirmPaymentHandle = () => () =>{ | ||||
props.setConfirmPayment(true); | |||||
props.setConfirmPayment(true); | |||||
}; | }; | ||||
@@ -8,6 +8,7 @@ import { | |||||
} from '@mui/material'; | } from '@mui/material'; | ||||
import * as React from "react"; | import * as React from "react"; | ||||
import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
import * as UrlUtils from "utils/ApiPathConst"; | |||||
//import { useNavigate } from 'react-router-dom'; | //import { useNavigate } from 'react-router-dom'; | ||||
import { paymentPath } from "auth/utils"; | import { paymentPath } from "auth/utils"; | ||||
@@ -113,6 +114,20 @@ const Index = () => { | |||||
localStorage.removeItem("webtoken"); | localStorage.removeItem("webtoken"); | ||||
localStorage.removeItem("transactionid"); | localStorage.removeItem("transactionid"); | ||||
} | } | ||||
HttpUtils.post({ | |||||
url:UrlUtils.PAYMENT_SAVE, | |||||
params:{ | |||||
id:localStorage.getItem("paymentId"), | |||||
transNo:transactionData.transicationId, | |||||
transDateTime: responseData.paymentdetail.time, | |||||
egisRefNo:responseData.paymentdetail.paymentid, | |||||
status:responseData.paymentdetail.result.paymentstatuscode, | |||||
payload:responseData | |||||
}, | |||||
onSuccess:function(){ | |||||
localStorage.removeItem("paymentId"); | |||||
} | |||||
}); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -1,5 +1,6 @@ | |||||
import * as React from "react"; | import * as React from "react"; | ||||
import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
import * as UrlUtils from "utils/ApiPathConst"; | |||||
import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
const MultiPaymentWindow = Loadable(React.lazy(() => import('./MultiPaymentWindow'))); | const MultiPaymentWindow = Loadable(React.lazy(() => import('./MultiPaymentWindow'))); | ||||
// const FPS = Loadable(React.lazy(() => import('./FPS'))); | // const FPS = Loadable(React.lazy(() => import('./FPS'))); | ||||
@@ -78,22 +79,51 @@ const Index = () => { | |||||
setOpen(false); | setOpen(false); | ||||
// let transactionid = ""; | // let transactionid = ""; | ||||
// let webtoken = ""; | // let webtoken = ""; | ||||
let page = ""; | |||||
let stateParams = {}; | |||||
let paymentMethod = ""; | |||||
if(selectedPaymentMethod === "FPS"){ | if(selectedPaymentMethod === "FPS"){ | ||||
navigate('/paymentPage/fps', {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken} }); | |||||
// navigate('/payment/fps', {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken} }); | |||||
page='/paymentPage/fps'; | |||||
stateParams= {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken} } | |||||
paymentMethod = "04,BCFP,FPS"; | |||||
}else if(selectedPaymentMethod ==="Visa"){ | }else if(selectedPaymentMethod ==="Visa"){ | ||||
navigate('/paymentPage/card', {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"Visa", paymentMethod:"02,BCMP,CreditCard"} }); | |||||
page='/paymentPage/card'; | |||||
stateParams= {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"Visa", paymentMethod:"02,BCMP,CreditCard"} } | |||||
paymentMethod = "02,BCMP,CreditCard"; | |||||
}else if(selectedPaymentMethod ==="Mastercard"){ | }else if(selectedPaymentMethod ==="Mastercard"){ | ||||
navigate('/paymentPage/card', {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"Mastercard", paymentMethod:"02,BCMP,CreditCard"} }); | |||||
}else if(selectedPaymentMethod ==="UnionPay" ){ | |||||
navigate('/paymentPage/card', {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"UnionPay", paymentMethod:"03,BCMP,CreditCard"} }); | |||||
page='/paymentPage/card'; | |||||
stateParams= {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"Mastercard", paymentMethod:"02,BCMP,CreditCard"} } | |||||
paymentMethod = "02,BCMP,CreditCard"; | |||||
}else if(selectedPaymentMethod ==="JCB"){ | }else if(selectedPaymentMethod ==="JCB"){ | ||||
navigate('/paymentPage/card', {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"JCB", paymentMethod:"02,BCMP,CreditCard"} }); | |||||
page='/paymentPage/card'; | |||||
stateParams= {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"JCB", paymentMethod:"02,BCMP,CreditCard"} } | |||||
paymentMethod = "02,BCMP,CreditCard"; | |||||
}else if(selectedPaymentMethod ==="UnionPay" ){ | |||||
page='/paymentPage/card'; | |||||
stateParams= {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"UnionPay", paymentMethod:"03,BCMP,CreditCard"} } | |||||
paymentMethod = "03,BCMP,CreditCard"; | |||||
}else if(selectedPaymentMethod ==="PPS"){ | }else if(selectedPaymentMethod ==="PPS"){ | ||||
navigate('/paymentPage/card', {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"PPS", paymentMethod:"01,PPSB,PPS"} }); | |||||
page='/paymentPage/card'; | |||||
stateParams= {state:{amount:totalAmount,transactionid:transactionData.transactionid,webtoken:transactionData.webtoken, type:"PPS", paymentMethod:"01,PPSB,PPS"} } | |||||
paymentMethod = "01,PPSB,PPS"; | |||||
} | |||||
if(paymentMethod != ""){ | |||||
HttpUtils.post({ | |||||
url:UrlUtils.PAYMENT_CREATE, | |||||
params:{ | |||||
transNo:transactionData.transicationId, | |||||
payMethod:paymentMethod, | |||||
payAmount:totalAmount, | |||||
appIdList:location.state?.appIdList??[] | |||||
}, | |||||
onSuccess:function(responData){ | |||||
localStorage.removeItem("paymentId"); | |||||
localStorage.setItem("paymentId", responData.id) | |||||
navigate(page, stateParams); | |||||
} | |||||
}); | |||||
} | } | ||||
} | } | ||||
}, [confirmPayment]); | }, [confirmPayment]); | ||||
@@ -5,6 +5,7 @@ import { | |||||
Box | Box | ||||
} from '@mui/material'; | } from '@mui/material'; | ||||
import * as DateUtils from "utils/DateUtils"; | import * as DateUtils from "utils/DateUtils"; | ||||
import * as ProofStatus from "utils/statusUtils/ProofStatus"; | |||||
import { useNavigate } from "react-router-dom"; | import { useNavigate } from "react-router-dom"; | ||||
import { FiDataGrid } from "components/FiDataGrid"; | import { FiDataGrid } from "components/FiDataGrid"; | ||||
// ==============================|| EVENT TABLE ||============================== // | // ==============================|| EVENT TABLE ||============================== // | ||||
@@ -21,7 +22,6 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
navigate('/proof/reply/' + params.row.id); | navigate('/proof/reply/' + params.row.id); | ||||
}; | }; | ||||
const columns = [ | const columns = [ | ||||
{ | { | ||||
field: 'actions', | field: 'actions', | ||||
@@ -48,6 +48,14 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
return <div style={{ margin: 4 }}>App No: {appNo}<br />Gazette Code: {code}<br />Issue: {isssue}</div> | return <div style={{ margin: 4 }}>App No: {appNo}<br />Gazette Code: {code}<br />Issue: {isssue}</div> | ||||
}, | }, | ||||
}, | }, | ||||
{ | |||||
id: 'actions', | |||||
headerName: 'Status', | |||||
flex: 1, | |||||
renderCell: (params) => { | |||||
return ProofStatus.getStatus_Eng(params); | |||||
}, | |||||
}, | |||||
{ | { | ||||
id: 'created', | id: 'created', | ||||
field: 'created', | field: 'created', | ||||
@@ -121,13 +121,15 @@ export default function SubmittedTab({ rows }) { | |||||
function doPayment() { | function doPayment() { | ||||
setIsPopUp(false); | setIsPopUp(false); | ||||
let totalAmount = 0; | let totalAmount = 0; | ||||
let appIdList =[]; | |||||
const datas = rows?.filter((row) => | const datas = rows?.filter((row) => | ||||
selectedRowItems.includes(row.id) | selectedRowItems.includes(row.id) | ||||
); | ); | ||||
for (var i = 0; i < datas?.length; i++) { | for (var i = 0; i < datas?.length; i++) { | ||||
totalAmount += datas[i].fee; | totalAmount += datas[i].fee; | ||||
appIdList.push(datas[i].id); | |||||
} | } | ||||
navigate('/paymentPage', { state: { amount: totalAmount } }); | |||||
navigate('/paymentPage', { state: { amount: totalAmount, appIdList: appIdList} }); | |||||
} | } | ||||
return ( | return ( | ||||
@@ -81,5 +81,11 @@ export const PROOF_CHECK_PRICE = apiPath+'/proof/check-price';//GET | |||||
export const GET_PROOF_PAY = apiPath+'/proof/pay-details';//GET | export const GET_PROOF_PAY = apiPath+'/proof/pay-details';//GET | ||||
export const PAYMENT_CREATE = apiPath+'/payment/create';//POST | |||||
export const PAYMENT_SAVE = apiPath+'/payment/save';//POST | |||||
//User Group | //User Group | ||||
export const POST_AND_UPDATE_USER_GROUP = apiPath+'/group/save'; | export const POST_AND_UPDATE_USER_GROUP = apiPath+'/group/save'; |
@@ -29,7 +29,7 @@ function getStatus(params) { | |||||
const isOverTime = (returnBeforeDate) => { | const isOverTime = (returnBeforeDate) => { | ||||
if (!returnBeforeDate) return true; | if (!returnBeforeDate) return true; | ||||
returnBeforeDate = returnBeforeDate.setHours(14, 0, 0, 0); | |||||
returnBeforeDate = new Date(returnBeforeDate).setHours(14, 0, 0, 0); | |||||
let current = new Date(); | let current = new Date(); | ||||
return current.getTime() > returnBeforeDate; | return current.getTime() > returnBeforeDate; | ||||
} | } | ||||