OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 b.java 源代码,内容仅作参考
package com.excelliance.kxqp.task.store;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import com.alipay.sdk.util.l;
import com.android.spush.util.WebActionRouter;
import com.excean.ggspace.main.R;
import com.excelliance.kxqp.bean.AppBuyBean;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.gaccount.GGAccBean;
import com.excelliance.kxqp.gs.ui.googlecard.bean.CardReginBean;
import com.excelliance.kxqp.gs.util.ab;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.gs.util.be;
import com.excelliance.kxqp.gs.util.bf;
import com.excelliance.kxqp.gs.util.bx;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.task.model.AccountItem;
import com.excelliance.kxqp.task.model.AddressItem;
import com.excelliance.kxqp.task.model.AliOrderItem;
import com.excelliance.kxqp.task.model.BuyGoogleAccountSupportPayResult;
import com.excelliance.kxqp.task.model.CategoryItem;
import com.excelliance.kxqp.task.model.DiamondCostResult;
import com.excelliance.kxqp.task.model.FlowItem;
import com.excelliance.kxqp.task.model.GoodsDetail;
import com.excelliance.kxqp.task.model.PayItem;
import com.excelliance.kxqp.task.model.PriceItem;
import com.excelliance.kxqp.task.model.ResponseData;
import com.excelliance.kxqp.task.model.StoreRecordItem;
import com.excelliance.kxqp.task.model.StoreUserInfo;
import com.excelliance.kxqp.task.model.WechatOrderItem;
import com.excelliance.kxqp.task.model.YLBuyStatusResult;
import com.excelliance.kxqp.task.model.request.AddressRequestData;
import com.excelliance.kxqp.task.model.request.BranchRequestData;
import com.excelliance.kxqp.task.model.request.BuyCardRequestData;
import com.excelliance.kxqp.task.model.request.BuyGoogleAccountStatusData;
import com.excelliance.kxqp.task.model.request.BuyRequestData;
import com.excelliance.kxqp.task.model.request.CategoryRequestData;
import com.excelliance.kxqp.task.model.request.DetailRequestData;
import com.excelliance.kxqp.task.model.request.FlowRequestData;
import com.excelliance.kxqp.task.model.request.GoodsRequestData;
import com.excelliance.kxqp.task.model.request.PayRequestData;
import com.excelliance.kxqp.task.model.request.RecordRequestData;
import com.excelliance.kxqp.task.model.request.RequestData;
import com.excelliance.kxqp.task.model.request.SignRequestData;
import com.excelliance.kxqp.task.model.request.UserIdRequestData;
import com.excelliance.kxqp.util.ae;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
public class b {
private static volatile b f13320a;
private Context f13321b;
private Gson c;
private String d;
public static b a(Context context) {
if (f13320a == null) {
synchronized (b.class) {
if (f13320a == null) {
f13320a = new b(context.getApplicationContext());
}
}
}
return f13320a;
}
private b(Context context) {
this.f13321b = context;
this.d = context.getString(R.string.server_wrong);
}
private String f() {
this.d = com.excelliance.kxqp.swipe.a.a.getString(this.f13321b, bf.e(this.f13321b) ? "server_wrong" : "net_unusable");
return this.d;
}
private synchronized Gson g() {
if (this.c == null) {
this.c = new Gson();
}
return this.c;
}
public ResponseData<StoreUserInfo> a() {
UserIdRequestData userIdRequestData;
String str;
String str2;
ResponseData<StoreUserInfo> responseData;
String b2 = c.b(this.f13321b);
ResponseData<StoreUserInfo> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
userIdRequestData = (UserIdRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<UserIdRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
userIdRequestData = null;
}
if (userIdRequestData == null) {
userIdRequestData = new UserIdRequestData(b2);
} else {
userIdRequestData.setData(b2);
}
be d = bd.d("http://api.ourplay.com.cn/task/user", g().a(userIdRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
if (str != null) {
try {
str2 = c.b(str);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getUserData:" + e2.toString());
str2 = null;
}
if (str2 != null) {
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<StoreUserInfo>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getUserData:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<List<PriceItem>> a(String str, int i, int i2) {
return a(str, "2", "4", i, i2, "/store/index");
}
private ResponseData<List<PriceItem>> a(String str, String str2, String str3, int i, int i2, String str4) {
GoodsRequestData goodsRequestData;
String str5;
String str6;
ResponseData<List<PriceItem>> responseData;
ResponseData<List<PriceItem>> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
goodsRequestData = (GoodsRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<GoodsRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
goodsRequestData = null;
}
if (goodsRequestData == null) {
goodsRequestData = new GoodsRequestData(str, str2, str3, i, i2);
} else {
goodsRequestData.setData(str, str2, str3, i, i2);
}
be d = bd.d("http://api.ourplay.com.cn" + str4, g().a(goodsRequestData));
if (d != null) {
str5 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str5 = null;
}
if (str5 != null) {
try {
str6 = c.b(str5);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getPriceList:" + e2.toString());
str6 = null;
}
if (str6 != null) {
try {
responseData = (ResponseData) g().a(str6, new TypeToken<ResponseData<List<PriceItem>>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getPriceList:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<List<CategoryItem>> a(String str, String str2) {
CategoryRequestData categoryRequestData;
String str3;
String str4;
ResponseData<List<CategoryItem>> responseData;
ResponseData<List<CategoryItem>> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
categoryRequestData = (CategoryRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<CategoryRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
categoryRequestData = null;
}
if (categoryRequestData == null) {
categoryRequestData = new CategoryRequestData(str, str2);
} else {
categoryRequestData.setData(str, str2);
}
be d = bd.d("http://api.ourplay.com.cn/store/category", g().a(categoryRequestData));
if (d != null) {
str3 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str3 = null;
}
if (str3 != null) {
try {
str4 = c.b(str3);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getCategoryList:" + e2.toString());
str4 = null;
}
if (str4 != null) {
try {
responseData = (ResponseData) g().a(str4, new TypeToken<ResponseData<List<CategoryItem>>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getCategoryList:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<List<PriceItem>> a(String str, String str2, int i, int i2) {
return a(str, "1", str2, i, i2, "/store/index");
}
public ResponseData<List<PriceItem>> b(String str, int i, int i2) {
return a(str, "3", "0", i, i2, "/store/index");
}
public ResponseData<PayItem> a(String str, int i, int i2, String str2) {
return a(str, i, i2, 1, str2);
}
public ResponseData<PayItem> a(String str, int i, int i2, int i3, String str2) {
PayRequestData payRequestData;
String str3;
String str4;
ResponseData<PayItem> responseData;
String b2 = c.b(this.f13321b);
ResponseData<PayItem> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
JSONObject i4 = cn.i(this.f13321b);
try {
i4.put("isAct", ae.a(this.f13321b));
i4.put("coupon_id", str2);
payRequestData = (PayRequestData) g().a(i4.toString(), new TypeToken<PayRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
payRequestData = null;
}
if (payRequestData == null) {
payRequestData = new PayRequestData(b2, str, String.valueOf(i), String.valueOf(i2), String.valueOf(i3));
} else {
payRequestData.setData(b2, str, String.valueOf(i), String.valueOf(i2), String.valueOf(i3));
}
be d = bd.d("http://api.ourplay.com.cn/pay/order/create", g().a(payRequestData));
if (d != null) {
str3 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str3 = null;
}
if (str3 != null) {
try {
str4 = c.b(str3);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyDiamond:" + e2.toString());
str4 = null;
}
if (str4 != null) {
try {
responseData = (ResponseData) g().a(str4, new TypeToken<ResponseData<PayItem>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyWithMoney:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<PayItem> c(String str, int i, int i2) {
PayRequestData payRequestData;
String str2;
String str3;
ResponseData<PayItem> responseData;
String b2 = c.b(this.f13321b);
ResponseData<PayItem> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
JSONObject i3 = cn.i(this.f13321b);
try {
i3.put("isAct", ae.a(this.f13321b));
payRequestData = (PayRequestData) g().a(i3.toString(), new TypeToken<PayRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
payRequestData = null;
}
if (payRequestData == null) {
payRequestData = new PayRequestData(b2, String.valueOf(1), String.valueOf(i), String.valueOf(i2), String.valueOf(1), str);
} else {
payRequestData.setData(b2, String.valueOf(1), String.valueOf(i), String.valueOf(i2), String.valueOf(1), str);
}
String a2 = g().a(payRequestData);
az.d("StoreRepository", "checkOrderApp requestDataString: " + a2);
be d = bd.d("http://api.ourplay.com.cn/pay/order/create", a2);
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str2 = null;
}
if (str2 != null) {
try {
str3 = c.b(str2);
} catch (Exception e2) {
e = e2;
str3 = null;
}
try {
az.d("StoreRepository", "checkOrderApp response: " + str3);
} catch (Exception e3) {
e = e3;
e.printStackTrace();
Log.e("StoreRepository", "StoreRepository/checkOrderApp:" + e.toString());
if (str3 != null) {
}
return responseData2;
}
if (str3 != null) {
try {
responseData = (ResponseData) g().a(str3, new TypeToken<ResponseData<PayItem>>() {
}.getType());
} catch (Exception e4) {
e4.printStackTrace();
Log.e("StoreRepository", "StoreRepository/checkOrderApp:" + e4.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<PayItem> a(String str, int i, int i2, int i3, String str2, String str3) {
PayRequestData payRequestData;
String str4;
String str5;
ResponseData<PayItem> responseData;
String b2 = c.b(this.f13321b);
ResponseData<PayItem> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
JSONObject i4 = cn.i(this.f13321b);
try {
i4.put("isAct", ae.a(this.f13321b));
i4.put("coupon_id", str3);
payRequestData = (PayRequestData) g().a(i4.toString(), new TypeToken<PayRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
payRequestData = null;
}
if (payRequestData == null) {
payRequestData = new PayRequestData(b2, str, String.valueOf(i), String.valueOf(i2), String.valueOf(i3));
payRequestData.vtype = str2;
} else {
payRequestData.setData(b2, str, String.valueOf(i), String.valueOf(i2), String.valueOf(i3));
payRequestData.vtype = str2;
}
String a2 = g().a(payRequestData);
az.d("StoreRepository", "checkOrderYL requestDataString: " + a2);
be d = bd.d(i == 3 ? "http://api.ourplay.com.cn/pay/unipay/create" : "http://api.ourplay.com.cn/pay/unipayali/create", a2);
if (d != null) {
str4 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str4 = null;
}
az.d("StoreRepository", "checkOrderYL rawResponse: " + str4);
if (str4 != null) {
try {
str5 = c.b(str4);
} catch (Exception e2) {
e = e2;
str5 = null;
}
try {
az.d("StoreRepository", "checkOrderYL response: " + str5);
} catch (Exception e3) {
e = e3;
e.printStackTrace();
Log.e("StoreRepository", "StoreRepository/checkOrderYL:" + e.toString());
if (str5 != null) {
}
return responseData2;
}
if (str5 != null) {
try {
responseData = (ResponseData) g().a(str5, new TypeToken<ResponseData<PayItem>>() {
}.getType());
} catch (Exception e4) {
e4.printStackTrace();
Log.e("StoreRepository", "StoreRepository/checkOrderYL:" + e4.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public void a(final String str, final com.excelliance.kxqp.gs.newappstore.c.a aVar) {
this.f13321b.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT < 11 ? 0 : 4);
if (!bx.a().b(this.f13321b)) {
aVar.a("");
} else if (!bf.e(this.f13321b)) {
aVar.a("");
} else {
tp.f(new Runnable() {
@Override
public void run() {
JSONObject i = cn.i(b.this.f13321b);
try {
i.put(WebActionRouter.KEY_PKG, str);
} catch (JSONException e) {
e.printStackTrace();
}
az.d("StoreRepository", " queryAppBuy requestParams: " + i);
be d = bd.d("https://api.ourplay.com.cn/rank/appcheck", i.toString());
String str2 = d != null ? d.c : null;
if (!cd.a(str2)) {
String a2 = cn.a(str2);
az.d("StoreRepository", " queryAppBuy result: " + a2);
try {
JSONObject jSONObject = new JSONObject(a2);
int optInt = jSONObject.optInt("code");
az.d("StoreRepository", "queryAppBuy code" + optInt);
if (optInt == 0) {
JSONObject optJSONObject = jSONObject.optJSONObject("data");
if (optJSONObject != null) {
if (optJSONObject.optInt(l.c) == 1) {
String optString = optJSONObject.optString(WebActionRouter.KEY_PKG);
String optString2 = optJSONObject.optString("rid");
String optString3 = optJSONObject.optString("name");
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put(WebActionRouter.KEY_PKG, optString);
jSONObject2.put("name", optString3);
jSONObject2.put("rid", optString2);
if (optString != null && optString2 != null) {
AppBuyBean appBuyBean = new AppBuyBean();
appBuyBean.packageName = optString;
appBuyBean.detail = ab.c(jSONObject2.toString(), "keics_e21p3kds8s");
ArrayList arrayList = new ArrayList();
arrayList.add(appBuyBean);
com.excelliance.kxqp.gs.newappstore.b.a.a().a(arrayList, b.this.f13321b, 1);
aVar.a(appBuyBean);
} else {
aVar.a("");
}
} else {
aVar.a("");
}
} else {
aVar.a("");
}
} else {
aVar.a("");
}
return;
} catch (JSONException e2) {
aVar.a("");
az.d("StoreRepository", "queryAppBuy json fail" + e2);
e2.printStackTrace();
return;
}
}
aVar.a("");
az.d("StoreRepository", "queryAppBuy is null");
}
});
}
}
private ResponseData d(String str, String str2, String str3) {
BuyRequestData buyRequestData;
String str4;
String str5;
ResponseData responseData;
String b2 = c.b(this.f13321b);
ResponseData responseData2 = new ResponseData();
responseData2.code = -1;
responseData2.msg = f();
try {
buyRequestData = (BuyRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<BuyRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
buyRequestData = null;
}
if (buyRequestData == null) {
buyRequestData = new BuyRequestData(b2, str2, str);
} else {
buyRequestData.setData(b2, str2, str);
}
be d = bd.d("http://api.ourplay.com.cn" + str3, g().a(buyRequestData));
if (d != null) {
str4 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str4 = null;
}
if (str4 != null) {
try {
str5 = c.b(str4);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyWithCoin:" + e2.toString());
str5 = null;
}
if (str5 != null) {
try {
responseData = (ResponseData) g().a(str5, new TypeToken<ResponseData>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyWithCoin:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
private ResponseData<DiamondCostResult> e(String str, String str2, String str3) {
BuyRequestData buyRequestData;
String str4;
String str5;
ResponseData<DiamondCostResult> responseData;
String b2 = c.b(this.f13321b);
ResponseData<DiamondCostResult> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
buyRequestData = (BuyRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<BuyRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
buyRequestData = null;
}
if (buyRequestData == null) {
buyRequestData = new BuyRequestData(b2, str2, str);
} else {
buyRequestData.setData(b2, str2, str);
}
be d = bd.d("http://api.ourplay.com.cn" + str3, g().a(buyRequestData));
if (d != null) {
str4 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str4 = null;
}
if (str4 != null) {
try {
str5 = c.b(str4);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyWithDiamond:" + e2.toString());
str5 = null;
}
if (str5 != null) {
try {
responseData = (ResponseData) g().a(str5, new TypeToken<ResponseData<DiamondCostResult>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyWithDiamond:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData b(String str, String str2) {
return d(str, str2, "/store/kbbuy");
}
public ResponseData<List<StoreRecordItem>> a(int i, int i2) {
RecordRequestData recordRequestData;
String str;
String str2;
ResponseData<List<StoreRecordItem>> responseData;
String b2 = c.b(this.f13321b);
ResponseData<List<StoreRecordItem>> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
recordRequestData = (RecordRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<RecordRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
recordRequestData = null;
}
if (recordRequestData == null) {
recordRequestData = new RecordRequestData(b2, i, i2);
} else {
recordRequestData.setData(b2, i, i2);
}
be d = bd.d("http://api.ourplay.com.cn/store/kborder", g().a(recordRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
if (str != null) {
try {
str2 = c.b(str);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getStoreRecordList:" + e2.toString());
str2 = null;
}
if (str2 != null) {
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<List<StoreRecordItem>>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getStoreRecordList:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData a(String str) {
FlowRequestData flowRequestData;
String str2;
String str3;
ResponseData responseData;
ResponseData responseData2 = new ResponseData();
responseData2.code = -1;
responseData2.msg = f();
try {
flowRequestData = (FlowRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<FlowRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
flowRequestData = null;
}
if (flowRequestData == null) {
flowRequestData = new FlowRequestData(str);
} else {
flowRequestData.setData(str);
}
be d = bd.d("http://api.ourplay.com.cn/store/myinfo", g().a(flowRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str2 = null;
}
if (str2 != null) {
try {
str3 = c.b(str2);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getFlowData:" + e2.toString());
str3 = null;
}
if (str3 != null) {
try {
responseData = (ResponseData) g().a(str3, new TypeToken<ResponseData<FlowItem>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getFlowData:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<GoodsDetail> b(String str) {
DetailRequestData detailRequestData;
String str2;
String str3;
ResponseData<GoodsDetail> responseData;
ResponseData<GoodsDetail> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
detailRequestData = (DetailRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<DetailRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("StoreRepository", e.toString());
detailRequestData = null;
}
if (detailRequestData == null) {
detailRequestData = new DetailRequestData(str);
} else {
detailRequestData.setData(str);
}
be d = bd.d("http://api.ourplay.com.cn/store/goodsdetail", g().a(detailRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str2 = null;
}
if (str2 != null) {
try {
str3 = c.b(str2);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getGoodsDetail:" + e2.toString());
str3 = null;
}
if (str3 != null) {
try {
responseData = (ResponseData) g().a(str3, new TypeToken<ResponseData<GoodsDetail>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getGoodsDetail:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<DiamondCostResult> c(String str) {
return e(str, null, "/store/vipbuy");
}
public ResponseData<AddressItem> b() {
UserIdRequestData userIdRequestData;
String str;
String str2;
ResponseData<AddressItem> responseData;
String b2 = c.b(this.f13321b);
ResponseData<AddressItem> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
userIdRequestData = (UserIdRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<UserIdRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("StoreRepository", e.toString());
userIdRequestData = null;
}
if (userIdRequestData == null) {
userIdRequestData = new UserIdRequestData(b2);
} else {
userIdRequestData.setData(b2);
}
be d = bd.d("http://api.ourplay.com.cn/store/mailmsg", g().a(userIdRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
if (str != null) {
try {
str2 = c.b(str);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getBindingAddress:" + e2.toString());
str2 = null;
}
if (str2 != null) {
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<AddressItem>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getBindingAddress:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<WechatOrderItem> a(String str, String str2, String str3) {
SignRequestData signRequestData;
String str4;
String str5;
ResponseData<WechatOrderItem> responseData;
String b2 = c.b(this.f13321b);
ResponseData<WechatOrderItem> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
signRequestData = (SignRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<SignRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
signRequestData = null;
}
if (signRequestData == null) {
signRequestData = new SignRequestData(b2, str, str2, str3);
} else {
signRequestData.setData(b2, str, str2, str3);
}
be d = bd.d("http://api.ourplay.com.cn/pay/wepay", g().a(signRequestData));
if (d != null) {
str4 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str4 = null;
}
if (str4 != null) {
try {
str5 = c.b(str4);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getWechatOrder:" + e2.toString());
str5 = null;
}
if (str5 != null) {
try {
responseData = (ResponseData) g().a(str5, new TypeToken<ResponseData<WechatOrderItem>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getWechatOrder:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<AliOrderItem> b(String str, String str2, String str3) {
SignRequestData signRequestData;
String str4;
String str5;
ResponseData<AliOrderItem> responseData;
String b2 = c.b(this.f13321b);
ResponseData<AliOrderItem> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
signRequestData = (SignRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<SignRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
signRequestData = null;
}
if (signRequestData == null) {
signRequestData = new SignRequestData(b2, str, str2, str3);
} else {
signRequestData.setData(b2, str, str2, str3);
}
be d = bd.d("http://api.ourplay.com.cn/pay/alipay", g().a(signRequestData));
if (d != null) {
str4 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str4 = null;
}
if (str4 != null) {
try {
str5 = c.b(str4);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getAliSign:" + e2.toString());
str5 = null;
}
if (str5 != null) {
try {
responseData = (ResponseData) g().a(str5, new TypeToken<ResponseData<AliOrderItem>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getAliSign:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData c(String str, String str2, String str3) {
AddressRequestData addressRequestData;
String str4;
String str5;
ResponseData responseData;
String b2 = c.b(this.f13321b);
ResponseData responseData2 = new ResponseData();
responseData2.code = -1;
responseData2.msg = f();
try {
addressRequestData = (AddressRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<AddressRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
addressRequestData = null;
}
if (addressRequestData == null) {
addressRequestData = new AddressRequestData(b2, str, str2, str3);
} else {
addressRequestData.setData(b2, str, str2, str3);
}
be d = bd.d("http://api.ourplay.com.cn/store/mailset", g().a(addressRequestData));
if (d != null) {
str4 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str4 = null;
}
if (str4 != null) {
try {
str5 = c.b(str4);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/bindingAddress:" + e2.toString());
str5 = null;
}
if (str5 != null) {
try {
responseData = (ResponseData) g().a(str5, new TypeToken<ResponseData>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/bindingAddress:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<DiamondCostResult> b(int i, int i2) {
BuyCardRequestData buyCardRequestData;
String str;
String str2;
ResponseData<DiamondCostResult> responseData;
String b2 = c.b(this.f13321b);
ResponseData<DiamondCostResult> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
buyCardRequestData = (BuyCardRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<BuyCardRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
buyCardRequestData = null;
}
if (buyCardRequestData == null) {
buyCardRequestData = new BuyCardRequestData(b2, String.valueOf(i2), String.valueOf(i), null);
} else {
buyCardRequestData.setData(b2, String.valueOf(i2), String.valueOf(i), null);
}
be d = bd.d("http://api.ourplay.com.cn/store/cardbuy", g().a(buyCardRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
if (str != null) {
try {
str2 = c.b(str);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyGoogleCard:" + e2.toString());
str2 = null;
}
if (str2 != null) {
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<DiamondCostResult>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyGoogleCard:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<List<CardReginBean>> c() {
UserIdRequestData userIdRequestData;
String str;
String str2;
ResponseData<List<CardReginBean>> responseData;
String b2 = c.b(this.f13321b);
ResponseData<List<CardReginBean>> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
userIdRequestData = (UserIdRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<UserIdRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
userIdRequestData = null;
}
if (userIdRequestData == null) {
userIdRequestData = new UserIdRequestData(b2);
} else {
userIdRequestData.setData(b2);
}
be d = bd.d("http://api.ourplay.com.cn/store/cardindex", g().a(userIdRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
if (str != null) {
try {
str2 = c.b(str);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getCardData:" + e2.toString());
str2 = null;
}
if (str2 != null) {
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<List<CardReginBean>>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getCardData:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<GGAccBean> d() {
BranchRequestData branchRequestData;
String str;
String str2;
ResponseData responseData;
String b2 = c.b(this.f13321b);
ResponseData<GGAccBean> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
branchRequestData = (BranchRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<BranchRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
branchRequestData = null;
}
if (branchRequestData == null) {
branchRequestData = new BranchRequestData("1", b2);
} else {
branchRequestData.setData("1", b2);
}
be d = bd.d("http://api.ourplay.com.cn/store/ggaccindex", g().a(branchRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
if (str != null) {
try {
str2 = c.b(str);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getGAccountData:" + e2.toString());
str2 = null;
}
if (str2 != null) {
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<AccountItem>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/getGAccountData:" + e3.toString());
responseData = null;
}
if (responseData != null) {
?? gGAccBean = new GGAccBean();
double d2 = 0.0d;
try {
d2 = Double.valueOf(((AccountItem) responseData.data).price).doubleValue();
} catch (Exception e4) {
e4.printStackTrace();
}
gGAccBean.setMoney(d2);
int intValue = Integer.valueOf(((AccountItem) responseData.data).num).intValue();
gGAccBean.setPermax(intValue);
gGAccBean.setTotalmax(intValue);
gGAccBean.setTotalNum(1);
gGAccBean.setThreshold(0);
responseData2.code = responseData.code;
responseData2.msg = responseData.msg;
responseData2.data = gGAccBean;
}
}
}
return responseData2;
}
public ResponseData<DiamondCostResult> a(int i) {
BuyCardRequestData buyCardRequestData;
String str;
String str2;
ResponseData<DiamondCostResult> responseData;
String b2 = c.b(this.f13321b);
ResponseData<DiamondCostResult> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
buyCardRequestData = (BuyCardRequestData) g().a(cn.i(this.f13321b).toString(), new TypeToken<BuyCardRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
buyCardRequestData = null;
}
if (buyCardRequestData == null) {
buyCardRequestData = new BuyCardRequestData(b2, String.valueOf(i), null, "1");
} else {
buyCardRequestData.setData(b2, String.valueOf(i), null, "1");
}
be d = bd.d("http://api.ourplay.com.cn/store/ggaccbuy", g().a(buyCardRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
if (str != null) {
try {
str2 = c.b(str);
} catch (Exception e2) {
e2.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyAccount:" + e2.toString());
str2 = null;
}
if (str2 != null) {
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<DiamondCostResult>>() {
}.getType());
} catch (Exception e3) {
e3.printStackTrace();
Log.e("StoreRepository", "StoreRepository/buyAccount:" + e3.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
}
return responseData2;
}
public ResponseData<YLBuyStatusResult> a(Context context, String str, int i) {
BuyGoogleAccountStatusData buyGoogleAccountStatusData;
String str2;
String str3;
ResponseData<YLBuyStatusResult> responseData;
ResponseData<YLBuyStatusResult> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
try {
buyGoogleAccountStatusData = (BuyGoogleAccountStatusData) g().a(cn.i(this.f13321b).toString(), new TypeToken<BuyCardRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
buyGoogleAccountStatusData = null;
}
if (buyGoogleAccountStatusData == null) {
buyGoogleAccountStatusData = new BuyGoogleAccountStatusData();
}
buyGoogleAccountStatusData.merOrderId = str;
buyGoogleAccountStatusData.payMethod = i;
String a2 = g().a(buyGoogleAccountStatusData);
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuyStatus requestDataString:" + a2);
be d = bd.d("http://api.ourplay.com.cn/pay/unipay/query", a2);
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str2 = null;
}
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuyStatus rawResponse:" + str2);
if (str2 == null) {
return responseData2;
}
try {
str3 = c.b(str2);
} catch (Exception e2) {
e = e2;
str3 = null;
}
try {
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuyStatus response:" + str3);
} catch (Exception e3) {
e = e3;
e.printStackTrace();
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuyStatus:" + e.toString());
if (str3 != null) {
}
}
if (str3 != null) {
return responseData2;
}
try {
responseData = (ResponseData) g().a(str3, new TypeToken<ResponseData<YLBuyStatusResult>>() {
}.getType());
} catch (Exception e4) {
e4.printStackTrace();
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuyStatus:" + e4.toString());
responseData = null;
}
return responseData != null ? responseData : responseData2;
}
public ResponseData<BuyGoogleAccountSupportPayResult> e() {
RequestData requestData;
String str;
String str2;
ResponseData<BuyGoogleAccountSupportPayResult> responseData;
ResponseData<BuyGoogleAccountSupportPayResult> responseData2 = new ResponseData<>();
responseData2.code = -1;
responseData2.msg = f();
JSONObject i = cn.i(this.f13321b);
try {
i.put("type", String.valueOf(4));
requestData = (RequestData) g().a(i.toString(), new TypeToken<PayRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("StoreRepository", e.toString());
requestData = null;
}
if (requestData == null) {
requestData = new BuyGoogleAccountStatusData();
}
String a2 = g().a(requestData);
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuySupportPayList requestDataString:" + a2);
be d = bd.d("http://api.ourplay.com.cn/pay/unipay/config", a2);
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f13321b, d);
} else {
str = null;
}
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuySupportPayList rawResponse:" + str);
if (str == null) {
return responseData2;
}
try {
str2 = c.b(str);
} catch (Exception e2) {
e = e2;
str2 = null;
}
try {
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuySupportPayList response:" + str2);
} catch (Exception e3) {
e = e3;
e.printStackTrace();
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuySupportPayList:" + e.toString());
if (str2 != null) {
}
}
if (str2 != null) {
return responseData2;
}
try {
responseData = (ResponseData) g().a(str2, new TypeToken<ResponseData<BuyGoogleAccountSupportPayResult>>() {
}.getType());
} catch (Exception e4) {
e4.printStackTrace();
az.e("StoreRepository", "StoreRepository/queryGoogleAccountBuySupportPayList:" + e4.toString());
responseData = null;
}
return responseData != null ? responseData : responseData2;
}
}