Merge pull request 'srinath' (#313) from srinath into main
Reviewed-on: Pozomind/pozo-retail-app#313
This commit is contained in:
commit
286fefede5
|
|
@ -1416,6 +1416,13 @@ export const getOtherServiceTicket = createAsyncThunk(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// post /cancelPayment
|
||||||
|
export const PostCancelPayment = createAsyncThunk(
|
||||||
|
'BookingData/cancelPayment',
|
||||||
|
async (postData) => {
|
||||||
|
return await axiosRetailInstanceData.post(`/cancelPayment`, postData);
|
||||||
|
}
|
||||||
|
);
|
||||||
export const PostBlockSlots = createAsyncThunk(
|
export const PostBlockSlots = createAsyncThunk(
|
||||||
'BookingData/PostBlockSlots',
|
'BookingData/PostBlockSlots',
|
||||||
async (postData) => {
|
async (postData) => {
|
||||||
|
|
@ -1444,6 +1451,7 @@ export const getPaymentStatusForBusinessUPI = createAsyncThunk(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
export const getCurrentOrderid = createAsyncThunk(
|
export const getCurrentOrderid = createAsyncThunk(
|
||||||
'BookingData/getcurrentorderid',
|
'BookingData/getcurrentorderid',
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ import {
|
||||||
changeSearchedData,
|
changeSearchedData,
|
||||||
GlobalSelectedCustDisable,
|
GlobalSelectedCustDisable,
|
||||||
GlobalOrderStatus,
|
GlobalOrderStatus,
|
||||||
|
PostCancelPayment,
|
||||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
||||||
import {
|
import {
|
||||||
|
|
@ -1392,6 +1393,15 @@ export default function BST1Payment() {
|
||||||
: AddBookingDetails(BookingType, true);
|
: AddBookingDetails(BookingType, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// PostCancelPayment
|
||||||
|
const CancelPayment = async () => {
|
||||||
|
const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap()
|
||||||
|
if (response?.data?.statusCode) {
|
||||||
|
ClearAllGlobalStateDatas();
|
||||||
|
CustomerDisplay();
|
||||||
|
setBusinessUPI(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
const financialYearError = async () => {
|
const financialYearError = async () => {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Financial Year-Based Sales Not Yet Started');
|
setMessageData('Financial Year-Based Sales Not Yet Started');
|
||||||
|
|
@ -4728,6 +4738,7 @@ export default function BST1Payment() {
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
footer={false}
|
footer={false}
|
||||||
width={500}
|
width={500}
|
||||||
|
destroyOnClose={true}
|
||||||
children={
|
children={
|
||||||
<>
|
<>
|
||||||
<PaymentGatewayEmbedded
|
<PaymentGatewayEmbedded
|
||||||
|
|
@ -4744,14 +4755,27 @@ export default function BST1Payment() {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{showCancelConfirm && (
|
{showCancelConfirm && (
|
||||||
|
// <Modal
|
||||||
|
// open={showCancelConfirm}
|
||||||
|
// title="Cancel Payment"
|
||||||
|
// onOk={() => {
|
||||||
|
// setBusinessUPI(false);
|
||||||
|
// setShowCancelConfirm(false);
|
||||||
|
// ClearAllGlobalStateDatas();
|
||||||
|
// CustomerDisplay();
|
||||||
|
// }}
|
||||||
|
// onCancel={() => setShowCancelConfirm(false)}
|
||||||
|
// okText="Yes"
|
||||||
|
// cancelText="No"
|
||||||
|
// >
|
||||||
|
// Do you want to cancel the payment?
|
||||||
|
// </Modal>
|
||||||
<Modal
|
<Modal
|
||||||
open={showCancelConfirm}
|
open={showCancelConfirm}
|
||||||
title="Cancel Payment"
|
title="Cancel Payment"
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
setBusinessUPI(false);
|
|
||||||
setShowCancelConfirm(false);
|
setShowCancelConfirm(false);
|
||||||
ClearAllGlobalStateDatas();
|
CancelPayment()
|
||||||
CustomerDisplay();
|
|
||||||
}}
|
}}
|
||||||
onCancel={() => setShowCancelConfirm(false)}
|
onCancel={() => setShowCancelConfirm(false)}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ import {
|
||||||
changePreviousOrderOfferDetail,
|
changePreviousOrderOfferDetail,
|
||||||
GlobalAllBookingType,
|
GlobalAllBookingType,
|
||||||
changeSearchedData,
|
changeSearchedData,
|
||||||
|
PostCancelPayment,
|
||||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import { PrintStyleFunction } from '../../../../paymentpdfPage/PrintStyleFunction.js';
|
import { PrintStyleFunction } from '../../../../paymentpdfPage/PrintStyleFunction.js';
|
||||||
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
||||||
|
|
@ -1574,7 +1575,15 @@ const BSBillingTable3Pay = () => {
|
||||||
: AddBookingDetails(BookingType, true);
|
: AddBookingDetails(BookingType, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// PostCancelPayment
|
||||||
|
const CancelPayment = async () => {
|
||||||
|
const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap()
|
||||||
|
if (response?.data?.statusCode) {
|
||||||
|
ClearAllGlobalStateDatas();
|
||||||
|
CustomerDisplay();
|
||||||
|
setBusinessUPI(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
const financialYearError = async () => {
|
const financialYearError = async () => {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Financial Year-Based Sales Not Yet Started');
|
setMessageData('Financial Year-Based Sales Not Yet Started');
|
||||||
|
|
@ -4919,6 +4928,7 @@ const BSBillingTable3Pay = () => {
|
||||||
open={businessUPI}
|
open={businessUPI}
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
footer={false}
|
footer={false}
|
||||||
|
destroyOnClose={true}
|
||||||
width={500}
|
width={500}
|
||||||
children={
|
children={
|
||||||
<>
|
<>
|
||||||
|
|
@ -4936,14 +4946,27 @@ const BSBillingTable3Pay = () => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{showCancelConfirm && (
|
{showCancelConfirm && (
|
||||||
|
// <Modal
|
||||||
|
// open={showCancelConfirm}
|
||||||
|
// title="Cancel Payment"
|
||||||
|
// onOk={() => {
|
||||||
|
// setBusinessUPI(false);
|
||||||
|
// setShowCancelConfirm(false);
|
||||||
|
// ClearAllGlobalStateDatas();
|
||||||
|
// CustomerDisplay();
|
||||||
|
// }}
|
||||||
|
// onCancel={() => setShowCancelConfirm(false)}
|
||||||
|
// okText="Yes"
|
||||||
|
// cancelText="No"
|
||||||
|
// >
|
||||||
|
// Do you want to cancel the payment?
|
||||||
|
// </Modal>
|
||||||
<Modal
|
<Modal
|
||||||
open={showCancelConfirm}
|
open={showCancelConfirm}
|
||||||
title="Cancel Payment"
|
title="Cancel Payment"
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
setBusinessUPI(false);
|
|
||||||
setShowCancelConfirm(false);
|
setShowCancelConfirm(false);
|
||||||
ClearAllGlobalStateDatas();
|
CancelPayment()
|
||||||
CustomerDisplay();
|
|
||||||
}}
|
}}
|
||||||
onCancel={() => setShowCancelConfirm(false)}
|
onCancel={() => setShowCancelConfirm(false)}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ import {
|
||||||
GlobalUnpaidListData,
|
GlobalUnpaidListData,
|
||||||
PaymentGatewayGetdetail,
|
PaymentGatewayGetdetail,
|
||||||
PostBookingData,
|
PostBookingData,
|
||||||
|
PostCancelPayment,
|
||||||
PostPaymentdevice,
|
PostPaymentdevice,
|
||||||
PreferenceData,
|
PreferenceData,
|
||||||
PutBookingData,
|
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 () => {
|
const Otherserviceprint = async () => {
|
||||||
if (OtherServicesPrintDetails?.length > 0) {
|
if (OtherServicesPrintDetails?.length > 0) {
|
||||||
const style = await PrintStyleFunction('OtherServices1');
|
const style = await PrintStyleFunction('OtherServices1');
|
||||||
|
|
@ -4191,6 +4201,7 @@ const StandardTablePayment = () => {
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
footer={false}
|
footer={false}
|
||||||
width={600}
|
width={600}
|
||||||
|
destroyOnClose={true}
|
||||||
className={'ModalPaymentGatewayEmbedded'}
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
children={
|
children={
|
||||||
<>
|
<>
|
||||||
|
|
@ -4209,15 +4220,28 @@ const StandardTablePayment = () => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{showCancelConfirm && (
|
{showCancelConfirm && (
|
||||||
|
// <Modal
|
||||||
|
// open={showCancelConfirm}
|
||||||
|
// title="Cancel Payment"
|
||||||
|
// onOk={() => {
|
||||||
|
// paymentGatewayRef.current?.clearPolling();
|
||||||
|
// setBusinessUPI(false);
|
||||||
|
// setShowCancelConfirm(false);
|
||||||
|
// ClearAllGlobalStateDatas();
|
||||||
|
// CustomerDisplay();
|
||||||
|
// }}
|
||||||
|
// onCancel={() => setShowCancelConfirm(false)}
|
||||||
|
// okText="Yes"
|
||||||
|
// cancelText="No"
|
||||||
|
// >
|
||||||
|
// Do you want to cancel the payment?
|
||||||
|
// </Modal>
|
||||||
<Modal
|
<Modal
|
||||||
open={showCancelConfirm}
|
open={showCancelConfirm}
|
||||||
title="Cancel Payment"
|
title="Cancel Payment"
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
paymentGatewayRef.current?.clearPolling();
|
|
||||||
setBusinessUPI(false);
|
|
||||||
setShowCancelConfirm(false);
|
setShowCancelConfirm(false);
|
||||||
ClearAllGlobalStateDatas();
|
CancelPayment()
|
||||||
CustomerDisplay();
|
|
||||||
}}
|
}}
|
||||||
onCancel={() => setShowCancelConfirm(false)}
|
onCancel={() => setShowCancelConfirm(false)}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,7 @@ import {
|
||||||
changePreviousOrderOfferDetail,
|
changePreviousOrderOfferDetail,
|
||||||
GlobalPaymentTrigger,
|
GlobalPaymentTrigger,
|
||||||
changeSearchedData,
|
changeSearchedData,
|
||||||
|
PostCancelPayment,
|
||||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import { PrintStyleFunction } from '../../../paymentpdfPage/PrintStyleFunction.js';
|
import { PrintStyleFunction } from '../../../paymentpdfPage/PrintStyleFunction.js';
|
||||||
import {
|
import {
|
||||||
|
|
@ -1294,6 +1295,16 @@ const BSC1Payment = (props) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// PostCancelPayment
|
||||||
|
const CancelPayment = async () => {
|
||||||
|
const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap()
|
||||||
|
if (response?.data?.statusCode) {
|
||||||
|
ClearAllGlobalStateDatas();
|
||||||
|
CustomerDisplay();
|
||||||
|
setBusinessUPI(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleKeyPress = (event) => {
|
const handleKeyPress = (event) => {
|
||||||
if (event.key === 'F4' && isButtonActive() && !isF4Pressed.current) {
|
if (event.key === 'F4' && isButtonActive() && !isF4Pressed.current) {
|
||||||
|
|
@ -4993,6 +5004,7 @@ const BSC1Payment = (props) => {
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
footer={false}
|
footer={false}
|
||||||
width={500}
|
width={500}
|
||||||
|
destroyOnClose={true}
|
||||||
children={
|
children={
|
||||||
<>
|
<>
|
||||||
<PaymentGatewayEmbedded
|
<PaymentGatewayEmbedded
|
||||||
|
|
@ -5009,14 +5021,27 @@ const BSC1Payment = (props) => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{showCancelConfirm && (
|
{showCancelConfirm && (
|
||||||
|
// <Modal
|
||||||
|
// open={showCancelConfirm}
|
||||||
|
// title="Cancel Payment"
|
||||||
|
// onOk={() => {
|
||||||
|
// setBusinessUPI(false);
|
||||||
|
// setShowCancelConfirm(false);
|
||||||
|
// ClearAllGlobalStateDatas();
|
||||||
|
// CustomerDisplay();
|
||||||
|
// }}
|
||||||
|
// onCancel={() => setShowCancelConfirm(false)}
|
||||||
|
// okText="Yes"
|
||||||
|
// cancelText="No"
|
||||||
|
// >
|
||||||
|
// Do you want to cancel the payment?
|
||||||
|
// </Modal>
|
||||||
<Modal
|
<Modal
|
||||||
open={showCancelConfirm}
|
open={showCancelConfirm}
|
||||||
title="Cancel Payment"
|
title="Cancel Payment"
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
setBusinessUPI(false);
|
|
||||||
setShowCancelConfirm(false);
|
setShowCancelConfirm(false);
|
||||||
ClearAllGlobalStateDatas();
|
CancelPayment()
|
||||||
CustomerDisplay();
|
|
||||||
}}
|
}}
|
||||||
onCancel={() => setShowCancelConfirm(false)}
|
onCancel={() => setShowCancelConfirm(false)}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useEffect, useRef, useState, useImperativeHandle, forwardRef } from 'react';
|
import { useEffect, useRef, useState, useImperativeHandle, forwardRef } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { getPaymentStatusForBusinessUPI } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
import { getPaymentStatusForBusinessUPI, PostCancelPayment } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
|
|
||||||
const PaymentGatewayEmbedded = forwardRef(({
|
const PaymentGatewayEmbedded = forwardRef(({
|
||||||
orderId,
|
orderId,
|
||||||
|
|
@ -65,6 +65,7 @@ const PaymentGatewayEmbedded = forwardRef(({
|
||||||
|
|
||||||
if (data.status === 'TIMEOUT') {
|
if (data.status === 'TIMEOUT') {
|
||||||
// Stop polling and mark as timed out
|
// Stop polling and mark as timed out
|
||||||
|
dispatch(PostCancelPayment({OrderId: orderId})).unwrap()
|
||||||
setTimedOut(true);
|
setTimedOut(true);
|
||||||
setShowTimeout(true);
|
setShowTimeout(true);
|
||||||
if (intervalRef.current) {
|
if (intervalRef.current) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
import { Popconfirm, Drawer, Badge } from 'antd';
|
import { Popconfirm, Drawer, Badge, Modal } from 'antd';
|
||||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { IoIosArrowForward } from 'react-icons/io';
|
import { IoIosArrowForward } from 'react-icons/io';
|
||||||
|
|
@ -43,7 +43,7 @@ import KioskPayment from '../Payment/KioskPaymentWithModal';
|
||||||
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
|
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
|
||||||
import { FaAngleUp, FaCircleCheck } from 'react-icons/fa6';
|
import { FaAngleUp, FaCircleCheck } from 'react-icons/fa6';
|
||||||
import { FaAngleDown } from 'react-icons/fa';
|
import { FaAngleDown } from 'react-icons/fa';
|
||||||
import { PostBookingData } from '../../../Features/BookingScreen/BookingData/BookingData';
|
import { PostBookingData, PostCancelPayment } from '../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import {
|
import {
|
||||||
generateRandomKey,
|
generateRandomKey,
|
||||||
getSession,
|
getSession,
|
||||||
|
|
@ -129,6 +129,7 @@ const selfKioskFooter = (props) => {
|
||||||
const [chairInformation, setChairInformation] = useState();
|
const [chairInformation, setChairInformation] = useState();
|
||||||
const [TableINformation, setTableINformation] = useState();
|
const [TableINformation, setTableINformation] = useState();
|
||||||
const [paymentUrl, setpaymentUrl] = useState(null);
|
const [paymentUrl, setpaymentUrl] = useState(null);
|
||||||
|
const [showCancelConfirm, setShowCancelConfirm] = useState(null);
|
||||||
const [TransctionId, setTransctionId] = useState(null);
|
const [TransctionId, setTransctionId] = useState(null);
|
||||||
const [paymentGatewayAccess, setPaymentGatewayAccess] = useState([]);
|
const [paymentGatewayAccess, setPaymentGatewayAccess] = useState([]);
|
||||||
// let chairInformation = getSession('table');
|
// let chairInformation = getSession('table');
|
||||||
|
|
@ -939,6 +940,15 @@ const selfKioskFooter = (props) => {
|
||||||
setMessageType(null);
|
setMessageType(null);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// PostCancelPayment
|
||||||
|
const CancelPayment = async () => {
|
||||||
|
const response = await dispatch(PostCancelPayment({OrderId: TransctionId})).unwrap()
|
||||||
|
if (response?.data?.statusCode) {
|
||||||
|
// setBusinessUPI(false);
|
||||||
|
setpaymentUrl(null)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Messages
|
<Messages
|
||||||
|
|
@ -1462,7 +1472,8 @@ const selfKioskFooter = (props) => {
|
||||||
<button
|
<button
|
||||||
className="paymentclose-btn"
|
className="paymentclose-btn"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setpaymentUrl(null);
|
// setpaymentUrl(null);
|
||||||
|
setShowCancelConfirm(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
✖
|
✖
|
||||||
|
|
@ -1476,6 +1487,21 @@ const selfKioskFooter = (props) => {
|
||||||
></iframe>
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{showCancelConfirm && (
|
||||||
|
<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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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,14 +2370,27 @@ const KioskPayment = (props) => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{showCancelConfirm && (
|
{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
|
<Modal
|
||||||
open={showCancelConfirm}
|
open={showCancelConfirm}
|
||||||
title="Cancel Payment"
|
title="Cancel Payment"
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
paymentGatewayRef.current?.clearPolling();
|
|
||||||
setBusinessUPI(false);
|
|
||||||
setShowCancelConfirm(false);
|
setShowCancelConfirm(false);
|
||||||
ClearAllGlobalStateDatas();
|
CancelPayment()
|
||||||
}}
|
}}
|
||||||
onCancel={() => setShowCancelConfirm(false)}
|
onCancel={() => setShowCancelConfirm(false)}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue