<?php

$sev = $_POST['service'];
	$sno = $_POST['iuc'];
	$tp = $_POST['plan'];
    $va = $_POST['variation_code'];
								
$qryApi = mysqli_query($conn,"SELECT * FROM api_setting");
$apidata = mysqli_fetch_array($qryApi);

$apikey = $apidata['APIkey']; //email address()
$url = $apidata['baseurl'];


$host ="https://vtuafrica.com.ng/portal/api/merchant-verify/smile.php?apikey=$apikey&service=$sev&accountNo=$sno&variation=$va";



//
//Initialize cURL.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

$data = curl_exec($ch);
$result = json_decode($data);

//Close the cURL handle.
curl_close($ch);

$_SESSION['customer'] = $result->description->Customer;

?>


