<?php
require("lib/config.php");
require_once 'vendor/eway/eway-rapid-php/include_eway.php';
// =============== Get customer user api ===================================
$data  = $_REQUEST;
$sql = "SELECT * FROM `booking` where `email` = '".$_REQUEST['email']."' AND (`status` = 'completed' OR `status` = 'cancelled')";
$result = $conn->query($sql);
if ($result->num_rows > 0) 
{
	while($row_details = $result->fetch_assoc()) 
	{
		$booking_detail[] = $row_details;
	}
	
	
	
	$Res["data"] = $booking_detail;
	$Res["message"] = "Bookings Found"; 
	$Res["status"] = "OK"; 
	
}
else
{
	$Res["message"] = "No Completed Bookings Found"; 
	$Res["status"] = "no"; 
}


echo json_encode(new ArrayObject($Res)); 

				
