| @@ -109,36 +109,43 @@ const Index = () => { | |||||
| // ) | // ) | ||||
| HttpUtils.post({ | HttpUtils.post({ | ||||
| url: UrlUtils.PAYMENT_STATUS_API+transactionid, | |||||
| url: UrlUtils.PAYMENT_CALLBACK_STATUS_API+transactionid, | |||||
| params: { | params: { | ||||
| "apprefid": transactionid, | "apprefid": transactionid, | ||||
| "webtoken": localStorage.getItem("webtoken"), | "webtoken": localStorage.getItem("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) | |||||
| // } | |||||
| // }); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||