Create a Card
You can create a Card implicity when creating a Transaction, or directly as seen below.
CreditCardRequest cardReq = new CreditCardRequest()
.cardholderName("John Hancock")
.number("4350100010001002")
.cvv("313")
.expiryMonth(12)
.expiryYear(2016);
CreditCard card = gateway.creditCard().create("customer_uid", cardReq);
Create a Card with a Transaction
TransactionRequest request = new TransactionRequest()
.amount(new BigDecimal("10"), "EUR")
.creditCard()
.cardholderName("John Hancock")
.number("4350100010001002")
.cvv("313")
.expiryMonth(12)
.expiryYear(2016)
.done();
Transaction txn = gateway.transaction().create(request);