<?php   
	include_once("../view/header-footer/pin-header.php");  
?>  
<body> 


                  <script>  
                    
                    
                    
                       		
									
                       $(document).ready(function()
                        {    
                                $("#pin1").focus();    
                                $("#pin6").keyup(function()
                                { 
                                                    setvar = $("#pin1").val()+''+$("#pin2").val()+''+$("#pin3").val()+''+$("#pin4").val()+''+$("#pin5").val()+''+$("#pin6").val();   
                                                    URL = "<?php echo ROOTPATH?>";  
            							            if(setvar.length>5)
            							            {
            							                
                                                            $('.loader').css('display','block');
                                                            $.ajax({	
                                                            type: "POST",
                                                            url: URL+"/ajax/validation.php",
                                                            data: {FormDataSubmit:1,TxnPwd:setvar,AMMT:$("#AMMT").val()},
                                                            beforeSend: function()
                                                            {
                                                            $('#myVid').get(0).play(); 
                                                            },
                                                            success: function(data)
                                                            {         
                                                                  
                                            					            		       
                                                						        if(data==1) 
                                                						        {
                                                						            
                                                            						$.ajax({	
                                                            						type: "POST",
                                                            						url: URL+"/dashboard/mobile2.php",
                                                            						data: {FormDataSubmitAgn:1,operatorPrepaid:$("#operatorPrepaid").val(),AMMT:$("#AMMT").val(),mobile_no:$("#mobile_no").val()},
                                                            						beforeSend: function()
                                                            						{
                                                                						 $('#myVid').get(0).play(); 
                                                            						},
                                                            						success: function(data)
                                                            						{       
                                                            						          
                                                            						        $('.loader').css('display','none');      
                                                            						        SentAmt = $("#AMMT").val();
                                                            						        mobile_no = $("#mobile_no").val();   
                                                            								  
                                                                                            
                    																		if(data!=0)
                                                            								{
                                                            								    
                                                                                                $('.phpAy').css('display','block');   
                                                                                                 var video=document.getElementById("myVid"); 
                                                                                                 video.muted = !video.muted;
                                                                                                
                                                                                                setInterval(function () {
                                                                                                   window.location.href  = URL+"/dashboard/mobile3.php?id="+data+"&Operator="+$("#Operator").val(); 
                                                                                                }, 4000); 
                                                            									 
                                                            									//window.location.href  = URL+"/dashboard/dt4.php?id="+data;   
                                                            									$("#SuccImg").show(300);  
                                                            								     
                                                            								}else if(data==0)
                                                                                            {
                                                                                                
                                                                                                window.location.href  = URL+"/dashboard/mobile3.php?id=0&amt="+SentAmt+"&upi="+mobile_no;
                                                                                                /*$("#PgFail").html("Transaction failed please try later");  
                                                                                                $("#AvailbleId").html("");  
                                                                                                $("#PgFail").show();    */
                                                                                            }else
                                                                                                $("#PgFail").show();       
                                                        									
                                                        						        }   
                                                            						});  
                                                                            }
                                                                            else if(data==2)
                                                                            {
                                                                                $('.loader').css('display','none');  
                                                                                $("#PgFail").html("Something Goes Wrong");  
                                                                                $("#AvailbleId").html("");  
                                                                                $("#PgFail").show();         
                                                                                
                                                                            }else 
                                                                            {
                                                                                $("#PgFail").html("Enter correct Transaction PIN");  
                                                                                $("#AvailbleId").html("");  
                                                                                $("#PgFail").show();         
                                                                            }  
                                                                    }    
                                                            });  
            							            }    
                                             });  
                                 
                        });  
</script>      
<div class="col-sm-12 enterPin">
					<h5 >ENTER TRANSACTION PIN</h5>
					<!--input type="password" class="myInput" id="DataPin" placeholder="Enter Pin"-->
					<div class="inputWrapper" id='some-inputs'>
					<span><input type="password" class="myInput MyPinSound"  pattern="[0-9]*" inputmode="numeric" id="pin1" maxlength="1"></span>
					<span><input type="password" class="myInput MyPinSound"   pattern="[0-9]*" inputmode="numeric" id="pin2" maxlength="1"></span>
					<span><input type="password" class="myInput MyPinSound"  pattern="[0-9]*" inputmode="numeric" id="pin3" maxlength="1"></span>
					<span><input type="password" class="myInput MyPinSound"  pattern="[0-9]*" inputmode="numeric" id="pin4" maxlength="1"></span>
					<span><input type="password" class="myInput MyPinSound"  pattern="[0-9]*" inputmode="numeric" id="pin5" maxlength="1"></span>
					<span><input type="password" class="myInput MyPinSound"  pattern="[0-9]*" inputmode="numeric" id="pin6" maxlength="1"></span>
					</div>
					<p class="errorMessage" id="errorMessage" style="color:#000"> 
					    <a href="chngeTnx.php"> Reset Pin</a>
					</p>
					<div class="modalFooter">
				 
					<a href="javascript:void(0);" id="PgFail" style="color:red;">  </a>
                          <input type="hidden" name="AMMT"  id="AMMT" value="<?php echo $_REQUEST['amont'];?>" />
						<input type="hidden" value="<?php echo $_REQUEST['operatorPrepaid'];?>" id="operatorPrepaid"/>
						<input type="hidden" value="<?php echo $_REQUEST['mobile_no'];?>" id="mobile_no"/>
					</div>
</div>
          
 

<div class="loader">
<div class="loaderInn">
<img src="<?php echo ROOTPATH;?>/images/loader.gif" alt="loading" />
</div>
</div>

<div class="phpAy">
<div class="loaderInnpg">
<!--img src="https://www.dailypayservices.in/mob/view/images/32b6f2aeeb2d21c5a29382721cdc67f7.gif" /--> 
<video width="340" height="280" muted  loop    autoplay  id="myVid">
<source src="ezgif-5-62d2ce7287-VEED.mp4" type="video/mp4">
<source src="ezgif-5-62d2ce7287-VEED.mp4" type="video/ogg">
Your browser does not support the video tag.
</video>   
</div>
</div>


<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js"></script>
<script src="join_inputs.jquery.min.js"></script>
<script>$('#some-inputs input').joinInputs()</script> 

<!-- jQuery -->
<script type="text/javascript" src="<?php echo ROOTPATH;?>/js/jquery.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="<?php echo ROOTPATH;?>/js/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="<?php echo ROOTPATH;?>/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="<?php echo ROOTPATH;?>/js/mdb.min.js"></script>   

</body>
</html>