Skip to content

Commit c0e88c1

Browse files
author
Harvey Luong
committed
Fixed Subscription error
Bumped library version in pom.xml
1 parent c506e91 commit c0e88c1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

pom.xml

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

77
<groupId>com.paymentwall</groupId>
88
<artifactId>paymentwall-java</artifactId>
9-
<version>2.0.0</version>
9+
<version>2.0.2</version>
1010
<packaging>jar</packaging>
1111

1212
<name>Paymentwall java library</name>

src/main/java/com/paymentwall/java/response/Factory.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ else if (name.equals(RESPONSE_SECURE))
1919
}
2020

2121
public static String getClassName(JSONObject response) {
22+
if (response.isEmpty() || (response.containsKey(PROP_TYPE)
23+
&& response.get(PROP_TYPE).toString().equals(VALUE_ERROR))) {
24+
return RESPONSE_ERROR;
25+
} else if(response.containsKey(PROP_SECURE)) {
26+
return RESPONSE_SECURE;
27+
} else return RESPONSE_SUCCESS;
2228

23-
if(response.containsKey(PROP_OBJECT_CHARGE) && response.containsKey(PROP_CARD_NO))
29+
/*if(response.containsKey(PROP_OBJECT_CHARGE) && response.containsKey(PROP_CARD_NO))
2430
return RESPONSE_SUCCESS;
2531
else if(response.containsKey(PROP_SECURE))
2632
return RESPONSE_SECURE;
27-
else return RESPONSE_ERROR;
33+
else return RESPONSE_ERROR;*/
2834
}
2935
}

0 commit comments

Comments
 (0)