From d748c23f516fa51f78d28fd18daf4a5c971d9a6d Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Fri, 22 Nov 2024 15:40:49 +0800 Subject: [PATCH] update fps web to app for testing --- src/pages/Payment/FPS/FPS.js | 12 +++++++++--- src/pages/Payment/FPS/fpscallback.js | 14 +++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/pages/Payment/FPS/FPS.js b/src/pages/Payment/FPS/FPS.js index 7f87c2b..1285ee9 100644 --- a/src/pages/Payment/FPS/FPS.js +++ b/src/pages/Payment/FPS/FPS.js @@ -186,11 +186,17 @@ const Index = () => { console.log(fpsqrcodeurlwithFps) const openPASGUrl = pasgPath + '?pay_req_obj=' + encodeURIComponent(fpsqrcodeurlwithFps) + '&callback=' - + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+transactionid+"&WEB_TOKEN="+webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); + + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?&PAYMENT_ID='+localStorage.getItem("paymentId")); const openPASGUrlPrd = pasgPathPrd + '?pay_req_obj=' + encodeURIComponent(fpsqrcodeurlwithFps) + '&callback=' - + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+transactionid+"&WEB_TOKEN="+webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); + + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?&PAYMENT_ID='+localStorage.getItem("paymentId")); const openPASGUrlPrdFps = pasgPath + '?pay_req_obj=' + encodeURIComponent(fpsqrcodeurlwithFps) + '&callback=' - + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+transactionid+"&WEB_TOKEN="+webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); + + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?&PAYMENT_ID='+localStorage.getItem("paymentId")); + // const openPASGUrl = pasgPath + '?pay_req_obj=' + encodeURIComponent(fpsqrcodeurlwithFps) + '&callback=' + // + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+transactionid+"&WEB_TOKEN="+webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); + // const openPASGUrlPrd = pasgPathPrd + '?pay_req_obj=' + encodeURIComponent(fpsqrcodeurlwithFps) + '&callback=' + // + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+transactionid+"&WEB_TOKEN="+webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); + // const openPASGUrlPrdFps = pasgPath + '?pay_req_obj=' + encodeURIComponent(fpsqrcodeurlwithFps) + '&callback=' + // + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+transactionid+"&WEB_TOKEN="+webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); setFpsqrcodeurl(openPASGUrl) setFpsqrcodeurlPrd(openPASGUrlPrd) setFpsqrcodeurlFps(openPASGUrlPrdFps) diff --git a/src/pages/Payment/FPS/fpscallback.js b/src/pages/Payment/FPS/fpscallback.js index 1880cc8..1cd98b3 100644 --- a/src/pages/Payment/FPS/fpscallback.js +++ b/src/pages/Payment/FPS/fpscallback.js @@ -76,22 +76,22 @@ const Fpscallback = () => { const loadForm = () => { const params = new URLSearchParams(window.location.search); - let transactionid = params.get("TRANSACTION_ID") - let webtoken = params.get("WEB_TOKEN") + // let transactionid = params.get("TRANSACTION_ID") + // let webtoken = params.get("WEB_TOKEN") let paymentId = params.get("PAYMENT_ID") paymentId = paymentId.split('?is_successful')[0]; - console.log(transactionid) - console.log(webtoken) + // console.log(transactionid) + // console.log(webtoken) console.log(paymentId) HttpUtils.post({ url: UrlUtils.PAYMENT_CALLBACK_STATUS_API, params:{ - "apprefid": transactionid, - "webtoken": webtoken, + // "apprefid": transactionid, + // "webtoken": webtoken, "paymentId": paymentId, - "transactionid":Number(transactionid) + // "transactionid":Number(transactionid) }, onSuccess: function(responseData){ setResponeDataData(responseData)