From 595f4e79766c21f950100ba54b26b4346661dfc5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Mar 2026 10:16:42 +0530 Subject: [PATCH] auto submit otp --- src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 */}
- + */}