Added Payment QR Code model Close Funtionalies
This commit is contained in:
parent
fea68be6fe
commit
719a84c01c
|
|
@ -61,6 +61,7 @@ import {
|
||||||
import {
|
import {
|
||||||
getConfigType,
|
getConfigType,
|
||||||
getPreferenceData,
|
getPreferenceData,
|
||||||
|
PostCancelPayment,
|
||||||
PreferenceData,
|
PreferenceData,
|
||||||
PutPendingPaymentList,
|
PutPendingPaymentList,
|
||||||
} from '../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
|
|
@ -1092,6 +1093,15 @@ const KioskPayment = (props) => {
|
||||||
}, 2000);
|
}, 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 handleDevice = async (paymentDetails, option) => {
|
||||||
const paymentDeviceDetails = await dispatch(
|
const paymentDeviceDetails = await dispatch(
|
||||||
|
|
@ -2342,6 +2352,7 @@ const KioskPayment = (props) => {
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
footer={false}
|
footer={false}
|
||||||
width={500}
|
width={500}
|
||||||
|
destroyOnClose={true}
|
||||||
children={
|
children={
|
||||||
<>
|
<>
|
||||||
<PaymentGatewayEmbedded
|
<PaymentGatewayEmbedded
|
||||||
|
|
@ -2359,21 +2370,34 @@ const KioskPayment = (props) => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{showCancelConfirm && (
|
{showCancelConfirm && (
|
||||||
<Modal
|
// <Modal
|
||||||
open={showCancelConfirm}
|
// open={showCancelConfirm}
|
||||||
title="Cancel Payment"
|
// title="Cancel Payment"
|
||||||
onOk={() => {
|
// onOk={() => {
|
||||||
paymentGatewayRef.current?.clearPolling();
|
// paymentGatewayRef.current?.clearPolling();
|
||||||
setBusinessUPI(false);
|
// setBusinessUPI(false);
|
||||||
setShowCancelConfirm(false);
|
// setShowCancelConfirm(false);
|
||||||
ClearAllGlobalStateDatas();
|
// ClearAllGlobalStateDatas();
|
||||||
}}
|
// }}
|
||||||
onCancel={() => setShowCancelConfirm(false)}
|
// onCancel={() => setShowCancelConfirm(false)}
|
||||||
okText="Yes"
|
// okText="Yes"
|
||||||
cancelText="No"
|
// cancelText="No"
|
||||||
>
|
// >
|
||||||
Do you want to cancel the payment?
|
// Do you want to cancel the payment?
|
||||||
</Modal>
|
// </Modal>
|
||||||
|
<Modal
|
||||||
|
open={showCancelConfirm}
|
||||||
|
title="Cancel Payment"
|
||||||
|
onOk={() => {
|
||||||
|
setShowCancelConfirm(false);
|
||||||
|
CancelPayment()
|
||||||
|
}}
|
||||||
|
onCancel={() => setShowCancelConfirm(false)}
|
||||||
|
okText="Yes"
|
||||||
|
cancelText="No"
|
||||||
|
>
|
||||||
|
Do you want to cancel the payment?
|
||||||
|
</Modal>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue