Created
March 29, 2012 20:25
-
-
Save VantivSDK/2243367 to your computer and use it in GitHub Desktop.
PHP SDK-Litle Sale w/Token Transaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php'; | |
#Sale using a previously registered token | |
$sale_info = array( | |
'orderId' => '1', | |
'id'=> '456', | |
'amount' => '10010', | |
'orderSource'=>'ecommerce', | |
'billToAddress'=>array( | |
'name' => 'John Smith', | |
'addressLine1' => '1 Main St.', | |
'city' => 'Burlington', | |
'state' => 'MA', | |
'zip' => '01803-3747', | |
'country' => 'US'), | |
'token'=>array( | |
'litleToken' =>'5112010000000003', | |
'expDate' => '0112', | |
'cardValidationNum' => '349', | |
'type' => 'MC') | |
); | |
$initilaize = &new LitleOnlineRequest(); | |
$saleResponse = $initilaize->saleRequest($sale_info); | |
#display results | |
echo ("Response: " . (XmlParser::getNode($saleResponse,'response')) . "<br>"); | |
echo ("Message: " . XmlParser::getNode($saleResponse,'message') . "<br>"); | |
echo ("Litle Transaction ID: " . XmlParser::getNode($saleResponse,'litleTxnId')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment