Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (34 sloc) 1.26 KB
// include the the four other files needed to test
include 'communications.php';
include 'createObj.php';
include 'Obj2xml.php';
include 'tagValue.php';
//this class will test a litleOnline request transaction and post the response
//Authorization Request Example
//$type = 'authorization';
//Sale Request Example
//$type = 'sale';
// Token Request Example
//$type = 'registerTokenRequest';
// Credit/Refund Request Example
$type = 'credit';
$converter=new Obj2xml("litleOnlineRequest");
$req = $converter->toXml($ob,$type);// convert object to litleOnlineRequest XML
if (!$req){
echo "error with Litle Online Request";
//echo $req; //display request
$resp = communications::httpRequest("http://l-rganmukh-ws490:2180/vap/communicator/online", $req);//do Http post
if (!$resp){
echo "error with Litle Online Response ";
//echo $resp;// display litle Reponse
$txnID= tagValue::getXmlValueByTag($resp,'litleTxnId'); //convert Resonse xml to an object and get tag value
echo "Transaction ID: ".$txnID;// display transaction id