<?php
include'connection.php';
	$LapuId=$_GET['LapuId'];
	$OrderId=$_GET['OrderId'];
	$LapuNo=$_GET['LapuNo'];
	
	$nilBal=0;
	
	$qu2="SELECT * FROM recharge WHERE LapuNo='$LapuNo' AND Status='SUCCESS' ORDER BY Id DESC";
	$re2=mysqli_query($con,$qu2);
	$data2=mysqli_fetch_array($re2);
	$rechId=$data2['Id'];
	
	$qu="UPDATE myapi SET LapuBal='$nilBal' WHERE Id='$LapuId'";
	if(mysqli_query($con,$qu))
	{
	    $qu3="UPDATE recharge SET ApiBal='$nilBal' WHERE Id='$rechId'";
	    if(mysqli_query($con,$qu3))
	    {
	        header('location:AllApiBal.php');
	    }
	}
?>