Przeglądaj źródła

fix payment bug

master
Anna Ho 1 rok temu
rodzic
commit
f37ed24a7f
4 zmienionych plików z 18 dodań i 170 usunięć
  1. +8
    -1
      src/pages/Payment/Details_GLD/PaymentDetails.js
  2. +8
    -1
      src/pages/Payment/Details_Public/PaymentDetails.js
  3. +1
    -84
      src/pages/Payment/FPS/AckPage.js
  4. +1
    -84
      src/pages/Payment/PaymentCallback.js

+ 8
- 1
src/pages/Payment/Details_GLD/PaymentDetails.js Wyświetl plik

@@ -29,6 +29,13 @@ const PaymentDetails = ({ formData, }) => {
}
}, [data]);

const getPaymentMethod=()=>{
let paymentmethod = data.payload.paymentdetail.paymentmethod;
if("01" == paymentmethod) return "PPS";
if("02" == paymentmethod || "03" == paymentmethod) return "Credit Card";
if("04" == paymentmethod) return "FPS";
return paymentmethod;
}

return (
!onReady ?
@@ -136,7 +143,7 @@ const PaymentDetails = ({ formData, }) => {
</Grid>
<Grid item xs={9} md={9} sx={{ textAlign: "left" }}>
<FormLabel sx={{ color: "#000000" }}>
{data.payload?.paymentdetail?.subtype ?? (data.payload.paymentdetail.paymentmethod === "01" ? "PPS" : "")}
{getPaymentMethod()}
</FormLabel>
</Grid>
</Grid>


+ 8
- 1
src/pages/Payment/Details_Public/PaymentDetails.js Wyświetl plik

@@ -29,6 +29,13 @@ const PaymentDetails = ({ formData, }) => {
}
}, [data]);

const getPaymentMethod=()=>{
let paymentmethod = data.payload.paymentdetail.paymentmethod;
if("01" == paymentmethod) return "PPS";
if("02" == paymentmethod || "03" == paymentmethod) return "Credit Card";
if("04" == paymentmethod) return "FPS";
return paymentmethod;
}

return (
!onReady ?
@@ -136,7 +143,7 @@ const PaymentDetails = ({ formData, }) => {
</Grid>
<Grid item xs={9} md={9} sx={{ textAlign: "left" }}>
<FormLabel sx={{ fontSize: "16px", color: "#000000" }}>
{data.payload?.paymentdetail?.subtype ?? (data.payload.paymentdetail.paymentmethod === "01" ? "PPS" : "")}
{getPaymentMethod()}
</FormLabel>
</Grid>
</Grid>


+ 1
- 84
src/pages/Payment/FPS/AckPage.js Wyświetl plik

@@ -184,90 +184,7 @@ const AckPage = () => {
</Grid>
</Grid>
</Grid>
{/* <Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
交易參考號:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{"P" + transactionData.transactionid}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
交易日期:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionDate + " (DD/MM/YYYY)"}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
交易時間:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionTime + " (HH:MI:SS)"}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
EGIS 參考號:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionData.transactionid}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
支付金額
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{"HK$ " + transactionData.amount}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
付款方式:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionData.paymentdetail.subtype ?? (transactionData.paymentdetail.paymentmethod === "01" ? "PPS" : "")}
</FormLabel>
</Grid>
</Grid>
</Grid> */}
</Grid>
</Grid>
</center>


+ 1
- 84
src/pages/Payment/PaymentCallback.js Wyświetl plik

@@ -189,90 +189,7 @@ const Index = () => {
</Grid>
</Grid>
</Grid>
{/* <Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
交易參考號:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{"P" + transactionData.transactionid}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
交易日期:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionDate + " (DD/MM/YYYY)"}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
交易時間:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionTime + " (HH:MI:SS)"}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
EGIS 參考號:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionData.transactionid}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
支付金額
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{"HK$ " + transactionData.amount}
</FormLabel>
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={12}>
<Grid container >
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
付款方式:
</FormLabel>
</Grid>
<Grid item>
<FormLabel sx={{ fontSize: "16px", color: "#000000", textAlign: "center" }}>
{transactionData.paymentdetail.subtype ?? (transactionData.paymentdetail.paymentmethod === "01" ? "PPS" : "")}
</FormLabel>
</Grid>
</Grid>
</Grid> */}
</Grid>
</Grid>
</center>


Ładowanie…
Anuluj
Zapisz