//
// Decompiled by Jadx (from NP Manager)
//
package com.yodo1.android.sdk.helper;
import android.app.Activity;
import com.yodo1.android.sdk.constants.PayType;
import com.yodo1.android.sdk.utils.RegexUtils;
import com.yodo1.sdk.adapter.callback.ChannelSDKCallback;
import com.yodo1.sdk.adapter.entity.ChannelPayInfo;
import com.yodo1.sdk.adapter.entity.User;
import com.yodo1.sdk.adapter.function.PayAdapterBase;
import com.yodo1.sdk.kit.YLog;
import org.w3c.dom.Element;
class Yodo1PayHelper$5 implements ChannelSDKCallback {
final /* synthetic */ Yodo1PayHelper this$0;
final /* synthetic */ Activity val$activity;
final /* synthetic */ ChannelPayInfo val$channelPayInfo;
final /* synthetic */ User val$channelUser;
final /* synthetic */ String val$extraParam;
final /* synthetic */ String val$orderId;
final /* synthetic */ PayAdapterBase val$payAdapter;
final /* synthetic */ Element val$payElement;
final /* synthetic */ PayType val$payType;
final /* synthetic */ ProductData val$productData;
public void onResult(int i, int i2, String str) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(i2);
stringBuilder.append("");
Yodo1PayHelper.access$602(stringBuilder.toString());
stringBuilder = new StringBuilder();
stringBuilder.append(" pay channelpay callback, status = ");
stringBuilder.append(i);
stringBuilder.append(", errorCode = ");
stringBuilder.append(i2);
stringBuilder.append(", params = ");
stringBuilder.append(str);
String str2 = "Yodo1PayHelper";
YLog.d(str2, stringBuilder.toString());
if (RegexUtils.isJson(str)) {
this.val$productData.setExtras(str);
}
if (i != 1) {
String str3 = " 这是已购买的商品,购买成功";
if (i != 2) {
Yodo1PayHelper.access$200(this.this$0, this.val$activity);
Yodo1PayHelper.access$900(this.this$0, this.val$activity, this.val$productData.getOrderId());
if (208 == 301) {
this.this$0.startPay(this.val$activity, PayType.carriers, this.val$productData, this.val$extraParam);
return;
}
Yodo1PayHelper.access$700(this.this$0, this.val$productData, null, String.valueOf(208), str);
if (208 != null) {
if (208 != 103) {
if (208 != 104) {
if (208 == 208) {
YLog.d(str2, str3);
i2 = 1;
} else if (208 != 209) {
switch (208) {
case 203:
i2 = 203;
break;
case 204:
break;
case 205:
break;
default:
switch (208) {
case 302:
case 303:
case 304:
YLog.d("Yodo1PayHelper,支付更换支付方式errorCode");
i2 = 0;
break;
default:
i2 = 0;
break;
}
}
} else {
i2 = 3;
}
}
i2 = 207;
}
i2 = 205;
} else {
i2 = 0;
}
this.this$0.purchased(i2, this.val$channelPayInfo.getOrderId(), this.val$productData, this.val$payType);
return;
}
Yodo1PayHelper.access$200(this.this$0, this.val$activity);
Yodo1PayHelper.access$900(this.this$0, this.val$activity, this.val$productData.getOrderId());
if (208 == 208) {
YLog.d(str2, str3);
this.this$0.purchased(1, this.val$channelPayInfo.getOrderId(), this.val$productData, this.val$payType);
return;
}
this.this$0.purchased(2, this.val$channelPayInfo.getOrderId(), this.val$productData, this.val$payType);
Yodo1PayHelper.access$700(this.this$0, this.val$productData, null, String.valueOf(208), str);
return;
}
YLog.d(str2, " 正在查询订单状态");
if (this.val$payAdapter.needQueryOrder(this.val$activity)) {
Yodo1PayHelper.access$1000(this.this$0, this.val$activity, this.val$productData, new 1(this));
} else if (this.val$payAdapter.needVerifyOrder(this.val$activity)) {
YLog.d(str2, " 订单状态校验成功");
Yodo1PayHelper.access$200(this.this$0, this.val$activity);
this.this$0.purchased(1, this.val$orderId, this.val$productData, this.val$payType);
Yodo1PayHelper.access$900(this.this$0, this.val$activity, this.val$productData.getOrderId());
} else {
YLog.d(str2, " 正在提交订单状态");
Yodo1PayHelper.access$1100(this.this$0, this.val$productData, this.val$payType, new 2(this));
}
}
Yodo1PayHelper$5(Yodo1PayHelper yodo1PayHelper, ProductData productData, PayAdapterBase payAdapterBase, Activity activity, ChannelPayInfo channelPayInfo, Element element, String str, User user, String str2, PayType payType) {
this.this$0 = yodo1PayHelper;
this.val$productData = productData;
this.val$payAdapter = payAdapterBase;
this.val$activity = activity;
this.val$channelPayInfo = channelPayInfo;
this.val$payElement = element;
this.val$extraParam = str;
this.val$channelUser = user;
this.val$orderId = str2;
this.val$payType = payType;
}
}