From 719a84c01c3196bc910ccd158e802c02fd2f8755 Mon Sep 17 00:00:00 2001 From: Srinath Date: Thu, 26 Mar 2026 11:38:21 +0530 Subject: [PATCH] Added Payment QR Code model Close Funtionalies --- .../Kiosk/Payment/KioskPaymentWithModal.jsx | 54 +++++++++++++------ 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx index 3b6747c..7a40db2 100644 --- a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx +++ b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx @@ -61,6 +61,7 @@ import { import { getConfigType, getPreferenceData, + PostCancelPayment, PreferenceData, PutPendingPaymentList, } from '../../../Features/BookingScreen/BookingData/BookingData'; @@ -1092,6 +1093,15 @@ const KioskPayment = (props) => { }, 2000); } }; + // PostCancelPayment + const CancelPayment = async () => { + const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap() + if (response?.data?.statusCode) { + ClearAllGlobalStateDatas(); + CustomerDisplay(); + setBusinessUPI(false); + } + } const handleDevice = async (paymentDetails, option) => { const paymentDeviceDetails = await dispatch( @@ -2342,6 +2352,7 @@ const KioskPayment = (props) => { handleCancel={() => setShowCancelConfirm(true)} footer={false} width={500} + destroyOnClose={true} children={ <> { } /> {showCancelConfirm && ( - { - paymentGatewayRef.current?.clearPolling(); - setBusinessUPI(false); - setShowCancelConfirm(false); - ClearAllGlobalStateDatas(); - }} - onCancel={() => setShowCancelConfirm(false)} - okText="Yes" - cancelText="No" - > - Do you want to cancel the payment? - + // { + // paymentGatewayRef.current?.clearPolling(); + // setBusinessUPI(false); + // setShowCancelConfirm(false); + // ClearAllGlobalStateDatas(); + // }} + // onCancel={() => setShowCancelConfirm(false)} + // okText="Yes" + // cancelText="No" + // > + // Do you want to cancel the payment? + // + { + setShowCancelConfirm(false); + CancelPayment() + }} + onCancel={() => setShowCancelConfirm(false)} + okText="Yes" + cancelText="No" + > + Do you want to cancel the payment? + )} );