Created
March 20, 2012 18:57
-
-
Save VantivSDK/2139803 to your computer and use it in GitHub Desktop.
Java SDK - Litle Capture Given Auth Transaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(2002, Calendar.OCTOBER, 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("1210"); | |
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()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment