|
@@ -85,37 +85,44 @@ const AckPage = () => { |
|
|
let webtoken = localStorage.getItem("webtoken") |
|
|
let webtoken = localStorage.getItem("webtoken") |
|
|
|
|
|
|
|
|
HttpUtils.post({ |
|
|
HttpUtils.post({ |
|
|
url: UrlUtils.PAYMENT_STATUS_API+transactionid, |
|
|
|
|
|
|
|
|
url: UrlUtils.PAYMENT_CALLBACK_STATUS_API+transactionid, |
|
|
params:{ |
|
|
params:{ |
|
|
"apprefid": transactionid, |
|
|
"apprefid": transactionid, |
|
|
"webtoken": webtoken, |
|
|
"webtoken": webtoken, |
|
|
|
|
|
"paymentId": localStorage.getItem("paymentId") |
|
|
}, |
|
|
}, |
|
|
onSuccess: function(responseData){ |
|
|
onSuccess: function(responseData){ |
|
|
setResponeDataData(responseData) |
|
|
|
|
|
|
|
|
|
|
|
if (responseData.paymentdetail?.result?.paymentstatuscode === "APPR") { |
|
|
|
|
|
localStorage.removeItem("webtoken"); |
|
|
|
|
|
localStorage.removeItem("transactionid"); |
|
|
|
|
|
} |
|
|
|
|
|
HttpUtils.post({ |
|
|
|
|
|
url: UrlUtils.PAYMENT_SAVE, |
|
|
|
|
|
params: { |
|
|
|
|
|
id: localStorage.getItem("paymentId"), |
|
|
|
|
|
transNo: responseData.transactionid, |
|
|
|
|
|
transDateTime: new Date(responseData.paymentdetail.time).toISOString(), |
|
|
|
|
|
egisRefNo: responseData.paymentdetail.paymentid, |
|
|
|
|
|
status: responseData.paymentdetail.result.paymentstatuscode, |
|
|
|
|
|
payload: responseData |
|
|
|
|
|
}, |
|
|
|
|
|
onSuccess: function (responseData2) { |
|
|
|
|
|
responseData2.data["transDateStr"] = DateUtils.dateFormat(responseData2.data.transDateTime, "DD/MM/YYYY"); |
|
|
|
|
|
responseData2.data["transTimeStr"] = DateUtils.dateFormat(responseData2.data.transDateTime, "HH:mm:ss"); |
|
|
|
|
|
setItemList(responseData2.paymentItemList) |
|
|
|
|
|
setPaymentData(responseData2.data); |
|
|
|
|
|
// localStorage.removeItem("paymentId"); |
|
|
|
|
|
// setPaymentId(responseData2.id) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
localStorage.removeItem("webtoken"); |
|
|
|
|
|
localStorage.removeItem("transactionid"); |
|
|
|
|
|
setResponeDataData(responseData.transactionData) |
|
|
|
|
|
responseData.paymentItemList.data["transDateStr"] = DateUtils.dateFormat(responseData.data.transDateTime, "DD/MM/YYYY"); |
|
|
|
|
|
responseData.paymentItemList.data["transTimeStr"] = DateUtils.dateFormat(responseData.data.transDateTime, "HH:mm:ss"); |
|
|
|
|
|
setItemList(responseData.paymentItemList) |
|
|
|
|
|
setPaymentData(responseData.data); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (responseData.paymentdetail?.result?.paymentstatuscode === "APPR") { |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
// HttpUtils.post({ |
|
|
|
|
|
// url: UrlUtils.PAYMENT_SAVE, |
|
|
|
|
|
// params: { |
|
|
|
|
|
// id: localStorage.getItem("paymentId"), |
|
|
|
|
|
// transNo: responseData.transactionid, |
|
|
|
|
|
// transDateTime: new Date(responseData.paymentdetail.time).toISOString(), |
|
|
|
|
|
// egisRefNo: responseData.paymentdetail.paymentid, |
|
|
|
|
|
// status: responseData.paymentdetail.result.paymentstatuscode, |
|
|
|
|
|
// payload: responseData |
|
|
|
|
|
// }, |
|
|
|
|
|
// onSuccess: function (responseData2) { |
|
|
|
|
|
// responseData2.data["transDateStr"] = DateUtils.dateFormat(responseData2.data.transDateTime, "DD/MM/YYYY"); |
|
|
|
|
|
// responseData2.data["transTimeStr"] = DateUtils.dateFormat(responseData2.data.transDateTime, "HH:mm:ss"); |
|
|
|
|
|
// setItemList(responseData2.paymentItemList) |
|
|
|
|
|
// setPaymentData(responseData2.data); |
|
|
|
|
|
// // localStorage.removeItem("paymentId"); |
|
|
|
|
|
// // setPaymentId(responseData2.id) |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|