1. Go to this page and download the library: Download vantiv/payments-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vantiv / payments-sdk example snippets
/ Visa $10.00 sale
$hash_in = array(
'amount'=>'106',
'orderId' => '123213',
'orderSource'=>'ecommerce',
'card'=>array(
'type'=>'VI',
'number' =>'4100000000000001',
'expDate' =>'1000')
);
//Perform the transaction on the Vantiv eCommerce Platform
$initialize = new LitleOnlineRequest();
$saleResponse = $initialize->saleRequest($hash_in);
// Display Result
echo ("Message: " . XMLParser::getNode($saleResponse,'message') . "<br>");
echo ("Vantiv eCommerce Transaction ID: " . XMLParser::getNode($saleResponse,'litleTxnId'));
/ Visa $10.00 sale
$hash_in = array(
'amount'=>'106',
'orderId' => '123213',
'orderSource'=>'ecommerce',
'card'=>array(
'type'=>'VI',
'number' =>'4100000000000001',
'expDate' =>'1000')
);
//Perform the transaction on the Vantiv eCommerce Platform
$initialize = new LitleOnlineRequest($treeResponse=true);
$saleResponse = $initialize->saleRequest($hash_in);
// Display Result
echo ("Message: " . $saleResponse->saleResponse->message . "<br>");
echo ("Vantiv eCommerce Transaction ID: " . $saleResponse->saleResponse->litleTxnId);