	    
function TxnStatus(){
	
   $.ajax({ 
            url: "./system/paytmTxnStatus.php",
            success: function(result) {
			var obj = JSON.parse(result);
			
            if(obj.status=="SUCCESS"){
                swal ( "Payment Done" ,  obj.message ,  "success" );
			document.getElementById("qrcode").innerHTML = "<img src=\'./assets/img/success.gif\' width=\'150\'>";	
            document.getElementById("status").value = obj.status;
            document.getElementById("message").value = obj.message;
            document.getElementById("hash").value = obj.hash;
			
			setTimeout(function(){ 
			document.getElementById("formSubmit").submit();
            }, 3000);

			}  

			  
            }
    });
	
}

setInterval(function(){ 
TxnStatus();
}, 10000);
