Panagiotis Triantafyllou

minor fix

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta75'
PUBLISH_VERSION = '4.5.4-cosbeta76'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -146,6 +146,16 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener {
WarpUtils.log("*************************************************");
if (response.has("result")) {
JSONObject obj = response.optJSONObject("result");
if (obj != null) {
if (obj.has("status") && obj.optString("status").equals("accepted")) {
mListener.onSuccess(response);
return;
}
}
}
if (response.has("code")) {
mListener.onSuccess(response);
return;
......@@ -168,7 +178,7 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener {
// Check for server related error.
int serverResult = response.optInt(WARPLY_STATUS);
if(serverResult == WarpConstants.RESULT_CODE_ERROR || serverResult == WarpConstants.RESULT_CODE_NO_ACCESS
if (serverResult == WarpConstants.RESULT_CODE_ERROR || serverResult == WarpConstants.RESULT_CODE_NO_ACCESS
|| serverResult == WarpConstants.RESULT_CODE_INVALID_CAMPAIGN) {
mListener.onSuccess(response);
return;
......