here is it
Code: Select all
function iwalletapicall($apiurl,$api_version,$i_mode, $token, $amount, $custref, $comment1, $service_type, $unit_price, $item, $qty, $merchant_email,$merchant_key)
{
$param = "api_version=$api_version&i_mode=$i_mode&token=$token&amount=$amount&cust_ref=$custref&comment1=$comment1&service_type=$service_type&unit_price=$unit_price&item=$item&quantity=$qty&merchant_email=$merchant_email&merchant_key=$merchant_key";
//echo $apiurl.$param;
$req = curl_init();
curl_setopt($req, CURLOPT_URL,$apiurl); // set url to post to
curl_setopt($req, CURLOPT_RETURNTRANSFER, 1); // return into a variable
curl_setopt($req, CURLOPT_POST, 1); // set POST method
curl_setopt($req, CURLOPT_POSTFIELDS, $param); // add POST fields
$exec = curl_exec($req); // run the whole process
curl_close($req);
//$response = explode(':',$exec);
/*if($response[0] == "Error")
{
$this->sendAlert("admin@localhost",$response);
echo "Unexpected technical problem. Please try again later";
}
else
{*/
var_dump($exec);
//}
}
the var_dump displays bool(false).I've even echo the $param and replaced it in the CURLOPT_POSTFIELDS ,same result.but the echo $apirul .$param generated y the function works in the address bar.I'm confused .....