|
|
@@ -39,6 +39,7 @@ const Index = () => { |
|
|
|
const [transactionDate, setTransactionDate] = React.useState(""); |
|
|
|
const [transactionTime, setTransactionTime] = React.useState(""); |
|
|
|
const [onReady, setOnReady] = React.useState(false); |
|
|
|
const updatePaymentApi = "/api/payment/updatepayment"; |
|
|
|
const paymentStatusApi = "/api/payment/status/"; |
|
|
|
|
|
|
|
|
|
|
@@ -70,17 +71,52 @@ const Index = () => { |
|
|
|
setTransactionTime(trnTime) |
|
|
|
const params = new URLSearchParams(window.location.pathname); |
|
|
|
let transactionid = params.get("TRANSACTION_ID") |
|
|
|
let receipt_token = params.get("RECEIPT_TOKEN").replace("%3D", "=") |
|
|
|
|
|
|
|
HttpUtils.post({ |
|
|
|
url: paymentPath + paymentStatusApi + transactionid, |
|
|
|
url: paymentPath + updatePaymentApi, |
|
|
|
params: { |
|
|
|
"apprefid": transactionid, |
|
|
|
"webtoken": params.webtoken, |
|
|
|
"transactionid": transactionid, |
|
|
|
"receipttoken": receipt_token, |
|
|
|
}, |
|
|
|
onSuccess: function (responseData) { |
|
|
|
setResponeDataData(responseData) |
|
|
|
onSuccess: function () { |
|
|
|
// { |
|
|
|
// "transactionid": "<transactionid>", |
|
|
|
// "currencycode":"<currencycode>", |
|
|
|
// "amount":<amount>, |
|
|
|
// "paymentdetail":{ |
|
|
|
// "paymentid": "<paymentid>", |
|
|
|
// "paymentmethod": "<paymentmethod>", |
|
|
|
// "time": "<time>", |
|
|
|
// "brandname": "<brandname>", |
|
|
|
// "channel": "<channeltype>", |
|
|
|
// "subtype": "<subtype>", |
|
|
|
// "attemptno": "<attemptno>", |
|
|
|
// "result": { |
|
|
|
// "code": "<code>", |
|
|
|
// "paymentstatuscode": |
|
|
|
// "<paymentstatuscode>" |
|
|
|
// "description": "<description>", |
|
|
|
// "rejectreasoncode": |
|
|
|
// "<rejectreasoncode>", |
|
|
|
// "canretry": "<retry>" |
|
|
|
// } |
|
|
|
// } |
|
|
|
//} |
|
|
|
HttpUtils.post({ |
|
|
|
url: paymentPath + paymentStatusApi + transactionid, |
|
|
|
params: { |
|
|
|
"apprefid": transactionid, |
|
|
|
"webtoken": params.webtoken, |
|
|
|
}, |
|
|
|
onSuccess: function (responseData) { |
|
|
|
setResponeDataData(responseData) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|