use of com.ingenico.connect.gateway.sdk.java.domain.hostedcheckout.definitions.HostedCheckoutSpecificInput in project connect-sdk-java by Ingenico-ePayments.
the class CreateHostedCheckoutExample method example.
@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
Client client = getClient();
try {
HostedCheckoutSpecificInput hostedCheckoutSpecificInput = new HostedCheckoutSpecificInput();
hostedCheckoutSpecificInput.setLocale("en_GB");
hostedCheckoutSpecificInput.setVariant("testVariant");
AmountOfMoney amountOfMoney = new AmountOfMoney();
amountOfMoney.setAmount(2345L);
amountOfMoney.setCurrencyCode("USD");
Address billingAddress = new Address();
billingAddress.setCountryCode("US");
Customer customer = new Customer();
customer.setBillingAddress(billingAddress);
Order order = new Order();
order.setAmountOfMoney(amountOfMoney);
order.setCustomer(customer);
CreateHostedCheckoutRequest body = new CreateHostedCheckoutRequest();
body.setHostedCheckoutSpecificInput(hostedCheckoutSpecificInput);
body.setOrder(order);
CreateHostedCheckoutResponse response = client.merchant("merchantId").hostedcheckouts().create(body);
} finally {
client.close();
}
}
Aggregations