diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx
index ff6ad45..73b7fee 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx
@@ -109,6 +109,7 @@ import {
GlobalUnpaidListData,
PaymentGatewayGetdetail,
PostBookingData,
+ PostCancelPayment,
PostPaymentdevice,
PreferenceData,
PutBookingData,
@@ -1214,6 +1215,15 @@ const StandardTablePayment = () => {
}
};
+ // PostCancelPayment
+ const CancelPayment = async () => {
+ const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap()
+ if (response?.data?.statusCode) {
+ ClearAllGlobalStateDatas();
+ CustomerDisplay();
+ setBusinessUPI(false);
+ }
+ }
const Otherserviceprint = async () => {
if (OtherServicesPrintDetails?.length > 0) {
const style = await PrintStyleFunction('OtherServices1');
@@ -4191,6 +4201,7 @@ const StandardTablePayment = () => {
handleCancel={() => setShowCancelConfirm(true)}
footer={false}
width={600}
+ destroyOnClose={true}
className={'ModalPaymentGatewayEmbedded'}
children={
<>
@@ -4209,22 +4220,35 @@ const StandardTablePayment = () => {
}
/>
{showCancelConfirm && (
- {
- paymentGatewayRef.current?.clearPolling();
- setBusinessUPI(false);
- setShowCancelConfirm(false);
- ClearAllGlobalStateDatas();
- CustomerDisplay();
- }}
- onCancel={() => setShowCancelConfirm(false)}
- okText="Yes"
- cancelText="No"
- >
- Do you want to cancel the payment?
-
+ // {
+ // paymentGatewayRef.current?.clearPolling();
+ // setBusinessUPI(false);
+ // setShowCancelConfirm(false);
+ // ClearAllGlobalStateDatas();
+ // CustomerDisplay();
+ // }}
+ // 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?
+
)}
{customerPreviesOrders && (