diff --git a/src/pages/Payment/FPS/AckPage.js b/src/pages/Payment/FPS/AckPage.js index a9b01a7..dbc7bc7 100644 --- a/src/pages/Payment/FPS/AckPage.js +++ b/src/pages/Payment/FPS/AckPage.js @@ -13,7 +13,7 @@ import * as UrlUtils from "utils/ApiPathConst"; // import { useNavigate } from "react-router-dom"; // import FpsIcon from "assets/images/icons/fps.svg"; // import { useLocation } from 'react-router-dom'; -import {paymentPath} from "auth/utils"; +// import {paymentPath} from "auth/utils"; // import {poll} from "utils/Utils"; import * as DateUtils from "utils/DateUtils" @@ -50,7 +50,7 @@ const AckPage = () => { // const [transactionDate, setTransactionDate] = React.useState(""); // const [transactionTime, setTransactionTime] = React.useState(""); const [onReady, setOnReady] = React.useState(false); - const paymentStatusApi = "/api/payment/status/"; + // const paymentStatusApi = "/api/payment/status/"; const [onDownload, setOnDownload] = React.useState(false); const intl = useIntl(); const { locale } = intl; @@ -85,7 +85,7 @@ const AckPage = () => { let webtoken = localStorage.getItem("webtoken") HttpUtils.post({ - url: paymentPath+paymentStatusApi+transactionid, + url: UrlUtils.PAYMENT_STATUS_API+transactionid, params:{ "apprefid": transactionid, "webtoken": webtoken, diff --git a/src/pages/Payment/FPS/FPS.js b/src/pages/Payment/FPS/FPS.js index d7864d8..a122d27 100644 --- a/src/pages/Payment/FPS/FPS.js +++ b/src/pages/Payment/FPS/FPS.js @@ -7,6 +7,7 @@ import { } from '@mui/material'; import * as React from "react"; import * as HttpUtils from "utils/HttpUtils"; +import * as UrlUtils from "utils/ApiPathConst"; import { useNavigate } from "react-router-dom"; import FpsIcon from "assets/images/icons/fps.svg"; import { useLocation } from 'react-router-dom'; @@ -55,7 +56,7 @@ const Index = () => { const pasgPath = 'https://sim.fps.payapps.hkicl.com.hk'; //Testing const loadPaymentUrl = "/api/payment/wallet/fps"; const cancelPaymentUrl = "/api/payment/cancelpayment"; - const paymentStatusApi = "/api/payment/status/"; + // const paymentStatusApi = "/api/payment/status/"; // const payloadUrl = "/api/payment/wallet/fps/enquiryfpspayload/"; // const receiverUrl = "/noti-api/payment/payment-notification"; @@ -198,7 +199,7 @@ const Index = () => { const getPaymentStatus = () => { if(Object.keys(paymentData).length > 0){ HttpUtils.post({ - url: paymentPath+paymentStatusApi+paymentData.transactionid, + url: UrlUtils.PAYMENT_STATUS_API+paymentData.transactionid, params:{ "apprefid": paymentData.transactionid, "webtoken": paymentData.webtoken, diff --git a/src/pages/Payment/PaymentCallback.js b/src/pages/Payment/PaymentCallback.js index 0beac0b..20506d0 100644 --- a/src/pages/Payment/PaymentCallback.js +++ b/src/pages/Payment/PaymentCallback.js @@ -47,7 +47,7 @@ const Index = () => { // const [transactionTime, setTransactionTime] = React.useState(""); const [onReady, setOnReady] = React.useState(false); const updatePaymentApi = "/api/payment/updatepayment"; - const paymentStatusApi = "/api/payment/status/"; + // const paymentStatusApi = "/api/payment/status/"; const intl = useIntl(); const { locale } = intl; @@ -109,7 +109,7 @@ const Index = () => { // ) HttpUtils.post({ - url: paymentPath + paymentStatusApi + transactionid, + url: UrlUtils.PAYMENT_STATUS_API+transactionid, params: { "apprefid": transactionid, "webtoken": localStorage.getItem("webtoken"), diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js index 156f04f..5e20ca3 100644 --- a/src/utils/ApiPathConst.js +++ b/src/utils/ApiPathConst.js @@ -158,6 +158,9 @@ export const PAYMENT_TRANSACTION_ID = apiPath+'/payment/api/transaction';//GET // export const PAYMENT_STATUS_API = paymentPath+'/api/payment/status/';//POST export const PAYMENT_STATUS_API = apiPath+'/payment/api/status/';//POST +export const LOAD_PAYMENT_URL = apiPath+ "/api/payment/wallet/fps";//POST +export const CANCEL_PAYMENT_URL = apiPath+ "/api/payment/cancelpayment";//POST + export const DEMAND_NOTE_PREVIEW = apiPath+'/demandNote/preview';//GET export const DEMAND_NOTE_CREATE = apiPath+'/demandNote/create';//POST export const DEMAND_NOTE_LIST = apiPath+'/demandNote/list';//GET pub