Search in sources :

Example 6 with CardPaymentMethodSpecificInput

use of com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CardPaymentMethodSpecificInput in project connect-sdk-java by Ingenico-ePayments.

the class DefaultConnectionIdempotenceTest method createRequest.

private CreatePaymentRequest createRequest() {
    CreatePaymentRequest body = new CreatePaymentRequest();
    Order order = new Order();
    AmountOfMoney amountOfMoney = new AmountOfMoney();
    amountOfMoney.setAmount(2345L);
    amountOfMoney.setCurrencyCode("CAD");
    order.setAmountOfMoney(amountOfMoney);
    Customer customer = new Customer();
    Address billingAddress = new Address();
    billingAddress.setCountryCode("CA");
    customer.setBillingAddress(billingAddress);
    order.setCustomer(customer);
    CardPaymentMethodSpecificInput cardPaymentMethodSpecificInput = new CardPaymentMethodSpecificInput();
    cardPaymentMethodSpecificInput.setPaymentProductId(1);
    Card card = new Card();
    card.setCvv("123");
    card.setCardNumber("4567350000427977");
    card.setExpiryDate("1220");
    cardPaymentMethodSpecificInput.setCard(card);
    body.setCardPaymentMethodSpecificInput(cardPaymentMethodSpecificInput);
    return body;
}
Also used : Order(com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.Order) Address(com.ingenico.connect.gateway.sdk.java.domain.definitions.Address) Customer(com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.Customer) CreatePaymentRequest(com.ingenico.connect.gateway.sdk.java.domain.payment.CreatePaymentRequest) CardPaymentMethodSpecificInput(com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CardPaymentMethodSpecificInput) AmountOfMoney(com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney) Card(com.ingenico.connect.gateway.sdk.java.domain.definitions.Card)

Aggregations

Address (com.ingenico.connect.gateway.sdk.java.domain.definitions.Address)6 AmountOfMoney (com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney)6 Card (com.ingenico.connect.gateway.sdk.java.domain.definitions.Card)6 CreatePaymentRequest (com.ingenico.connect.gateway.sdk.java.domain.payment.CreatePaymentRequest)6 CardPaymentMethodSpecificInput (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CardPaymentMethodSpecificInput)6 Customer (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.Customer)6 Order (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.Order)6 Client (com.ingenico.connect.gateway.sdk.java.Client)4 HttpHost (org.apache.http.HttpHost)3 Test (org.junit.Test)3 DeclinedPaymentException (com.ingenico.connect.gateway.sdk.java.DeclinedPaymentException)2 CreatePaymentResponse (com.ingenico.connect.gateway.sdk.java.domain.payment.CreatePaymentResponse)2 ApiException (com.ingenico.connect.gateway.sdk.java.ApiException)1 ValidationException (com.ingenico.connect.gateway.sdk.java.ValidationException)1 CompanyInformation (com.ingenico.connect.gateway.sdk.java.domain.definitions.CompanyInformation)1 AddressPersonal (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.AddressPersonal)1 ContactDetails (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.ContactDetails)1 LineItem (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.LineItem)1 LineItemInvoiceData (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.LineItemInvoiceData)1 OrderInvoiceData (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.OrderInvoiceData)1