//example
 
 
include_once("class.xpay.php");
 
 
$operation = array(    "amount"=>(1000);
 
$customerinfo = array(    "nameprefix"=>"Mr.",
 
            "firstname"=>"James",
 
            "lastname"=>"Dean",
 
            "company"=>"",
 
            "street"=>("123 Astreet St"),
 
            "city"=>"Acity",
 
            "stateprov"=>"Acounty",
 
            "postcode"=>"AB11CD",
 
            "countrycode"=>"UK",
 
            "phone"=>"",
 
            "email"=>"");
 
 
$paymentmethod = array(    "type"=>"VISA",
 
            "number"=>"4111111111111111",
 
            "issue"=>"",
 
            "startdate"=>"",
 
            "securitycode"=>"123",
 
            "expirydate"=>"01/01";
 
$order = array(        "orderreference"=>"Order001",
 
            "orderinformation"=>"Order");
 
 
$xpay = new Xpay($sitereference,$certlocation,$port = 5000,$host = "127.0.0.1")
 
$result = $xpay->auth($operation,$customerinfo,$paymentmethod,$order);
 
 
if($result["Result"] == 1){
 
    print "The transaction was successful";
 
}
 
 |