Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created March 23, 2012 20:53
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/2174943 to your computer and use it in GitHub Desktop.
Save VantivSDK/2174943 to your computer and use it in GitHub Desktop.
Java SDK - Litle Force Capture Transaction
import com.litle.sdk.*;
import com.litle.sdk.generate.*;
public class ForceCaptureExample {
public static void main(String[] args) {
ForceCapture forceCapture = new ForceCapture();
forceCapture.setAmount(106L);
forceCapture.setOrderId("12344");
forceCapture.setOrderSource(OrderSourceType.ECOMMERCE);
CardType card = new CardType();
card.setType(MethodOfPaymentTypeEnum.VI);
card.setNumber("4100000000000001");
card.setExpDate("1210");
forceCapture.setCard(card);
ForceCaptureResponse response = new LitleOnline().forceCapture(forceCapture);
//Display Results
System.out.println("Response: " + response.getResponse());
System.out.println("Message: " + response.getMessage());
System.out.println("Litle Transaction ID: " + response.getLitleTxnId());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment