Skip to content

Commit

Permalink
Hotfix/Class wrongly cast (#103)
Browse files Browse the repository at this point in the history
* preventing java null pointer exception upon receiving event triggered from outside Xendit

* fix json conversion

* handle unbundled case

* update readme

* bug fixed

* fix wrong casting bug

* merging conflict
  • Loading branch information
stephenthajeb authored May 3, 2023
1 parent c461ead commit f56dd74
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 3.8.4 (2023-05-03)
- Bug Fix: Fix Wrong Casting Bug

## 3.8.3 (2023-05-03)
- Bug Fix: Redeploy

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ Maven:
<dependency>
<groupId>com.xendit</groupId>
<artifactId>xendit-android</artifactId>
<version>3.8.3</version>
<version>3.8.4</version>
<type>pom</type>
</dependency>
```

Gradle:
```
compile 'com.xendit:xendit-android:3.8.3'
compile 'com.xendit:xendit-android:3.8.4'
```

Ivy:
```
<dependency org='com.xendit' name='xendit-android' rev='3.8.3'>
<dependency org='com.xendit' name='xendit-android' rev='3.8.4'>
<artifact name='xendit-android' ext='pom' ></artifact>
</dependency>
```
Expand Down
4 changes: 2 additions & 2 deletions xendit-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

group 'com.xendit'
version '3.8.3'
version '3.8.4'

ext {
bintrayOrg = 'xendit'
Expand Down Expand Up @@ -36,7 +36,7 @@ android {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName '3.8.3'
versionName '3.8.4'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.xendit.Models.AuthenticatedToken;
import com.xendit.Models.Authentication;
import com.xendit.Models.Token;
import com.xendit.Models.XenditError;
Expand Down Expand Up @@ -46,7 +47,7 @@ public void onReceive(Context context, Intent intent) {
} else {
if (is3DSResultEventFromXendit(message)){
Gson gson = new Gson();
Authentication authentication = gson.fromJson(message, Authentication.class);
AuthenticatedToken authentication = gson.fromJson(message, AuthenticatedToken.class);
if (authentication.getStatus().equals("VERIFIED")) {
tokenCallback.onSuccess(new Token(authentication));
} else {
Expand Down

0 comments on commit f56dd74

Please sign in to comment.