@@ -32,7 +32,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
}, [data]); | }, [data]); | ||||
const getPaymentMethod=()=>{ | const getPaymentMethod=()=>{ | ||||
let paymentmethod = data.payload.paymentdetail.paymentmethod; | |||||
let paymentmethod = data.payload?.paymentdetail.paymentmethod; | |||||
if("01" == paymentmethod) return "PPS"; | if("01" == paymentmethod) return "PPS"; | ||||
if("02" == paymentmethod || "03" == paymentmethod) return "Credit Card"; | if("02" == paymentmethod || "03" == paymentmethod) return "Credit Card"; | ||||
if("04" == paymentmethod) return "FPS"; | if("04" == paymentmethod) return "FPS"; | ||||
@@ -94,6 +94,12 @@ const Index = () => { | |||||
responseData2.paymentItemList.data["transTimeStr"] = DateUtils.dateFormat(responseData2.data.transDateTime, "HH:mm:ss"); | responseData2.paymentItemList.data["transTimeStr"] = DateUtils.dateFormat(responseData2.data.transDateTime, "HH:mm:ss"); | ||||
setItemList(responseData2.paymentItemList) | setItemList(responseData2.paymentItemList) | ||||
setRecord(responseData2.data); | setRecord(responseData2.data); | ||||
}, | |||||
onError: function(){ | |||||
responseData.data["transDateStr"] = DateUtils.dateFormat(responseData.data.transDateTime, "DD/MM/YYYY"); | |||||
responseData.data["transTimeStr"] = DateUtils.dateFormat(responseData.data.transDateTime, "HH:mm:ss"); | |||||
setItemList(responseData.paymentItemList) | |||||
setRecord(responseData.data); | |||||
} | } | ||||
}); | }); | ||||
}else{ | }else{ | ||||
@@ -85,11 +85,12 @@ const AckPage = () => { | |||||
let webtoken = localStorage.getItem("webtoken") | let webtoken = localStorage.getItem("webtoken") | ||||
HttpUtils.post({ | HttpUtils.post({ | ||||
url: UrlUtils.PAYMENT_CALLBACK_STATUS_API+transactionid, | |||||
url: UrlUtils.PAYMENT_CALLBACK_STATUS_API, | |||||
params:{ | params:{ | ||||
"apprefid": transactionid, | "apprefid": transactionid, | ||||
"webtoken": webtoken, | "webtoken": webtoken, | ||||
"paymentId": localStorage.getItem("paymentId") | |||||
"paymentId": localStorage.getItem("paymentId"), | |||||
"transactionid":Number(transactionid) | |||||
}, | }, | ||||
onSuccess: function(responseData){ | onSuccess: function(responseData){ | ||||
localStorage.removeItem("webtoken"); | localStorage.removeItem("webtoken"); | ||||
@@ -11,7 +11,7 @@ import * as React from "react"; | |||||
import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
import * as UrlUtils from "utils/ApiPathConst"; | 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"; | |||||
import * as DateUtils from "utils/DateUtils" | import * as DateUtils from "utils/DateUtils" | ||||
import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
@@ -46,7 +46,7 @@ const Index = () => { | |||||
// const [transactionDate, setTransactionDate] = React.useState(""); | // const [transactionDate, setTransactionDate] = React.useState(""); | ||||
// const [transactionTime, setTransactionTime] = React.useState(""); | // const [transactionTime, setTransactionTime] = React.useState(""); | ||||
const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
const updatePaymentApi = "/api/payment/updatepayment"; | |||||
// const updatePaymentApi = "/api/payment/updatepayment"; | |||||
// const paymentStatusApi = "/api/payment/status/"; | // const paymentStatusApi = "/api/payment/status/"; | ||||
const intl = useIntl(); | const intl = useIntl(); | ||||
const { locale } = intl; | const { locale } = intl; | ||||
@@ -81,7 +81,7 @@ const Index = () => { | |||||
let receipt_token = params.get("RECEIPT_TOKEN").replace("%3D", "=") | let receipt_token = params.get("RECEIPT_TOKEN").replace("%3D", "=") | ||||
HttpUtils.post({ | HttpUtils.post({ | ||||
url: paymentPath + updatePaymentApi, | |||||
url: UrlUtils.UPDATE_PAYMENT_API, | |||||
params: { | params: { | ||||
"transactionid": transactionid, | "transactionid": transactionid, | ||||
"receipttoken": receipt_token, | "receipttoken": receipt_token, | ||||
@@ -109,11 +109,12 @@ const Index = () => { | |||||
// ) | // ) | ||||
HttpUtils.post({ | HttpUtils.post({ | ||||
url: UrlUtils.PAYMENT_CALLBACK_STATUS_API+transactionid, | |||||
url: UrlUtils.PAYMENT_CALLBACK_STATUS_API, | |||||
params: { | params: { | ||||
"apprefid": transactionid, | "apprefid": transactionid, | ||||
"webtoken": localStorage.getItem("webtoken"), | "webtoken": localStorage.getItem("webtoken"), | ||||
"paymentId": localStorage.getItem("paymentId") | |||||
"paymentId": localStorage.getItem("paymentId"), | |||||
"transactionid":Number(transactionid) | |||||
}, | }, | ||||
onSuccess: function (responseData) { | onSuccess: function (responseData) { | ||||
localStorage.removeItem("webtoken"); | localStorage.removeItem("webtoken"); | ||||
@@ -74,7 +74,8 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
width: isMdOrLg ? 'auto' : 160, | width: isMdOrLg ? 'auto' : 160, | ||||
flex: isMdOrLg ? 1 : undefined, | flex: isMdOrLg ? 1 : undefined, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return DateUtils.dateStr(params?.value); | |||||
// console.log(params) | |||||
return DateUtils.dateStr(params?.value?params.value:params.row.created); | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -161,8 +161,9 @@ export const LOAD_PAYMENT_FPS_URL = apiPath+ "/payment/api/wallet/fps";//POST | |||||
// export const CANCEL_PAYMENT_URL = paymentPath+ "/api/payment/cancelpayment";//POST | // export const CANCEL_PAYMENT_URL = paymentPath+ "/api/payment/cancelpayment";//POST | ||||
export const CANCEL_PAYMENT_URL = apiPath+ "/payment/api/cancelpayment";//POST | export const CANCEL_PAYMENT_URL = apiPath+ "/payment/api/cancelpayment";//POST | ||||
export const LOAD_PAYMENT_URL = apiPath+ "/payment/api/web/";//POST | export const LOAD_PAYMENT_URL = apiPath+ "/payment/api/web/";//POST | ||||
export const PAYMENT_CALLBACK_STATUS_API = apiPath+ "/payment/callback/status/";//POST | |||||
export const PAYMENT_CALLBACK_STATUS_API = apiPath+ "/payment/callback/status";//POST | |||||
export const PAYMENT_RETRY_STATUS_API = apiPath+ "/payment/paymentdetail/status";//POST | export const PAYMENT_RETRY_STATUS_API = apiPath+ "/payment/paymentdetail/status";//POST | ||||
export const UPDATE_PAYMENT_API = apiPath+ "/payment/api/updatepayment";//POST | |||||
export const DEMAND_NOTE_PREVIEW = apiPath+'/demandNote/preview';//GET | export const DEMAND_NOTE_PREVIEW = apiPath+'/demandNote/preview';//GET | ||||
export const DEMAND_NOTE_CREATE = apiPath+'/demandNote/create';//POST | export const DEMAND_NOTE_CREATE = apiPath+'/demandNote/create';//POST | ||||