得物.apk(点击下载) / PollingPayResultActivity.java
package com.shizhuang.duapp.modules.pay.ui;
import a.f;
import android.content.Context;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.text.TextUtils;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import b50.d;
import butterknife.BindView;
import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.common.event.DuFQPaySuccessEvent;
import com.shizhuang.duapp.common.ui.BaseLeftBackActivity;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.du_mall_common.model.pay.PayResultModel;
import com.shizhuang.duapp.modules.du_mall_common.router.model.PayPageTransmitParamsModel;
import com.shizhuang.duapp.modules.pay.R$layout;
import com.shizhuang.duapp.modules.pay.R$string;
import com.shizhuang.duapp.modules.pay.model.AliSignPayFailedEvent;
import df.q;
import dy0.s0;
import ey0.c;
import java.util.HashMap;
import java.util.Timer;
import org.greenrobot.eventbus.EventBus;
import p4.h;
import q4.k;
import rd.l;
import td.s;
import u91.e;
@Route(path = "/pay/PollingPayResultPage")
public class PollingPayResultActivity extends BaseLeftBackActivity {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: c reason: collision with root package name */
public Timer f21222c;
public CountDownTimer d;
public boolean e;
public boolean f = true;
@Autowired(name = "payPageTransmitParamsModel")
/* renamed from: g reason: collision with root package name */
public PayPageTransmitParamsModel f21223g = new PayPageTransmitParamsModel();
@BindView(5476)
public DuImageLoaderView imgPolling;
@BindView(6778)
public TextView tvResultMsg;
@BindView(6677)
public TextView tvTitle;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void ActivityMethodWeaver_onCreate(@Nullable PollingPayResultActivity pollingPayResultActivity, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{pollingPayResultActivity, bundle}, null, changeQuickRedirect, true, 251017, new Class[]{PollingPayResultActivity.class, Bundle.class}, Void.TYPE).isSupported) {
jn.b bVar = jn.b.f34396a;
if (!bVar.b()) {
bVar.d(true);
}
long currentTimeMillis = System.currentTimeMillis();
PollingPayResultActivity.e(pollingPayResultActivity, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (pollingPayResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.pay.ui.PollingPayResultActivity")) {
bVar.activityOnCreateMethod(pollingPayResultActivity, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void ActivityMethodWeaver_onResume(PollingPayResultActivity pollingPayResultActivity) {
if (!PatchProxy.proxy(new Object[]{pollingPayResultActivity}, null, changeQuickRedirect, true, 251019, new Class[]{PollingPayResultActivity.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
PollingPayResultActivity.g(pollingPayResultActivity);
long currentTimeMillis2 = System.currentTimeMillis();
if (pollingPayResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.pay.ui.PollingPayResultActivity")) {
jn.b.f34396a.activityOnResumeMethod(pollingPayResultActivity, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void ActivityMethodWeaver_onStart(PollingPayResultActivity pollingPayResultActivity) {
if (!PatchProxy.proxy(new Object[]{pollingPayResultActivity}, null, changeQuickRedirect, true, 251018, new Class[]{PollingPayResultActivity.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
PollingPayResultActivity.f(pollingPayResultActivity);
long currentTimeMillis2 = System.currentTimeMillis();
if (pollingPayResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.pay.ui.PollingPayResultActivity")) {
jn.b.f34396a.activityOnStartMethod(pollingPayResultActivity, currentTimeMillis, currentTimeMillis2);
}
}
}
}
public class a extends CountDownTimer {
public static ChangeQuickRedirect changeQuickRedirect;
public a(long j, long j12) {
super(j, j12);
}
public void onFinish() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251012, new Class[0], Void.TYPE).isSupported) {
PollingPayResultActivity.d(PollingPayResultActivity.this);
}
}
public void onTick(long j) {
if (!PatchProxy.proxy(new Object[]{new Long(j)}, this, changeQuickRedirect, false, 251011, new Class[]{Long.TYPE}, Void.TYPE).isSupported) {
PollingPayResultActivity pollingPayResultActivity = PollingPayResultActivity.this;
pollingPayResultActivity.tvTitle.setText(String.format(pollingPayResultActivity.getString(R$string.count_down_tips), Long.valueOf(j / 1000)));
}
}
}
public class b extends s<PayResultModel> {
public static ChangeQuickRedirect changeQuickRedirect;
public b(Context context) {
super(context);
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
public void onFailed(l lVar) {
if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 251015, new Class[]{l.class}, Void.TYPE).isSupported) {
super.onFailed(lVar);
PollingPayResultActivity.d(PollingPayResultActivity.this);
PollingPayResultActivity.this.f = true;
}
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251013, new Class[0], Void.TYPE).isSupported) {
super.onStart();
PollingPayResultActivity.this.f = false;
}
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
public void onSuccess(Object obj) {
PayResultModel payResultModel = (PayResultModel) obj;
if (!PatchProxy.proxy(new Object[]{payResultModel}, this, changeQuickRedirect, false, 251014, new Class[]{PayResultModel.class}, Void.TYPE).isSupported) {
super.onSuccess(payResultModel);
PollingPayResultActivity.this.f = true;
int tradeStatus = payResultModel.getTradeStatus();
if (tradeStatus == 1) {
PollingPayResultActivity pollingPayResultActivity = PollingPayResultActivity.this;
if (!pollingPayResultActivity.e && !PatchProxy.proxy(new Object[0], pollingPayResultActivity, PollingPayResultActivity.changeQuickRedirect, false, 250997, new Class[0], Void.TYPE).isSupported) {
pollingPayResultActivity.e = true;
if (pollingPayResultActivity.f21222c == null) {
pollingPayResultActivity.f21222c = new h("com.shizhuang.duapp.modules.pay.ui.PollingPayResultActivity");
}
pollingPayResultActivity.f21222c.schedule(new s0(pollingPayResultActivity), 0, 1000);
}
} else if (tradeStatus == 2) {
if (!TextUtils.isEmpty(PollingPayResultActivity.this.f21223g.getSuccessJumpUrl())) {
c cVar = c.f32069a;
StringBuilder h12 = f.h("支付成功,跳转配置页面SuccessJumpUrl = ");
h12.append(PollingPayResultActivity.this.f21223g.getSuccessJumpUrl());
cVar.a(h12.toString());
PollingPayResultActivity pollingPayResultActivity2 = PollingPayResultActivity.this;
e.D(pollingPayResultActivity2, pollingPayResultActivity2.f21223g.getSuccessJumpUrl());
} else {
HashMap hashMap = new HashMap();
hashMap.put("orderNum", PollingPayResultActivity.this.f21223g.getOrderNum());
hashMap.put("productId", PollingPayResultActivity.this.f21223g.getProductId());
hashMap.put("skuId", PollingPayResultActivity.this.f21223g.getSkuId());
hashMap.put("payLogNum", payResultModel.getPayLogNum());
hashMap.put("pageSource", Integer.valueOf(PollingPayResultActivity.this.f21223g.getPageSource()));
hashMap.put("payType", Integer.valueOf(PollingPayResultActivity.this.f21223g.getPayType()));
hashMap.put("payTypeId", Integer.valueOf(PollingPayResultActivity.this.f21223g.getPayTypeId()));
hashMap.put("mergeType", Boolean.valueOf(PollingPayResultActivity.this.f21223g.getMergeType()));
hashMap.put("multiOrderNum", PollingPayResultActivity.this.f21223g.getMultiOrderNum());
hashMap.put("orderConfirmParams", PollingPayResultActivity.this.f21223g.getOrderConfirmParams());
hashMap.put("paymentNo", PollingPayResultActivity.this.f21223g.getPaymentNo());
c cVar2 = c.f32069a;
StringBuilder h13 = f.h("支付成功,跳转支付成功页,传参 = ");
h13.append(nd.e.o(hashMap));
cVar2.a(h13.toString());
e60.b bVar = e60.b.f31725a;
Context context = PollingPayResultActivity.this.getContext();
String orderNum = PollingPayResultActivity.this.f21223g.getOrderNum();
String productId = PollingPayResultActivity.this.f21223g.getProductId();
String skuId = PollingPayResultActivity.this.f21223g.getSkuId();
String payLogNum = payResultModel.getPayLogNum();
int pageSource = PollingPayResultActivity.this.f21223g.getPageSource();
int payType = PollingPayResultActivity.this.f21223g.getPayType();
int payTypeId = PollingPayResultActivity.this.f21223g.getPayTypeId();
boolean mergeType = PollingPayResultActivity.this.f21223g.getMergeType();
String multiOrderNum = PollingPayResultActivity.this.f21223g.getMultiOrderNum();
String orderConfirmParams = PollingPayResultActivity.this.f21223g.getOrderConfirmParams();
String paymentNo = PollingPayResultActivity.this.f21223g.getPaymentNo();
Object[] objArr = {context, orderNum, productId, skuId, payLogNum, new Integer(pageSource), new Integer(payType), new Integer(payTypeId), new Byte(mergeType ? (byte) 1 : 0), multiOrderNum, orderConfirmParams, paymentNo};
ChangeQuickRedirect changeQuickRedirect2 = e60.b.changeQuickRedirect;
Class cls = Integer.TYPE;
if (!PatchProxy.proxy(objArr, bVar, changeQuickRedirect2, false, 123679, new Class[]{Context.class, String.class, String.class, String.class, String.class, cls, cls, cls, Boolean.TYPE, String.class, String.class, String.class}, Void.TYPE).isSupported) {
e60.b.Q(bVar, context, orderNum, productId, skuId, payLogNum, pageSource, payType, payTypeId, mergeType, multiOrderNum, orderConfirmParams, paymentNo, null, null, 12288);
}
}
EventBus.b().f(new DuFQPaySuccessEvent());
PollingPayResultActivity.this.finish();
PollingPayResultActivity.this.h();
} else if (tradeStatus == 10) {
PollingPayResultActivity.d(PollingPayResultActivity.this);
}
}
}
}
public static void d(PollingPayResultActivity pollingPayResultActivity) {
if (!PatchProxy.proxy(new Object[0], pollingPayResultActivity, changeQuickRedirect, false, 250994, new Class[0], Void.TYPE).isSupported) {
EventBus.b().f(new vx0.c());
if (pollingPayResultActivity.i()) {
EventBus.b().f(new AliSignPayFailedEvent());
}
pollingPayResultActivity.h();
pollingPayResultActivity.finish();
q.r("支付失败,请更换其他支付方式");
if (!PatchProxy.proxy(new Object[0], pollingPayResultActivity, changeQuickRedirect, false, 250995, new Class[0], Void.TYPE).isSupported) {
i60.b.f33293a.e("trade_order_pay", "", new k(pollingPayResultActivity, 5));
}
}
}
public static void e(PollingPayResultActivity pollingPayResultActivity, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, pollingPayResultActivity, changeQuickRedirect, false, 251005, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void f(PollingPayResultActivity pollingPayResultActivity) {
if (!PatchProxy.proxy(new Object[0], pollingPayResultActivity, changeQuickRedirect, false, 251007, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static void g(PollingPayResultActivity pollingPayResultActivity) {
if (!PatchProxy.proxy(new Object[0], pollingPayResultActivity, changeQuickRedirect, false, 251009, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
@Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
public int getLayout() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 250991, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R$layout.activity_polling_pay_result;
}
public final void h() {
Timer timer;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251000, new Class[0], Void.TYPE).isSupported) {
this.d.cancel();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 250998, new Class[0], Void.TYPE).isSupported && (timer = this.f21222c) != null) {
timer.cancel();
this.f21222c = null;
}
}
}
public boolean i() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251002, new Class[0], Boolean.TYPE);
if (proxy.isSupported) {
return ((Boolean) proxy.result).booleanValue();
}
return this.f21223g.getPayTool() == 13;
}
@Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
public void initData() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 250993, new Class[0], Void.TYPE).isSupported) {
j(this.f21223g.getPayLogNum());
this.d = new a(15000, 1000).start();
}
}
@Override // com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
public void initView(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 250992, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.initView(bundle);
setTitle("支付结果");
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
}
if (i()) {
this.tvResultMsg.setText("免密支付中");
}
this.imgPolling.i("https://cdn.poizon.com/node-common/5abf914d8316761d7556da6384193365.gif").x();
c cVar = c.f32069a;
StringBuilder h12 = f.h("支付结果轮询页的入参 = ");
h12.append(nd.e.o(this.f21223g));
cVar.a(h12.toString());
}
}
public final void j(String str) {
if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 250996, new Class[]{String.class}, Void.TYPE).isSupported && this.f) {
d.f1575a.k(str, new b(getContext()));
}
}
@Override // androidx.activity.ComponentActivity, com.shizhuang.duapp.common.ui.BaseActivity
public void onBackPressed() {
boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251001, new Class[0], Void.TYPE).isSupported;
}
@Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 251004, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
}
}
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
public void onDestroy() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 250999, new Class[0], Void.TYPE).isSupported) {
super.onDestroy();
h();
}
}
@Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251008, new Class[0], Void.TYPE).isSupported) {
_boostWeave.ActivityMethodWeaver_onResume(this);
}
}
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251006, new Class[0], Void.TYPE).isSupported) {
_boostWeave.ActivityMethodWeaver_onStart(this);
}
}
}