Search in sources :

Example 16 with Address

use of com.ingenico.connect.gateway.sdk.java.domain.definitions.Address 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)16 Client (com.ingenico.connect.gateway.sdk.java.Client)12 AmountOfMoney (com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney)12 Customer (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.Customer)9 Order (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.Order)9 CreatePaymentRequest (com.ingenico.connect.gateway.sdk.java.domain.payment.CreatePaymentRequest)8 Card (com.ingenico.connect.gateway.sdk.java.domain.definitions.Card)7 CardPaymentMethodSpecificInput (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CardPaymentMethodSpecificInput)6 Test (org.junit.Test)6 CompanyInformation (com.ingenico.connect.gateway.sdk.java.domain.definitions.CompanyInformation)4 CustomerToken (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.CustomerToken)4 CreatePaymentResponse (com.ingenico.connect.gateway.sdk.java.domain.payment.CreatePaymentResponse)3 HttpHost (org.apache.http.HttpHost)3 ApiException (com.ingenico.connect.gateway.sdk.java.ApiException)2 DeclinedPaymentException (com.ingenico.connect.gateway.sdk.java.DeclinedPaymentException)2 BankAccountBban (com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban)2 CardWithoutCvv (com.ingenico.connect.gateway.sdk.java.domain.definitions.CardWithoutCvv)2 PersonalName (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.PersonalName)2 PersonalInformationToken (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.PersonalInformationToken)2 PersonalNameToken (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.PersonalNameToken)2