Browse Source

update fps web to app for testing

CR003
Alex Cheung 9 months ago
parent
commit
d748c23f51
2 changed files with 16 additions and 10 deletions
  1. +9
    -3
      src/pages/Payment/FPS/FPS.js
  2. +7
    -7
      src/pages/Payment/FPS/fpscallback.js

+ 9
- 3
src/pages/Payment/FPS/FPS.js View File

@@ -186,11 +186,17 @@ const Index = () => {
console.log(fpsqrcodeurlwithFps) console.log(fpsqrcodeurlwithFps)
const openPASGUrl = pasgPath + '?pay_req_obj=' + encodeURIComponent(fpsqrcodeurlwithFps) + '&callback=' 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=' 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=' 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) setFpsqrcodeurl(openPASGUrl)
setFpsqrcodeurlPrd(openPASGUrlPrd) setFpsqrcodeurlPrd(openPASGUrlPrd)
setFpsqrcodeurlFps(openPASGUrlPrdFps) setFpsqrcodeurlFps(openPASGUrlPrdFps)


+ 7
- 7
src/pages/Payment/FPS/fpscallback.js View File

@@ -76,22 +76,22 @@ const Fpscallback = () => {


const loadForm = () => { const loadForm = () => {
const params = new URLSearchParams(window.location.search); 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") let paymentId = params.get("PAYMENT_ID")
paymentId = paymentId.split('?is_successful')[0]; paymentId = paymentId.split('?is_successful')[0];


console.log(transactionid)
console.log(webtoken)
// console.log(transactionid)
// console.log(webtoken)
console.log(paymentId) console.log(paymentId)


HttpUtils.post({ HttpUtils.post({
url: UrlUtils.PAYMENT_CALLBACK_STATUS_API, url: UrlUtils.PAYMENT_CALLBACK_STATUS_API,
params:{ params:{
"apprefid": transactionid,
"webtoken": webtoken,
// "apprefid": transactionid,
// "webtoken": webtoken,
"paymentId": paymentId, "paymentId": paymentId,
"transactionid":Number(transactionid)
// "transactionid":Number(transactionid)
}, },
onSuccess: function(responseData){ onSuccess: function(responseData){
setResponeDataData(responseData) setResponeDataData(responseData)


Loading…
Cancel
Save