<?php

								

$qryApi = mysqli_query($conn,"SELECT * FROM api_setting");
$apidata = mysqli_fetch_array($qryApi);

$apikey = $apidata['APIkey'];
$baseurl = $apidata['baseurl']; 





$host = "https://vtuafrica.com.ng/portal/api/merchant-verify/?apikey=$apikey&serviceName=BankTransfer&accountNo=$iuc&bankcode=$variation";



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

$dataR = curl_exec($ch);


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

$result = json_decode($dataR);

$status = $result->description->Status;
$customerName = $result->description->Customer;
$APImessage = $result->description->message;

if($result->code == '101'){
$status = "Completed";
$_SESSION['customer'] = $customerName;
}else{
$status = "Failed";	
}	

            
?>