diff --git a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx index 263b466..3329419 100644 --- a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx +++ b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx @@ -203,6 +203,12 @@ const KioskPayment = (props) => { } }, [SessionData.CompId, SessionData.BranchId, SessionData.AppId]); + useEffect(() => { + if (otpInput.every(input => input !== '')) { + verifyOtp(); + } + }, [otpInput]); + useEffect(() => { const getPrintData = async () => { try { @@ -1922,6 +1928,8 @@ const KioskPayment = (props) => { } else { setMessageType('error'); setMessageData('Invalid OTP'); + setOtpInput(['', '', '', '']); + setOtpIndex(0); } }; @@ -2185,13 +2193,13 @@ const KioskPayment = (props) => { {/* Buttons */}
- + */}