Skip to content

Commit 56dd949

Browse files
authored
Merge pull request #13 from bliblidotcom/fix-year-date-format
Fix invalid signature year date format
2 parents b179326 + 885510a commit 56dd949

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please feel free to relay your comments, suggestions or corrections through pull
1010
> You can get final JAR to import into your Java project by download it from urls below.
1111
> [Release note](https://github.com/bliblidotcom/seller-api-client-java/releases)
1212
13-
- v1.3.0-1 : https://github.com/bliblidotcom/seller-api-client-java/releases/tag/1.3.0-1
13+
- v1.3.0-2 : https://github.com/bliblidotcom/seller-api-client-java/releases/tag/1.3.0-2
1414
- v1.2.0-3 : https://github.com/bliblidotcom/seller-api-client-java/releases/tag/1.2.0-3
1515
- v1.1.0-1 : https://github.com/bliblidotcom/seller-api-client-java/releases/tag/1.1.0-1
1616

@@ -29,7 +29,7 @@ Please feel free to relay your comments, suggestions or corrections through pull
2929

3030
<!-- Set seller api client version -->
3131
<properties>
32-
<seller-api-client.version>1.2.0-3</seller-api-client.version>
32+
<seller-api-client.version>1.3.0-2</seller-api-client.version>
3333
</properties>
3434

3535
<!-- add blibli bintray repository -->

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.blibli.oss.sellerapi.client</groupId>
55
<artifactId>seller-api-client</artifactId>
6-
<version>1.2.0-1-SNAPSHOT</version>
6+
<version>1.3.0-2-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>seller-api-client</name>

src/main/java/com/blibli/oss/sellerapi/client/AppBasicAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void main(String[] args) {
2828
ApiConfig config = new ApiConfig();
2929
config.setApiClientId("mta-api-clientsdk-cc80f"); // your api client id
3030
config.setApiClientKey("mta-api-ySvFBOwPHTTBhccx89y2QxORSyFEesT55H2ws95fbPs8fsNV9y"); // your api client key
31-
config.setApiSellerKey("495930D13E51161331FB6423B048FB759B39E1573F90673F94558D727C04E917"); // your api seller key
31+
config.setApiSellerKey("A41E26889F09320010A3C65620627EEB5C8424E95ACD2F2FC39D00CA609B0464"); // your api seller key
3232
config.setSignatureKey("secret"); // put your secret key here to activate signature flow
3333
config.setBusinessPartnerCode("SDC-60001"); //your business partner code/merchant code
3434
config.setPlatformName("My Company Name"); //your company/platform name

src/main/java/com/blibli/oss/sellerapi/client/core/SignatureGenerator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import java.net.ProtocolException;
66
import java.net.URLEncoder;
77
import java.security.MessageDigest;
8-
import java.security.NoSuchAlgorithmException;
98
import java.text.SimpleDateFormat;
109
import java.util.Date;
1110
import java.util.Locale;
@@ -126,7 +125,7 @@ public void configTokenRequest(HttpURLConnection con, Integer timeout, String us
126125
}
127126

128127
private String generateRawSignature(Date date, String methodType, String url, Object body) {
129-
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zz YYYY",
128+
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zz yyyy",
130129
Locale.ENGLISH);
131130
dateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Jakarta"));
132131

0 commit comments

Comments
 (0)