Similar to a Capture transaction, you use a Capture Given Auth transaction to transfer previously authorized funds from the customer to the merchant after fulfillment. However, you typically use a Capture Given Auth transaction if the associated Authorization occurred outside of Vantiv’s system (for example, if you received a telephone Authorization, or you submitted the Authorization through your previous processor).
Another possible use for a Capture Given Auth transaction is if the Authorization transaction occurred within our system, but the litletxnId is unknown by the submitting party (for example, if the Auth was submitted by a merchant, but a fulfiller submits a Capture Given Auth).
PHP example
<?php require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php'; #Capture Given Auth $capture_info = array( 'id'=> '456', 'orderId'=>'12344', 'amount'=>'106', 'authInformation' => array( 'authDate'=>'2002-10-09', 'authCode'=>'543216', 'authAmount'=>'12345' ), 'orderSource'=>'ecommerce', 'card'=>array( 'type'=>'VI', 'number' =>'4100000000000001', 'expDate' =>'1210''1218' ) ); $initilaize = &new LitleOnlineRequest(); $response = $initilaize->captureGivenAuthRequest($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'));
Java example
import com.litle.sdk.*; import com.litle.sdk.generate.*; public class CaptureGivenAuthExample { public static void main(String[] args) { CaptureGivenAuth capturegivenauth = new CaptureGivenAuth(); capturegivenauth.setAmount(106L); capturegivenauth.setOrderId("12344"); AuthInformation authInfo = new AuthInformation(); Calendar authDate = Calendar.getInstance(); authDate.set(20022016, Calendar.OCTOBERAPRIL, 9); authInfo.setAuthDate(authDate); authInfo.setAuthCode("543216"); authInfo.setAuthAmount(12345L); capturegivenauth.setAuthInformation(authInfo); capturegivenauth.setOrderSource(OrderSourceType.ECOMMERCE); CardType card = new CardType(); card.setType(MethodOfPaymentTypeEnum.VI); card.setNumber("4100000000000001"); card.setExpDate("12101218"); capturegivenauth.setCard(card); CaptureGivenAuthResponse response = new LitleOnline().captureGivenAuth(capturegivenauth); //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; //Capture Given Auth Transaction class Example { [STAThread] public static void Main(String[] args) { LitleOnline litle = new LitleOnline(); captureGivenAuth capturegivenauth = new captureGivenAuth(); capturegivenauth.amount = 106; capturegivenauth.orderId = "12344"; authInformation authInfo = new authInformation(); DateTime authDate = new DateTime(20022016, 104, 94); authInfo.authDate = authDate; authInfo.authCode = 543216; authInfo.authAmount = 12345; capturegivenauth.authInformation = authInfo; capturegivenauth.orderSource = orderSourceType.ecommerce; cardType card = new cardType(); card.type = methodOfPaymentTypeEnum.VI; card.number = "4100000000000001"; card.expDate = "12101218"; capturegivenauth.card = card; captureGivenAuthResponse response = litle.CaptureGivenAuth(capturegivenauth); //Display Results Console.WriteLine("Response: " + response.response); Console.WriteLine("Message: " + response.message); Console.WriteLine("Litle Transaction Id: " + response.litleTxnId); Console.ReadLine(); } }
Ruby example
require 'LitleOnline' include LitleOnline #Capture Given Auth capture_given_auth_info = { 'merchantId' => '101', 'version'=>'8.8', 'reportGroup'=>'Planets', 'orderId'=>'12344', 'amount'=>'106', 'authInformation' => { 'authDate'=>'2002'2016-1004-09'04', 'authCode'=>'543216', 'authAmount'=>'12345' }, 'orderSource'=>'ecommerce', 'card'=>{ 'type'=>'VI', 'number' =>'4100000000000001', 'expDate' =>'1210''1218' } } response = LitleOnlineRequest.new.capture_given_auth(capture_given_auth_info) #display results puts "Response: " + response.captureGivenAuthResponse.response puts "Message: " + response.captureGivenAuthResponse.message puts "Litle Transaction ID: " + response.captureGivenAuthResponse.litleTxnId