Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 5.7.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingenico ePayments committed Aug 4, 2017
1 parent 6a40cf9 commit 3184880
Show file tree
Hide file tree
Showing 18 changed files with 397 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.ingenico.connect.gateway</groupId>
<artifactId>connect-sdk-java</artifactId>
<version>5.6.0</version>
<version>5.7.0</version>
<packaging>jar</packaging>

<name>connect-sdk-java</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* This class was auto-generated from the API references found at
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
*/
package com.ingenico.connect.gateway.sdk.java.merchant.payments;

import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;

import com.ingenico.connect.gateway.sdk.java.Client;
import com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration;
import com.ingenico.connect.gateway.sdk.java.Factory;
import com.ingenico.connect.gateway.sdk.java.domain.definitions.CardWithoutCvv;
import com.ingenico.connect.gateway.sdk.java.domain.payment.CompletePaymentRequest;
import com.ingenico.connect.gateway.sdk.java.domain.payment.CompletePaymentResponse;
import com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CompletePaymentCardPaymentMethodSpecificInput;

public class CompletePaymentExample {

@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();
}
}

private Client getClient() throws URISyntaxException {
String apiKeyId = System.getProperty("connect.api.apiKeyId", "someKey");
String secretApiKey = System.getProperty("connect.api.secretApiKey", "someSecret");

URL propertiesUrl = getClass().getResource("/example-configuration.properties");
CommunicatorConfiguration configuration = Factory.createConfiguration(propertiesUrl.toURI(), apiKeyId, secretApiKey);
return Factory.createClient(configuration);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* This class was auto-generated from the API references found at
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
*/
package com.ingenico.connect.gateway.sdk.java.merchant.payments;

import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;

import com.ingenico.connect.gateway.sdk.java.Client;
import com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration;
import com.ingenico.connect.gateway.sdk.java.Factory;
import com.ingenico.connect.gateway.sdk.java.domain.payment.ThirdPartyStatusResponse;

public class GetThirdPartyStatusExample {

@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
Client client = getClient();
try {
ThirdPartyStatusResponse response = client.merchant("merchantId").payments().thirdPartyStatus("paymentId");
} finally {
client.close();
}
}

private Client getClient() throws URISyntaxException {
String apiKeyId = System.getProperty("connect.api.apiKeyId", "someKey");
String secretApiKey = System.getProperty("connect.api.secretApiKey", "someSecret");

URL propertiesUrl = getClass().getResource("/example-configuration.properties");
CommunicatorConfiguration configuration = Factory.createConfiguration(propertiesUrl.toURI(), apiKeyId, secretApiKey);
return Factory.createClient(configuration);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void example() throws URISyntaxException, IOException {
query.setLocale("en_US");
query.setAmount(1000L);
query.setIsRecurring(true);
query.setForceBasicFlow(false);
query.addHide("fields");

PaymentProductResponse response = client.merchant("merchantId").products().get(1, query);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* This class was auto-generated from the API references found at
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
*/
package com.ingenico.connect.gateway.sdk.java.domain.payment;

import com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CompletePaymentCardPaymentMethodSpecificInput;

public class CompletePaymentRequest {

private CompletePaymentCardPaymentMethodSpecificInput cardPaymentMethodSpecificInput = null;

public CompletePaymentCardPaymentMethodSpecificInput getCardPaymentMethodSpecificInput() {
return cardPaymentMethodSpecificInput;
}

public void setCardPaymentMethodSpecificInput(CompletePaymentCardPaymentMethodSpecificInput value) {
this.cardPaymentMethodSpecificInput = value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* This class was auto-generated from the API references found at
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
*/
package com.ingenico.connect.gateway.sdk.java.domain.payment;

import com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.CreatePaymentResult;

public class CompletePaymentResponse extends CreatePaymentResult {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* This class was auto-generated from the API references found at
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
*/
package com.ingenico.connect.gateway.sdk.java.domain.payment;

public class ThirdPartyStatusResponse {

private String thirdPartyStatus = null;

/**
* The status returned by the third party.
*
* Possible values:
* <ul><li>WAITING - The customer has not connected to the third party</li>
* <li>INITIALIZED - Authentication in progress</li>
* <li>AUTHORIZED - Payment in progress</li>
* <li>COMPLETED - The customer has completed the payment at the third party</li></ul>
*/
public String getThirdPartyStatus() {
return thirdPartyStatus;
}

/**
* The status returned by the third party.
*
* Possible values:
* <ul><li>WAITING - The customer has not connected to the third party</li>
* <li>INITIALIZED - Authentication in progress</li>
* <li>AUTHORIZED - Payment in progress</li>
* <li>COMPLETED - The customer has completed the payment at the third party</li></ul>
*/
public void setThirdPartyStatus(String value) {
this.thirdPartyStatus = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class CardPaymentMethodSpecificInputBase extends AbstractPaymentMethodSpe

/**
* Determines the type of the authorization that will be used. Allowed values:
* <ul><li>FINAL_AUTHORISATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORISATION - The payment creation results in a pre-authorisation that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* <ul><li>FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* </ul>
* Only used with some acquirers, ingnored for acquirers that don't support this. In case the acquirer doesn't allow this to be specified the <span class="property">authorizationMode</span> is 'unspecified', which behaves similar to a final authorization.
*/
Expand All @@ -39,8 +39,8 @@ public String getAuthorizationMode() {

/**
* Determines the type of the authorization that will be used. Allowed values:
* <ul><li>FINAL_AUTHORISATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORISATION - The payment creation results in a pre-authorisation that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* <ul><li>FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* </ul>
* Only used with some acquirers, ingnored for acquirers that don't support this. In case the acquirer doesn't allow this to be specified the <span class="property">authorizationMode</span> is 'unspecified', which behaves similar to a final authorization.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* This class was auto-generated from the API references found at
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
*/
package com.ingenico.connect.gateway.sdk.java.domain.payment.definitions;

import com.ingenico.connect.gateway.sdk.java.domain.definitions.CardWithoutCvv;

public class CompletePaymentCardPaymentMethodSpecificInput {

private CardWithoutCvv card = null;

public CardWithoutCvv getCard() {
return card;
}

public void setCard(CardWithoutCvv value) {
this.card = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
import java.util.List;

import com.ingenico.connect.gateway.sdk.java.domain.definitions.KeyValuePair;
import com.ingenico.connect.gateway.sdk.java.domain.product.definitions.PaymentProductField;

public class MerchantAction {

private String actionType = null;

private List<PaymentProductField> formFields = null;

private RedirectData redirectData = null;

private String renderingData = null;
Expand All @@ -21,6 +24,7 @@ public class MerchantAction {
/**
* Action merchants needs to take in the online payment process. Possible values are:<br>
* <ul><li>REDIRECT - The consumer needs to be redirected using the details found in <span class="property">redirectData</span>
* <li>SHOW_FORM - The consumer needs to be shown a form with the fields found in <span class="property">formFields</span>. You can submit the data entered by the user in a <a href="https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/java/payments/complete.html">Complete payment</a> request
* <li>SHOW_INSTRUCTIONS - The consumer needs to be shown payment instruction using the details found in <span class="property">showData</span>. Alternatively the instructions can be rendered by us using the <span class="property">instructionsRenderingData</span>
* <li>SHOW_TRANSACTION_RESULTS - The consumer needs to be shown the transaction results using the details found in <span class="property">showData</span>. Alternatively the instructions can be rendered by us using the <span class="property">instructionsRenderingData</span>
* </ul>
Expand All @@ -32,6 +36,7 @@ public String getActionType() {
/**
* Action merchants needs to take in the online payment process. Possible values are:<br>
* <ul><li>REDIRECT - The consumer needs to be redirected using the details found in <span class="property">redirectData</span>
* <li>SHOW_FORM - The consumer needs to be shown a form with the fields found in <span class="property">formFields</span>. You can submit the data entered by the user in a <a href="https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/java/payments/complete.html">Complete payment</a> request
* <li>SHOW_INSTRUCTIONS - The consumer needs to be shown payment instruction using the details found in <span class="property">showData</span>. Alternatively the instructions can be rendered by us using the <span class="property">instructionsRenderingData</span>
* <li>SHOW_TRANSACTION_RESULTS - The consumer needs to be shown the transaction results using the details found in <span class="property">showData</span>. Alternatively the instructions can be rendered by us using the <span class="property">instructionsRenderingData</span>
* </ul>
Expand All @@ -40,6 +45,20 @@ public void setActionType(String value) {
this.actionType = value;
}

/**
* Populated only when the <span class="property">actionType</span> of the <span class="property">merchantAction</span> is SHOW_FORM. In this case, this field contains the list of fields to render, in the format that is also used in the response of <a href="https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/java/products/get.html">Get payment product</a>.
*/
public List<PaymentProductField> getFormFields() {
return formFields;
}

/**
* Populated only when the <span class="property">actionType</span> of the <span class="property">merchantAction</span> is SHOW_FORM. In this case, this field contains the list of fields to render, in the format that is also used in the response of <a href="https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/java/products/get.html">Get payment product</a>.
*/
public void setFormFields(List<PaymentProductField> value) {
this.formFields = value;
}

/**
* Object containing all data needed to redirect the consumer
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class MobilePaymentMethodSpecificInput extends AbstractPaymentMethodSpeci

/**
* Determines the type of the authorization that will be used. Allowed values:
* <ul><li>FINAL_AUTHORISATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORISATION - The payment creation results in a pre-authorisation that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* <ul><li>FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* </ul>
* Only used with some acquirers, ingnored for acquirers that don't support this. In case the acquirer doesn't allow this to be specified the <span class="property">authorizationMode</span> is 'unspecified', which behaves similar to a final authorization.
*/
Expand All @@ -35,8 +35,8 @@ public String getAuthorizationMode() {

/**
* Determines the type of the authorization that will be used. Allowed values:
* <ul><li>FINAL_AUTHORISATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORISATION - The payment creation results in a pre-authorisation that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* <ul><li>FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can't be reversed and need to be captured for the full amount within 7 days.
* <li>PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.
* </ul>
* Only used with some acquirers, ingnored for acquirers that don't support this. In case the acquirer doesn't allow this to be specified the <span class="property">authorizationMode</span> is 'unspecified', which behaves similar to a final authorization.
*/
Expand Down
Loading

0 comments on commit 3184880

Please sign in to comment.