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

Commit

Permalink
Release 5.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingenico ePayments committed Feb 13, 2017
1 parent fe9094d commit 3e1b97b
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 21 deletions.
79 changes: 70 additions & 9 deletions 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.1.0</version>
<version>5.2.0</version>
<packaging>jar</packaging>

<name>connect-sdk-java</name>
Expand All @@ -14,12 +14,12 @@

<organization>
<name>Ingenico ePayments</name>
<url>http://http://www.ingenico.com/epayments/</url>
<url>https://www.ingenico.com/epayments/</url>
</organization>

<licenses>
<license>
<name>Ingenico ePayments License</name>
<name>MIT</name>
<url>https://github.com/Ingenico-ePayments/connect-sdk-java/blob/master/LICENSE.txt</url>
</license>
</licenses>
Expand All @@ -29,14 +29,14 @@
<name>Ingenico ePayments</name>
<email>[email protected]</email>
<organization>Ingenico ePayments</organization>
<organizationUrl>http://http://www.ingenico.com/epayments/</organizationUrl>
<organizationUrl>https://www.ingenico.com/epayments/</organizationUrl>
</developer>
</developers>

<scm>
<connection>[email protected]:Ingenico-ePayments/connect-sdk-java.git</connection>
<developerConnection>[email protected]:Ingenico-ePayments/connect-sdk-java.git</developerConnection>
<url>git@github.com:Ingenico-ePayments/connect-sdk-java.git</url>
<connection>scm:git:[email protected]:Ingenico-ePayments/connect-sdk-java.git</connection>
<developerConnection>scm:git:[email protected]:Ingenico-ePayments/connect-sdk-java.git</developerConnection>
<url>https://github.com/Ingenico-ePayments/connect-sdk-java</url>
</scm>

<issueManagement>
Expand All @@ -56,15 +56,49 @@
<build>
<resources>
<resource>
<!-- add LICENSE.txt from the root as a resource, so it ends up in the JAR file's root -->
<directory>src/main/resources</directory>
</resource>
<resource>
<!-- add LICENSE.txt to META-INF -->
<directory>${basedir}</directory>
<filtering>false</filtering>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.txt</include>
</includes>
</resource>
</resources>


<pluginManagement>
<plugins>
<!-- this plugin is required to make Eclipse lifecycle errors disappear -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -139,6 +173,10 @@
<configuration>
<docencoding>UTF-8</docencoding>
<splitindex>true</splitindex>
<links>
<!-- Use an HTTPS URL to the JSE docs -->
<link>https://docs.oracle.com/javase/7/docs/api/</link>
</links>
<archive>
<manifestEntries>
<Specification-Title>${project.name}</Specification-Title>
Expand All @@ -155,6 +193,29 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy todir="${project.build.directory}/apidocs/META-INF">
<fileset dir="${basedir}">
<include name="LICENSE.txt" />
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void example() throws URISyntaxException, IOException {
item2AmountOfMoney.setCurrencyCode("EUR");

LineItemInvoiceData item2InvoiceData = new LineItemInvoiceData();
item2InvoiceData.setDescription("Asperin");
item2InvoiceData.setDescription("Aspirin");
item2InvoiceData.setNrOfItems("12");
item2InvoiceData.setPricePerItem(40L);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public void test() throws URISyntaxException, IOException {
try {
ServicesClient services = client.merchant("9991").services();

Assert.assertTrue(services instanceof ServicesClient);
CommunicatorConfiguration configuration = getCommunicatorConfigurationWithProxy();
Assert.assertNotNull(configuration.getProxyConfiguration());
assertProxySet(services, configuration.getProxyConfiguration());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class PaymentProduct {

private Boolean autoTokenized = null;

private Boolean canBeIframed = null;

private PaymentProductDisplayHints displayHints = null;

private List<PaymentProductField> fields = null;
Expand Down Expand Up @@ -72,6 +74,14 @@ public void setAutoTokenized(Boolean value) {
this.autoTokenized = value;
}

public Boolean getCanBeIframed() {
return canBeIframed;
}

public void setCanBeIframed(Boolean value) {
this.canBeIframed = value;
}

public PaymentProductDisplayHints getDisplayHints() {
return displayHints;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public class MetaDataProvider {

private static final String SDK_VERSION = "5.1.0";
private static final String SDK_VERSION = "5.2.0";

private static final String SERVER_META_INFO_HEADER = "X-GCS-ServerMetaInfo";
static final Set<String> PROHIBITED_HEADERS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
import org.apache.http.util.EntityUtils;

import com.ingenico.connect.gateway.sdk.java.CommunicationException;
import com.ingenico.connect.gateway.sdk.java.Connection;
import com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration;
import com.ingenico.connect.gateway.sdk.java.Connection;
import com.ingenico.connect.gateway.sdk.java.PooledConnection;
import com.ingenico.connect.gateway.sdk.java.ProxyConfiguration;
import com.ingenico.connect.gateway.sdk.java.RequestHeader;
Expand Down Expand Up @@ -360,7 +360,7 @@ private void logResponse(final HttpResponse response, final String requestId, fi

} catch (Exception e) {

logger.log(String.format("An error occurred trying to log request '%s'", requestId), e);
logger.log(String.format("An error occurred trying to log response '%s'", requestId), e);
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,9 +633,9 @@ private String assertRequest(String requestMessage, String resourcePrefix) throw

final String requestResource = resourcePrefix + ".request";

Pattern requestPattern = Pattern.compile(readResource(requestResource), Pattern.DOTALL);
Pattern requestPattern = Pattern.compile(normalizeLineBreaks(readResource(requestResource)), Pattern.DOTALL);

Matcher requestMatcher = requestPattern.matcher(requestMessage);
Matcher requestMatcher = requestPattern.matcher(normalizeLineBreaks(requestMessage));
Assert.assertTrue("request message '" + requestMessage + "' does not match pattern " + requestPattern, requestMatcher.matches());

String requestId = requestMatcher.group(1);
Expand All @@ -650,9 +650,9 @@ private String assertResponse(String responseMessage, String resourcePrefix) thr
private String assertResponse(String responseMessage, String resourcePrefix, String requestId) throws IOException {

final String responseResource = resourcePrefix + ".response";
Pattern responsePattern = Pattern.compile(readResource(responseResource), Pattern.DOTALL);
Pattern responsePattern = Pattern.compile(normalizeLineBreaks(readResource(responseResource)), Pattern.DOTALL);

Matcher responseMatcher = responsePattern.matcher(responseMessage);
Matcher responseMatcher = responsePattern.matcher(normalizeLineBreaks(responseMessage));
Assert.assertTrue("response message '" + responseMessage + "' does not match pattern " + responsePattern, responseMatcher.matches());

String responseRequestId = responseMatcher.group(1);
Expand All @@ -673,9 +673,9 @@ private String assertError(String errorMessage) throws IOException {
private String assertError(String errorMessage, String requestId) throws IOException {

final String errorResource = "generic.error";
Pattern errorPattern = Pattern.compile(readResource(errorResource), Pattern.DOTALL);
Pattern errorPattern = Pattern.compile(normalizeLineBreaks(readResource(errorResource)), Pattern.DOTALL);

Matcher errorMatcher = errorPattern.matcher(errorMessage);
Matcher errorMatcher = errorPattern.matcher(normalizeLineBreaks(errorMessage));
Assert.assertTrue("error message '" + errorMessage + "' does not match pattern " + errorPattern, errorMatcher.matches());

String errorRequestId = errorMatcher.group(1);
Expand All @@ -687,7 +687,6 @@ private String assertError(String errorMessage, String requestId) throws IOExcep
}

return requestId;

}

// Mockito answer utility methods
Expand Down Expand Up @@ -846,6 +845,12 @@ private String readResource(String resource) throws IOException {
return result.toString();
}

private String normalizeLineBreaks(String value) {
// Normalize line breaks to always use the same, regardless of the operating system
// See https://github.com/Ingenico-ePayments/connect-sdk-java/issues/3
return value.replace("\r", "");
}

private static final class TestLogger implements CommunicatorLogger {

private List<TestLoggerEntry> entries = new ArrayList<DefaultConnectionLoggerTest.TestLoggerEntry>();
Expand Down

0 comments on commit 3e1b97b

Please sign in to comment.