Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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