Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
PHP SDK - Litle Force Capture transaction
<?php
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#Force Capture
$capture_info = array(
'id'=> '456',
'merchantId' => '101',
'version'=>'8.8',
'reportGroup'=>'Planets',
'litleTxnId'=>'123456',
'orderId'=>'12344',
'amount'=>'106',
'orderSource'=>'ecommerce',
'card'=>array(
'type'=>'VI',
'number' =>'4100000000000001',
'expDate' =>'1210'
)
);
$initilaize = &new LitleOnlineRequest();
$response = $initilaize->forceCaptureRequest($capture_info);
#display results
echo ("Response: " . (XmlParser::getNode($response,'response')) . "<br>");
echo ("Message: " . XmlParser::getNode($response,'message') . "<br>");
echo ("Litle Transaction ID: " . XmlParser::getNode($response,'litleTxnId'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment