Skip to content

Commit

Permalink
Amazon Pay API SDK (Java) 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Shangamesh T committed Apr 26, 2021
1 parent 6588224 commit 75ec450
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### Version 2.3.1 - April 2021
* Enabled character encoding UTF-8 when converting the body/payload to a string entity before sending HTTP/HTTPS request

#### Version 2.3.0 - March 2021
* Introduced Apache HTTPClient library for HTTPS/TCP communications which will allow SDK to work with latest versions of java
* Fixed Security risk
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ To use the SDK in a Maven project, add a <dependency> reference in your pom.xml
<dependency>
<groupId>software.amazon.pay</groupId>
<artifactId>amazon-pay-api-sdk-java</artifactId>
<version>2.3.0</version>
<version>2.3.1</version>
</dependency>
</dependencies>
```

To use the SDK in a Gradle project, add the following line to your build.gradle file::

```
implementation 'software.amazon.pay:amazon-pay-api-sdk-java:2.3.0'
implementation 'software.amazon.pay:amazon-pay-api-sdk-java:2.3.1'
```

For legacy projects, you can just grab the binary [jar file](https://github.com/amzn/amazon-pay-api-sdk-java/releases) from the GitHub Releases page.
Expand Down
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>software.amazon.pay</groupId>
<artifactId>amazon-pay-api-sdk-java</artifactId>
<packaging>jar</packaging>
<version>2.3.0</version>
<version>2.3.1</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/net.sf.json-lib/json-lib -->
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/com/amazon/pay/api/ServiceConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ServiceConstants {
public static final Map<Region, String> endpointMappings;
public static final Map<String, Integer> serviceErrors;

public static final String APPLICATION_LIBRARY_VERSION = "2.3.0";
public static final String APPLICATION_LIBRARY_VERSION = "2.3.1";
public static final String GITHUB_SDK_NAME = "amazon-pay-api-sdk-java";
public static final String AMAZON_PAY_API_VERSION = "v2";

Expand Down
8 changes: 4 additions & 4 deletions src/com/amazon/pay/api/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,21 +303,21 @@ public static HttpUriRequest getHttpUriRequest(final URI uri, final String httpM
return new HttpGet(uri);
case "POST":
final HttpPost httpPost = new HttpPost(uri);
httpPost.setEntity(new StringEntity(payload));
httpPost.setEntity(new StringEntity(payload, DEFAULT_ENCODING));
return httpPost;
case "PUT":
final HttpPut httpPut = new HttpPut(uri);
httpPut.setEntity(new StringEntity(payload));
httpPut.setEntity(new StringEntity(payload, DEFAULT_ENCODING));
return httpPut;
case "PATCH":
final HttpPatch httpPatch = new HttpPatch(uri);
httpPatch.setEntity(new StringEntity(payload));
httpPatch.setEntity(new StringEntity(payload, DEFAULT_ENCODING));
return httpPatch;
case "HEAD":
return new HttpHead(uri);
case "DELETE":
final HttpDeleteWithBody httpDeleteWithBody = new HttpDeleteWithBody(uri);
httpDeleteWithBody.setEntity(new StringEntity(payload));
httpDeleteWithBody.setEntity(new StringEntity(payload, DEFAULT_ENCODING));
return httpDeleteWithBody;
case "OPTIONS":
return new HttpOptions(uri);
Expand Down

0 comments on commit 75ec450

Please sign in to comment.