PHP Classes

File: example.txt

Recommend this page to a friend!
  Classes of James Dean   XPay   example.txt   Download  
File: example.txt
Role: Example script
Content type: text/plain
Description: Example
Class: XPay
Process credit card payments with XPay service
Author: By
Last change:
Date: 19 years ago
Size: 850 bytes
 

Contents

Class file image Download
//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";
}