SDK Credit

Document created by gjsissons on May 6, 2016Last modified by gjsissons on May 12, 2016
Version 2Show Document
  • View in full screen mode

You can use a Credit transaction to refund money to a customer, even if the original transaction occurred outside of Vantiv’s systems. You can submit refunds against any of the following payment transactions:

 

 

 

 

PHP example

 

<?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'));

 

Java example

 

import com.litle.sdk.*;
import com.litle.sdk.generate.*;

public class CreditExample {
    public static void main(String[] args) {
        Credit credit = new Credit();
        //litleTxnId contains the Litle Transaction Id returned on the deposit
        credit.setLitleTxnId(100000000000000001L);
        CreditResponse response = new LitleOnline().credit(credit);
        //Display Results
        System.out.println("Response: " + response.getResponse());
        System.out.println("Message: " + response.getMessage());
        System.out.println("Litle Transaction ID: " + response.getLitleTxnId());
    }
}

 

.NET example

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Litle.Sdk;

    class Example
    {
        [STAThread]
        public static void Main(String[] args)
        {
            //litleTxnId contains the Litle Transaction Id returned on the deposit
            LitleOnline litle = new LitleOnline();
            credit credit = new credit();
            credit.litleTxnId = 100000000000000002;
            creditResponse creditResponse = litle.Credit(credit);
            //Display Results
            Console.WriteLine("Response: " + creditResponse.response);
            Console.WriteLine("Message: " + creditResponse.message);
            Console.WriteLine("Litle Transaction Id: " + creditResponse.litleTxnId);
            Console.ReadLine();
        }
    }

 

Ruby example

 

require 'LitleOnline'
include LitleOnline

#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 =  {'litleTxnId' => '100000000000000002', 'amount' => '1010'}
credit_response = LitleOnlineRequest.new.credit(credit_info)

#display results
puts "Response: " + credit_response.creditResponse.response
puts "Message: " + credit_response.creditResponse.message
puts "Litle Transaction ID: " + credit_response.creditResponse.litleTxnId

Attachments

    Outcomes