### Xpay.cz Payment Gateway
### Background call to gather payment information
### Payment method: Bank transfer
### The project dependent parameters
$projectID=142;
$paymentMethod=7;
$paymentAmountID=39;
### Payment gateway URL
$url="https://www.xpay.cz/gate/hidden/";
### GET paramaters contruction
$paramater="";
$parameter.="?projectID=".$projectID;
$parameter.="&paymentMethod=".$paymentMethod;
$parameter.="&paymentAmountID=".$paymentAmountID;
$parameter.="&P1=";
$parameter.="&P2=";
$parameter.="&P3=";
$parameter.="&TID=0";
$parameter.="&TID1=0";
$parameter.="&TID2=0";
$parameter.="&TEST=0";
### Call the gateway (PHP module cURL needed)
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url.$parameter);
curl_setopt($ch,CURLOPT_TIMEOUT,300);
curl_setopt($ch,CURLOPT_POST, 0);
curl_setopt($ch,CURLOPT_HEADER, 0);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$res=explode("\n",curl_exec($ch));
curl_close($ch);
### Parse output (PSV = pipe separated values lines, parse the information)
$phonenumber=$amount=$currency=$prefix=$pin="";
for($i=0;$i";
for($i=0;$i\n";;
}
echo $url.$parameter."
\n";
}else{
### Payment information print out to a viewer
echo "Make a bank money transfer to the account number ".$accountnumber."/".$bankcode."";
echo " in amount of ".$amount." ".$currency." with identification code ".$pin."
\n";
if($address!=""){
echo "The account owner is: ".$address."
\n";
}
}
?>