Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created March 9, 2012 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VantivSDK/2007013 to your computer and use it in GitHub Desktop.
Save VantivSDK/2007013 to your computer and use it in GitHub Desktop.
PHP SDK- Litle Credit Transaction
<?php
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#Credit
#litleTxnId contains the Litle Transaction Id returned on
#the capture or sale transaction being credited
#the amount is optional, if it isn't submitted the full amount will be credited
$credit_info = array(
'litleTxnId'=>'100000000000000002',
'id'=> '456',
'amount'=>'1010'
);
$initilaize = new LitleOnlineRequest();
$creditResponse = $initilaize->creditRequest($credit_info);
#display results
echo ("Response: " . (XmlParser::getNode($creditResponse,'response')) . "<br>");
echo ("Message: " . XmlParser::getNode($creditResponse,'message') . "<br>");
echo ("Litle Transaction ID: " . XmlParser::getNode($creditResponse,'litleTxnId'));
@VantivSDK
Copy link
Author

Please make sure to adjust the pathname, before running any tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment