Added Payment QR Code model Close Funtionalies
This commit is contained in:
parent
fea68be6fe
commit
719a84c01c
|
|
@ -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={
|
||||
<>
|
||||
<PaymentGatewayEmbedded
|
||||
|
|
@ -2359,21 +2370,34 @@ const KioskPayment = (props) => {
|
|||
}
|
||||
/>
|
||||
{showCancelConfirm && (
|
||||
<Modal
|
||||
open={showCancelConfirm}
|
||||
title="Cancel Payment"
|
||||
onOk={() => {
|
||||
paymentGatewayRef.current?.clearPolling();
|
||||
setBusinessUPI(false);
|
||||
setShowCancelConfirm(false);
|
||||
ClearAllGlobalStateDatas();
|
||||
}}
|
||||
onCancel={() => setShowCancelConfirm(false)}
|
||||
okText="Yes"
|
||||
cancelText="No"
|
||||
>
|
||||
Do you want to cancel the payment?
|
||||
</Modal>
|
||||
// <Modal
|
||||
// open={showCancelConfirm}
|
||||
// title="Cancel Payment"
|
||||
// onOk={() => {
|
||||
// paymentGatewayRef.current?.clearPolling();
|
||||
// setBusinessUPI(false);
|
||||
// setShowCancelConfirm(false);
|
||||
// ClearAllGlobalStateDatas();
|
||||
// }}
|
||||
// onCancel={() => setShowCancelConfirm(false)}
|
||||
// okText="Yes"
|
||||
// cancelText="No"
|
||||
// >
|
||||
// Do you want to cancel the payment?
|
||||
// </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>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue