Search in sources :

Example 1 with CompletePaymentResponse

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

the class CompletePaymentExample method example.

@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
    Client client = getClient();
    try {
        CardWithoutCvv card = new CardWithoutCvv();
        card.setCardNumber("67030000000000003");
        card.setCardholderName("Wile E. Coyote");
        card.setExpiryDate("1220");
        CompletePaymentCardPaymentMethodSpecificInput cardPaymentMethodSpecificInput = new CompletePaymentCardPaymentMethodSpecificInput();
        cardPaymentMethodSpecificInput.setCard(card);
        CompletePaymentRequest body = new CompletePaymentRequest();
        body.setCardPaymentMethodSpecificInput(cardPaymentMethodSpecificInput);
        CompletePaymentResponse response = client.merchant("merchantId").payments().complete("paymentId", body);
    } finally {
        client.close();
    }
}
Also used : CardWithoutCvv(com.ingenico.connect.gateway.sdk.java.domain.definitions.CardWithoutCvv) CompletePaymentRequest(com.ingenico.connect.gateway.sdk.java.domain.payment.CompletePaymentRequest) Client(com.ingenico.connect.gateway.sdk.java.Client) CompletePaymentResponse(com.ingenico.connect.gateway.sdk.java.domain.payment.CompletePaymentResponse) CompletePaymentCardPaymentMethodSpecificInput(com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CompletePaymentCardPaymentMethodSpecificInput)

Aggregations

Client (com.ingenico.connect.gateway.sdk.java.Client)1 CardWithoutCvv (com.ingenico.connect.gateway.sdk.java.domain.definitions.CardWithoutCvv)1 CompletePaymentRequest (com.ingenico.connect.gateway.sdk.java.domain.payment.CompletePaymentRequest)1 CompletePaymentResponse (com.ingenico.connect.gateway.sdk.java.domain.payment.CompletePaymentResponse)1 CompletePaymentCardPaymentMethodSpecificInput (com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CompletePaymentCardPaymentMethodSpecificInput)1