<?php
    include'connection.php';
    $userid = $_GET['userid'];
	$token = $_GET['token'];
	$orderid = $_GET['orderid'];
	
	$QuGetUser = "select * from retailer where Userid='$userid' and ApiToken='$token'";
	$ReGetUser = mysqli_query($con,$QuGetUser);
	$GetUser = mysqli_num_rows($ReGetUser);
	
	if($GetUser!==1)
	{    
		$myresponse = array("errmsg"=>"Invalid Userid Or API Token !");
		echo $myresult = json_encode($myresponse);
	}
	else
	{
	    $query8="select * from recharge where Userid='$userid' and Partnerid='$orderid'";
		$result8=mysqli_query($con,$query8);
		$getPartnerId= mysqli_num_rows($result8);
		if($getPartnerId!==1)
		{
		    $myresponse = array("errmsg"=>"Data Not Found For This Partner Id !");
		    echo $myresult = json_encode($myresponse);
		}
		else
		{
		    $data8=mysqli_fetch_array($result8);
		    $orderid= $data8['Id'];
		    $Partnerid= $data8['Partnerid'];
		    $Mobile= $data8['Mobile'];
		    $Amount= $data8['Amount'];
		    $operator= $data8['Companyname'];
		    $Operatorid= $data8['Operatorid'];
		    $Status= $data8['Status'];
		
		    $myresponse = array("orderid"=>"$orderid", "partnertid"=>"$Partnerid", "mobile"=>"$Mobile", "amount"=>"$Amount", "operator"=>"$operator", "opid"=>"$Operatorid", "status"=>"$Status");
		    echo $myresult = json_encode($myresponse);
		}
	}

?>