秦华影视 v1.0.0版本的 MD5 值为:90520322e40df4849cf4989ab6339524
以下内容为反编译后的 WalletPay.java 源代码,内容仅作参考
package com.ehking.sdk.wepay.interfaces;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.os.Environment;
import android.os.Handler;
import android.text.Editable;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.LinearInterpolator;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.ehking.crypt.core.java.utils.Base64;
import com.ehking.crypt.core.java.utils.Md5Util;
import com.ehking.sdk.wepay.R;
import com.ehking.sdk.wepay.constant.ConfigConstants;
import com.ehking.sdk.wepay.constant.Constants;
import com.ehking.sdk.wepay.interfaces.WalletPay;
import com.ehking.sdk.wepay.net.api.WepayApi;
import com.ehking.sdk.wepay.net.bean.AuthType;
import com.ehking.sdk.wepay.net.bean.AuthTypeName;
import com.ehking.sdk.wepay.net.bean.Beans;
import com.ehking.sdk.wepay.net.bean.Card;
import com.ehking.sdk.wepay.net.bean.CardType;
import com.ehking.sdk.wepay.net.bean.DepositStatus;
import com.ehking.sdk.wepay.net.bean.ErrorCode;
import com.ehking.sdk.wepay.net.bean.PayAuthType;
import com.ehking.sdk.wepay.net.bean.RequestBean;
import com.ehking.sdk.wepay.net.bean.RequestInfoBean;
import com.ehking.sdk.wepay.net.bean.Status;
import com.ehking.sdk.wepay.net.bean.TransferPaytype;
import com.ehking.sdk.wepay.net.client.RetrofitClient;
import com.ehking.sdk.wepay.net.factory.HttpClientSslHelper;
import com.ehking.sdk.wepay.net.rxjava.ExternalFlowable;
import com.ehking.sdk.wepay.other.liveness.silent.SilentLivenessDialog;
import com.ehking.sdk.wepay.ui.activity.AuthenticationActivity;
import com.ehking.sdk.wepay.ui.activity.AuthenticationPhoneActivity;
import com.ehking.sdk.wepay.ui.activity.BankCardActivity;
import com.ehking.sdk.wepay.ui.activity.CertificateActivity;
import com.ehking.sdk.wepay.ui.activity.CheckPwdActivity;
import com.ehking.sdk.wepay.ui.activity.FaceActivity;
import com.ehking.sdk.wepay.ui.activity.FindPasswordActivity;
import com.ehking.sdk.wepay.ui.activity.HtcjActivity;
import com.ehking.sdk.wepay.ui.activity.SetPwdActivity;
import com.ehking.sdk.wepay.ui.activity.SettingActivity;
import com.ehking.sdk.wepay.ui.activity.UploadIdCardActivity;
import com.ehking.sdk.wepay.ui.adapter.ChooseCardRlAdapter;
import com.ehking.sdk.wepay.ui.base.BaseActivity;
import com.ehking.sdk.wepay.ui.view.dialog.Alert2ChooseDialog;
import com.ehking.sdk.wepay.ui.view.dialog.LoadingDialog;
import com.ehking.sdk.wepay.ui.view.keyboard.KeyChangeListener;
import com.ehking.sdk.wepay.ui.view.keyboard.KeyboardView;
import com.ehking.sdk.wepay.ui.view.keyboard.PasswordEditText;
import com.ehking.sdk.wepay.utlis.AndroidUtilsKt;
import com.ehking.sdk.wepay.utlis.AuthTypeConvertUtils;
import com.ehking.sdk.wepay.utlis.CallBackInvocationHandler;
import com.ehking.sdk.wepay.utlis.DebugLogUtils;
import com.ehking.sdk.wepay.utlis.FileUtils;
import com.ehking.sdk.wepay.utlis.ImageUtil;
import com.ehking.sdk.wepay.utlis.LogUtil;
import com.ehking.sdk.wepay.utlis.SHA256Utils;
import com.ehking.sdk.wepay.utlis.SystemUtils;
import com.ehking.sdk.wepay.utlis.ToastUtil;
import com.google.android.exoplayer2.text.ttml.TtmlNode;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import com.meizu.cloud.pushsdk.notification.model.NotifyType;
import com.payeasenet.service.sdk.ui.activity.ServicesWebActivity;
import io.netty.handler.ssl.SslContext;
import io.reactivex.android.schedulers.AndroidSchedulers;
import java.io.File;
import java.io.FileInputStream;
import java.io.UnsupportedEncodingException;
import java.lang.ref.WeakReference;
import java.lang.reflect.Proxy;
import java.math.BigDecimal;
import java.security.Key;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.locks.ReentrantLock;
import kotlin.Metadata;
import kotlin.TypeCastException;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.jvm.internal.StringCompanionObject;
import kotlin.text.Charsets;
import kotlin.text.StringsKt__StringsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import p.a.y.e.a.s.e.net.c;
import p.a.y.e.a.s.e.net.e;
import p.a.y.e.a.s.e.net.iu2;
import p.a.y.e.a.s.e.net.ju2;
import p.a.y.e.a.s.e.net.n;
import p.a.y.e.a.s.e.net.ou2;
import p.a.y.e.a.s.e.net.r5;
import p.a.y.e.a.s.e.net.ty2;
import p.a.y.e.a.s.e.net.yb3;
import p.a.y.e.a.s.e.net.zw2;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000Î\u0001\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0010\n\u0002\u0018\u0002\n\u0002\b\u0010\n\u0002\u0018\u0002\n\u0002\b\u000f\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0002\b\u0017\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0014\n\u0002\u0018\u0002\n\u0002\b\u0012\n\u0002\u0010\u0006\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\t\n\u0002\b\u0019\u0018\u0000 õ\u00012\u00020\u0001:\bõ\u0001ö\u0001÷\u0001ø\u0001B\n\b\u0002¢\u0006\u0005\bô\u0001\u0010\u0004J\u000f\u0010\u0003\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0003\u0010\u0004J\u000f\u0010\u0005\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0005\u0010\u0004J\u000f\u0010\u0006\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0006\u0010\u0004J7\u0010\f\u001a\u00020\u00022\b\u0010\b\u001a\u0004\u0018\u00010\u00072\b\u0010\t\u001a\u0004\u0018\u00010\u00072\b\u0010\n\u001a\u0004\u0018\u00010\u00072\b\u0010\u000b\u001a\u0004\u0018\u00010\u0007H\u0002¢\u0006\u0004\b\f\u0010\rJ\u000f\u0010\u000e\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u000e\u0010\u0004J+\u0010\u0013\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\b\b\u0002\u0010\u0011\u001a\u00020\u00102\b\b\u0002\u0010\u0012\u001a\u00020\u0007H\u0003¢\u0006\u0004\b\u0013\u0010\u0014J!\u0010\u0015\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\b\b\u0002\u0010\u0012\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\u0015\u0010\u0016J3\u0010\u001b\u001a\u00020\u00022\u0006\u0010\u0018\u001a\u00020\u00172\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u00072\n\b\u0002\u0010\u001a\u001a\u0004\u0018\u00010\u0007H\u0003¢\u0006\u0004\b\u001b\u0010\u001cJA\u0010'\u001a\u00020\u00022\u0006\u0010\u001e\u001a\u00020\u001d2\u0006\u0010 \u001a\u00020\u001f2\u0006\u0010\"\u001a\u00020!2\u0006\u0010$\u001a\u00020#2\u0006\u0010\u000f\u001a\u00020\u00072\b\b\u0002\u0010&\u001a\u00020%H\u0002¢\u0006\u0004\b'\u0010(J)\u0010+\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u0010)\u001a\u00020%2\b\b\u0002\u0010*\u001a\u00020\u0010H\u0002¢\u0006\u0004\b+\u0010,J!\u0010.\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\b\b\u0002\u0010-\u001a\u00020\u0010H\u0003¢\u0006\u0004\b.\u0010/J;\u00104\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00100\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u00102\u001a\u00020\u00072\b\b\u0002\u00103\u001a\u00020\u0007H\u0003¢\u0006\u0004\b4\u00105J/\u00109\u001a\u00020\u00022\u0006\u00107\u001a\u0002062\u0006\u00101\u001a\u00020\u00172\u0006\u00108\u001a\u00020\u00072\u0006\u0010\u000f\u001a\u00020\u0007H\u0002¢\u0006\u0004\b9\u0010:J;\u0010;\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00100\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u00102\u001a\u00020\u00072\b\b\u0002\u00103\u001a\u00020\u0007H\u0003¢\u0006\u0004\b;\u00105J;\u0010<\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00100\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u00102\u001a\u00020\u00072\b\b\u0002\u00103\u001a\u00020\u0007H\u0003¢\u0006\u0004\b<\u00105J;\u0010=\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00100\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u00102\u001a\u00020\u00072\b\b\u0002\u00103\u001a\u00020\u0007H\u0003¢\u0006\u0004\b=\u00105J;\u0010>\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00100\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u00102\u001a\u00020\u00072\b\b\u0002\u00103\u001a\u00020\u0007H\u0003¢\u0006\u0004\b>\u00105J;\u0010@\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00100\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u0010?\u001a\u00020\u00072\b\b\u0002\u00103\u001a\u00020\u0007H\u0002¢\u0006\u0004\b@\u00105J)\u0010A\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u00103\u001a\u00020\u0007H\u0002¢\u0006\u0004\bA\u0010BJ;\u0010C\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\u0006\u00100\u001a\u00020\u00072\u0006\u00101\u001a\u00020\u00172\b\b\u0002\u00102\u001a\u00020\u00072\b\b\u0002\u00103\u001a\u00020\u0007H\u0003¢\u0006\u0004\bC\u00105J\u0017\u0010E\u001a\u00020\u00072\u0006\u0010D\u001a\u00020\u0007H\u0002¢\u0006\u0004\bE\u0010FJ\u0017\u0010I\u001a\u00020\u00072\u0006\u0010H\u001a\u00020GH\u0002¢\u0006\u0004\bI\u0010JJ\u0017\u0010L\u001a\u00020\u00022\u0006\u0010K\u001a\u00020\u001fH\u0002¢\u0006\u0004\bL\u0010MJ\u0017\u0010N\u001a\u00020\u00022\u0006\u0010K\u001a\u00020\u001fH\u0002¢\u0006\u0004\bN\u0010MJ;\u0010R\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\u00072\b\u0010O\u001a\u0004\u0018\u00010\u00072\b\u0010\u000f\u001a\u0004\u0018\u00010\u00072\u0006\u0010P\u001a\u00020\u00102\u0006\u0010Q\u001a\u00020\u0010H\u0002¢\u0006\u0004\bR\u0010SJa\u0010Y\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\u00072\b\u0010\u000f\u001a\u0004\u0018\u00010\u00072\b\b\u0002\u0010Q\u001a\u00020\u00102\n\b\u0002\u0010T\u001a\u0004\u0018\u00010\u00072\b\b\u0002\u0010U\u001a\u00020\u00072\b\b\u0002\u0010V\u001a\u00020\u00072\b\b\u0002\u00102\u001a\u00020\u00072\n\b\u0002\u0010X\u001a\u0004\u0018\u00010WH\u0002¢\u0006\u0004\bY\u0010ZJ3\u0010[\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\u00072\b\u0010O\u001a\u0004\u0018\u00010\u00072\b\u0010\u000f\u001a\u0004\u0018\u00010\u00072\u0006\u0010Q\u001a\u00020\u0010H\u0002¢\u0006\u0004\b[\u0010\\J\u000f\u0010]\u001a\u00020\u0002H\u0002¢\u0006\u0004\b]\u0010\u0004J\u0017\u0010^\u001a\u00020\u00022\u0006\u00101\u001a\u00020\u0017H\u0002¢\u0006\u0004\b^\u0010_J\u000f\u0010`\u001a\u00020\u0002H\u0002¢\u0006\u0004\b`\u0010\u0004J\u0017\u0010a\u001a\u00020\u00022\u0006\u00101\u001a\u00020\u0017H\u0002¢\u0006\u0004\ba\u0010_J\u000f\u0010b\u001a\u00020\u0002H\u0002¢\u0006\u0004\bb\u0010\u0004JO\u0010g\u001a\u00020\u00022\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u00072\u0006\u0010\u000b\u001a\u00020\u00072\u0006\u0010c\u001a\u00020\u00072\b\b\u0002\u0010\n\u001a\u00020\u00072\b\b\u0002\u0010d\u001a\u00020\u00072\n\b\u0002\u0010f\u001a\u0004\u0018\u00010eH\u0007¢\u0006\u0004\bg\u0010hJ1\u0010i\u001a\u00020\u00022\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u00072\b\b\u0002\u0010\n\u001a\u00020\u00072\b\b\u0002\u0010\u000b\u001a\u00020\u0007¢\u0006\u0004\bi\u0010\rJ1\u0010j\u001a\u00020\u00022\u0006\u00101\u001a\u00020\u00172\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u00072\b\b\u0002\u0010\u000b\u001a\u00020\u0007H\u0007¢\u0006\u0004\bj\u0010\u001cJ\r\u0010k\u001a\u00020\u0002¢\u0006\u0004\bk\u0010\u0004J)\u0010l\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\u00072\b\u0010c\u001a\u0004\u0018\u00010\u00072\b\b\u0002\u0010T\u001a\u00020\u0007¢\u0006\u0004\bl\u0010mJ\r\u0010n\u001a\u00020\u0007¢\u0006\u0004\bn\u0010oJ)\u0010p\u001a\u00020\u00022\u0006\u0010\u0018\u001a\u00020\u00172\u0006\u0010\u000f\u001a\u00020\u00072\b\u0010 \u001a\u0004\u0018\u00010\u001fH\u0007¢\u0006\u0004\bp\u0010qJ\r\u0010r\u001a\u00020\u0002¢\u0006\u0004\br\u0010\u0004J\u0015\u0010s\u001a\u00020\u00022\u0006\u00101\u001a\u00020\u0017¢\u0006\u0004\bs\u0010_J1\u0010R\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\u00072\b\u0010O\u001a\u0004\u0018\u00010\u00072\b\u0010\u000f\u001a\u0004\u0018\u00010\u00072\u0006\u0010Q\u001a\u00020\u0010¢\u0006\u0004\bR\u0010\\J+\u0010u\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00072\b\b\u0002\u0010t\u001a\u00020\u00102\b\b\u0002\u0010\u0011\u001a\u00020\u0010H\u0007¢\u0006\u0004\bu\u0010vJ\u0015\u0010w\u001a\u00020\u00022\u0006\u0010\u0018\u001a\u00020\u0017¢\u0006\u0004\bw\u0010_J\r\u0010x\u001a\u00020\u0002¢\u0006\u0004\bx\u0010\u0004J\r\u0010y\u001a\u00020\u0002¢\u0006\u0004\by\u0010\u0004J\u0017\u0010{\u001a\u00020\u00022\b\b\u0002\u0010z\u001a\u00020\u0007¢\u0006\u0004\b{\u0010|J?\u0010\u0081\u0001\u001a\u00020\u00022\u0006\u00101\u001a\u00020\u00172%\b\u0002\u0010\u0080\u0001\u001a\u001e\u0012\u0014\u0012\u00120\u0010¢\u0006\r\b~\u0012\t\b\u007f\u0012\u0005\b\b(\u0080\u0001\u0012\u0004\u0012\u00020\u00010}¢\u0006\u0006\b\u0081\u0001\u0010\u0082\u0001J)\u0010\u0083\u0001\u001a\u00020\u00022\u0006\u00101\u001a\u00020\u00172\u0006\u0010\u000f\u001a\u00020\u00072\b\u0010 \u001a\u0004\u0018\u00010\u001f¢\u0006\u0005\b\u0083\u0001\u0010qJ4\u0010\u0088\u0001\u001a\u00020\u00022\u0007\u0010\u0084\u0001\u001a\u00020\u00102\u0019\u0010\u0087\u0001\u001a\u0014\u0012\u0004\u0012\u00020\u00070\u0085\u0001j\t\u0012\u0004\u0012\u00020\u0007`\u0086\u0001¢\u0006\u0006\b\u0088\u0001\u0010\u0089\u0001J\u000f\u0010\u008a\u0001\u001a\u00020\u0007¢\u0006\u0005\b\u008a\u0001\u0010oJ\u0019\u0010\u008c\u0001\u001a\u00020\u00022\u0007\u0010\u008b\u0001\u001a\u00020\u0010¢\u0006\u0006\b\u008c\u0001\u0010\u008d\u0001J\u0019\u0010\u008f\u0001\u001a\u00020\u00022\u0007\u0010\u008e\u0001\u001a\u00020\u0010¢\u0006\u0006\b\u008f\u0001\u0010\u008d\u0001J\u000f\u0010\u0090\u0001\u001a\u00020\u0002¢\u0006\u0005\b\u0090\u0001\u0010\u0004J*\u0010\u0093\u0001\u001a\u00020\u00102\b\u0010\u0092\u0001\u001a\u00030\u0091\u00012\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u0007¢\u0006\u0006\b\u0093\u0001\u0010\u0094\u0001J=\u0010\u0099\u0001\u001a\u00020\u00022\t\b\u0002\u0010\u0095\u0001\u001a\u00020\u00072\t\b\u0002\u0010\u0096\u0001\u001a\u00020\u00072\t\b\u0002\u0010\u0097\u0001\u001a\u00020\u00072\t\b\u0002\u0010\u0098\u0001\u001a\u00020\u0007H\u0007¢\u0006\u0005\b\u0099\u0001\u0010\rJ\u001d\u0010\u009b\u0001\u001a\u00020\u00022\t\b\u0002\u0010\u009a\u0001\u001a\u00020%H\u0007¢\u0006\u0006\b\u009b\u0001\u0010\u009c\u0001R\u0019\u0010\u009d\u0001\u001a\u00020\u00108\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u009d\u0001\u0010\u009e\u0001R\u001b\u0010\u009f\u0001\u001a\u0004\u0018\u00010\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u009f\u0001\u0010 \u0001R\u0019\u0010¡\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¡\u0001\u0010 \u0001R\u001b\u0010¢\u0001\u001a\u0004\u0018\u00010\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¢\u0001\u0010 \u0001R\u0019\u0010£\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b£\u0001\u0010 \u0001R\u0019\u0010¤\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¤\u0001\u0010 \u0001R\u0019\u0010¥\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¥\u0001\u0010 \u0001R,\u0010§\u0001\u001a\u0005\u0018\u00010¦\u00018\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\b§\u0001\u0010¨\u0001\u001a\u0006\b©\u0001\u0010ª\u0001\"\u0006\b«\u0001\u0010¬\u0001R'\u0010\u000b\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\u000b\u0010 \u0001\u001a\u0005\b\u00ad\u0001\u0010o\"\u0005\b®\u0001\u0010|R\u001b\u0010¯\u0001\u001a\u0004\u0018\u00010#8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¯\u0001\u0010°\u0001R'\u0010\b\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\b\u0010 \u0001\u001a\u0005\b±\u0001\u0010o\"\u0005\b²\u0001\u0010|R\u0019\u0010³\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b³\u0001\u0010 \u0001R\u001b\u0010´\u0001\u001a\u0004\u0018\u00010\u001f8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b´\u0001\u0010µ\u0001R'\u0010c\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\bc\u0010 \u0001\u001a\u0005\b¶\u0001\u0010o\"\u0005\b·\u0001\u0010|R\u0019\u0010¸\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¸\u0001\u0010 \u0001R\u001a\u0010º\u0001\u001a\u00030¹\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bº\u0001\u0010»\u0001R\u0019\u0010\u0084\u0001\u001a\u00020\u00108\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0084\u0001\u0010\u009e\u0001R\u001b\u0010¼\u0001\u001a\u0004\u0018\u00010#8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¼\u0001\u0010°\u0001R-\u0010¾\u0001\u001a\u0016\u0012\u0005\u0012\u00030½\u00010\u0085\u0001j\n\u0012\u0005\u0012\u00030½\u0001`\u0086\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b¾\u0001\u0010¿\u0001R\u0019\u0010À\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÀ\u0001\u0010 \u0001R+\u0010Á\u0001\u001a\u0014\u0012\u0004\u0012\u00020\u00070\u0085\u0001j\t\u0012\u0004\u0012\u00020\u0007`\u0086\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÁ\u0001\u0010¿\u0001R,\u0010Ã\u0001\u001a\u0005\u0018\u00010Â\u00018\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\bÃ\u0001\u0010Ä\u0001\u001a\u0006\bÅ\u0001\u0010Æ\u0001\"\u0006\bÇ\u0001\u0010È\u0001R\u0019\u0010É\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÉ\u0001\u0010 \u0001R\u001c\u0010Ë\u0001\u001a\u0005\u0018\u00010Ê\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bË\u0001\u0010Ì\u0001R\u0019\u0010$\u001a\u0004\u0018\u00010#8\u0002@\u0002X\u0082\u000e¢\u0006\u0007\n\u0005\b$\u0010°\u0001R\u0019\u0010Í\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÍ\u0001\u0010 \u0001R\u0019\u0010Î\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÎ\u0001\u0010 \u0001R'\u0010Ï\u0001\u001a\u00020\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0016\n\u0006\bÏ\u0001\u0010 \u0001\u001a\u0005\bÐ\u0001\u0010o\"\u0005\bÑ\u0001\u0010|R\u001e\u00101\u001a\t\u0012\u0004\u0012\u00020\u00170Ò\u00018\u0002@\u0002X\u0082.¢\u0006\u0007\n\u0005\b1\u0010Ó\u0001R,\u0010Õ\u0001\u001a\u0005\u0018\u00010Ô\u00018\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\bÕ\u0001\u0010Ö\u0001\u001a\u0006\b×\u0001\u0010Ø\u0001\"\u0006\bÙ\u0001\u0010Ú\u0001R\u001a\u0010Ü\u0001\u001a\u00030Û\u00018\u0002@\u0002X\u0082\u0004¢\u0006\b\n\u0006\bÜ\u0001\u0010Ý\u0001R\u001b\u0010Þ\u0001\u001a\u0004\u0018\u00010e8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÞ\u0001\u0010ß\u0001R*\u0010á\u0001\u001a\u00030à\u00018\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\bá\u0001\u0010â\u0001\u001a\u0006\bã\u0001\u0010ä\u0001\"\u0006\bå\u0001\u0010æ\u0001R'\u0010\n\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\n\u0010 \u0001\u001a\u0005\bç\u0001\u0010o\"\u0005\bè\u0001\u0010|R)\u0010é\u0001\u001a\u00020%8\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\bé\u0001\u0010ê\u0001\u001a\u0006\bë\u0001\u0010ì\u0001\"\u0006\bí\u0001\u0010\u009c\u0001R'\u0010î\u0001\u001a\u00020\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0016\n\u0006\bî\u0001\u0010 \u0001\u001a\u0005\bï\u0001\u0010o\"\u0005\bð\u0001\u0010|R'\u0010\t\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\t\u0010 \u0001\u001a\u0005\bñ\u0001\u0010o\"\u0005\bò\u0001\u0010|R\u001b\u0010ó\u0001\u001a\u0004\u0018\u00010\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bó\u0001\u0010 \u0001¨\u0006ù\u0001"}, d2 = {"Lcom/ehking/sdk/wepay/interfaces/WalletPay;", "", "", "initKey", "()V", "autoCer", "initFile", "", ServicesWebActivity.MERCHANT_ID, "walletId", "requestId", "token", "initWallet", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "cleanCard", Constants.businessCode, "", "switchPayModelList", "defaultPayAuthType", "showPayDialog", "(Ljava/lang/String;ZLjava/lang/String;)V", "showCheckPwdDialog", "(Ljava/lang/String;Ljava/lang/String;)V", "Landroid/app/Activity;", "activity", "msg", "msg2", "showFaceResultDialog", "(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "Landroid/widget/TextView;", "type", "Landroid/view/View;", "parent", "Landroid/widget/ImageView;", "iv", "Landroidx/appcompat/app/AlertDialog;", "mOptionAd", "", "cPosition", "chooseCard", "(Landroid/widget/TextView;Landroid/view/View;Landroid/widget/ImageView;Landroidx/appcompat/app/AlertDialog;Ljava/lang/String;I)V", "requestCode", "isPaymentModeList", "toAddCard", "(Ljava/lang/String;IZ)V", "isShowPayDialog", "toFindPassword", "(Ljava/lang/String;Z)V", "pwd", "mActivity", "payAuthType", "facePhoto", "redEnvelope", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V", "Lcom/ehking/sdk/wepay/ui/view/dialog/Alert2ChooseDialog;", "alert2ChooseDialog", "cause", "findPassword", "(Lcom/ehking/sdk/wepay/ui/view/dialog/Alert2ChooseDialog;Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V", "withdraw", "deposit", "onlinePay", "onAppPay", "authType", "checkPwd", "openFace", "(Ljava/lang/String;Landroid/app/Activity;Ljava/lang/String;)V", "transfer", "filePath", "getPrivateKey", "(Ljava/lang/String;)Ljava/lang/String;", "Ljava/security/Key;", SslContext.ALIAS, "getKeyString", "(Ljava/security/Key;)Ljava/lang/String;", NotifyType.VIBRATE, "moveToLeft", "(Landroid/view/View;)V", "enterCenter", "code", "isLiveDetect", Constants.isPassword, "goAuth", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)V", "nextBusinessCode", "businessUrl", ServicesWebActivity.OPEN_ID, "Lcom/ehking/sdk/wepay/net/bean/Beans$WalletSafety;", "walletSafety", "passHandle", "(Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/ehking/sdk/wepay/net/bean/Beans$WalletSafety;)V", "goLiveDetect", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V", "autoGenerateCert", "showLoadingDialog", "(Landroid/app/Activity;)V", "hideLoadingDialog", "getPermission", "initRetrofitClient", "source", "checkPwdAuthType", "Lcom/ehking/sdk/wepay/interfaces/WalletPay$ServicePayCallback;", "servicePayCallback", "evoke", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/ehking/sdk/wepay/interfaces/WalletPay$ServicePayCallback;)V", "checkCertificate", "getPermissionCheckCer", "startUploadIdCard", "validateAndQueryInfo", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "getEvokeTime", "()Ljava/lang/String;", "startFaceDialog", "(Landroid/app/Activity;Ljava/lang/String;Landroid/view/View;)V", "dismissAllDialog", "closeFace", "isShowLoading", "getAllCardList", "(Ljava/lang/String;ZZ)V", "init", "destroy", "releaseActivity", com.payeasenet.wepay.constant.Constants.env, "setEnvironment", "(Ljava/lang/String;)V", "Lkotlin/Function1;", "Lkotlin/ParameterName;", "name", "result", "checkStoragePermission", "(Landroid/app/Activity;Lkotlin/jvm/functions/Function1;)V", "getFacePermission", "isOnlySupportBalance", "Ljava/util/ArrayList;", "Lkotlin/collections/ArrayList;", "sourceList", "setOnlySupportBalance", "(ZLjava/util/ArrayList;)V", "getSdkVersion", "isDebug", "setDebug", "(Z)V", "isRandomKeyboard", "setIsRandomKeyboard", "expiredAutomaticDeletionCer", "Landroid/content/Context;", "context", "deleteCer", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z", "buttonColor", "toolBarColor", "buttonTextColor", "toolBarTextColor", "setColor", "toolBarBackImgColor", "setToolBarBackImg", "(I)V", Constants.isSupportCredit, "Z", "phoneNumber", "Ljava/lang/String;", "payDialogTimeText", "imageUrl", "walletQueryTimeText", "appPayOrderInfo", "cardListTimeText", "Lcom/ehking/sdk/wepay/interfaces/WalletPay$WalletPayCallback;", "walletPayCallback", "Lcom/ehking/sdk/wepay/interfaces/WalletPay$WalletPayCallback;", "getWalletPayCallback", "()Lcom/ehking/sdk/wepay/interfaces/WalletPay$WalletPayCallback;", "setWalletPayCallback", "(Lcom/ehking/sdk/wepay/interfaces/WalletPay$WalletPayCallback;)V", "getToken", "setToken", "mOptionAd1", "Landroidx/appcompat/app/AlertDialog;", "getMerchantId", "setMerchantId", "productInfo", "mDialogContentView", "Landroid/view/View;", "getSource", "setSource", "validateTokenTimeText", "", "feeAmount", "D", "checkPwdDialog", "Lcom/ehking/sdk/wepay/net/bean/Card;", "cardList", "Ljava/util/ArrayList;", "authSourceTimeText", "authList", "Lcom/ehking/sdk/wepay/ui/activity/SettingActivity$SwitchFaceCallBack;", "mSettingFaceCallback", "Lcom/ehking/sdk/wepay/ui/activity/SettingActivity$SwitchFaceCallBack;", "getMSettingFaceCallback", "()Lcom/ehking/sdk/wepay/ui/activity/SettingActivity$SwitchFaceCallBack;", "setMSettingFaceCallback", "(Lcom/ehking/sdk/wepay/ui/activity/SettingActivity$SwitchFaceCallBack;)V", "mPayAuthType", "Lcom/ehking/sdk/wepay/ui/view/dialog/LoadingDialog;", "mDialog", "Lcom/ehking/sdk/wepay/ui/view/dialog/LoadingDialog;", "sourceName", "mCheckPwdAuthType", "payCard", "getPayCard", "setPayCard", "Ljava/lang/ref/WeakReference;", "Ljava/lang/ref/WeakReference;", "Lcom/ehking/sdk/wepay/interfaces/WalletPay$LogCallback;", "logCallback", "Lcom/ehking/sdk/wepay/interfaces/WalletPay$LogCallback;", "getLogCallback", "()Lcom/ehking/sdk/wepay/interfaces/WalletPay$LogCallback;", "setLogCallback", "(Lcom/ehking/sdk/wepay/interfaces/WalletPay$LogCallback;)V", "Ljava/util/concurrent/locks/ReentrantLock;", "lock", "Ljava/util/concurrent/locks/ReentrantLock;", "mServicePayCallback", "Lcom/ehking/sdk/wepay/interfaces/WalletPay$ServicePayCallback;", "", TtmlNode.START, "J", "getStart", "()J", "setStart", "(J)V", "getRequestId", "setRequestId", "mPosition", "I", "getMPosition", "()I", "setMPosition", "paymentModel", "getPaymentModel", "setPaymentModel", "getWalletId", "setWalletId", Constants.bindCardId, "<init>", "Companion", "LogCallback", "ServicePayCallback", "WalletPayCallback", "sdk_release"}, k = 1, mv = {1, 4, 0})
public final class WalletPay {
public static final Companion INSTANCE = new Companion(null);
public static final long DELAYED_SHOW_PAY_DIALOG_TIME = 500;
public static WalletPay INSTANCE;
public String appPayOrderInfo;
public ArrayList<String> authList;
public String authSourceTimeText;
public String bindCardId;
public ArrayList<Card> cardList;
public String cardListTimeText;
public AlertDialog checkPwdDialog;
public double feeAmount;
public String imageUrl;
public boolean isOnlySupportBalance;
public boolean isSupportCredit;
public final ReentrantLock lock;
@Nullable
public LogCallback logCallback;
public WeakReference<Activity> mActivity;
public String mCheckPwdAuthType;
public LoadingDialog mDialog;
public View mDialogContentView;
public AlertDialog mOptionAd;
public AlertDialog mOptionAd1;
public String mPayAuthType;
public int mPosition;
public ServicePayCallback mServicePayCallback;
@Nullable
public SettingActivity.SwitchFaceCallBack mSettingFaceCallback;
@Nullable
public String merchantId;
@NotNull
public String payCard;
public String payDialogTimeText;
@NotNull
public String paymentModel;
public String phoneNumber;
public String productInfo;
@Nullable
public String requestId;
@Nullable
public String source;
public String sourceName;
public long start;
@Nullable
public String token;
public String validateTokenTimeText;
@Nullable
public String walletId;
@Nullable
public WalletPayCallback walletPayCallback;
public String walletQueryTimeText;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0007\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\n\u0010\u000bJ\r\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0003\u0010\u0004R\u0016\u0010\u0006\u001a\u00020\u00058\u0006@\u0006X\u0086T¢\u0006\u0006\n\u0004\b\u0006\u0010\u0007R\u0018\u0010\b\u001a\u0004\u0018\u00010\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\b\u0010\t¨\u0006\f"}, d2 = {"Lcom/ehking/sdk/wepay/interfaces/WalletPay$Companion;", "", "Lcom/ehking/sdk/wepay/interfaces/WalletPay;", "getInstance", "()Lcom/ehking/sdk/wepay/interfaces/WalletPay;", "", "DELAYED_SHOW_PAY_DIALOG_TIME", "J", "INSTANCE", "Lcom/ehking/sdk/wepay/interfaces/WalletPay;", "<init>", "()V", "sdk_release"}, k = 1, mv = {1, 4, 0})
public static final class Companion {
public Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@NotNull
public final WalletPay getInstance() {
if (WalletPay.INSTANCE == null) {
synchronized (WalletPay.class) {
WalletPay.INSTANCE = new WalletPay(null);
Unit unit = Unit.INSTANCE;
}
}
WalletPay walletPay = WalletPay.INSTANCE;
if (walletPay == null) {
Intrinsics.throwNpe();
}
return walletPay;
}
}
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J\u0017\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H&¢\u0006\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lcom/ehking/sdk/wepay/interfaces/WalletPay$LogCallback;", "", "", "message", "", "log", "(Ljava/lang/String;)V", "sdk_release"}, k = 1, mv = {1, 4, 0})
public interface LogCallback {
void log(@NotNull String message);
}
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J-\u0010\u0007\u001a\u00020\u00062\b\u0010\u0003\u001a\u0004\u0018\u00010\u00022\b\u0010\u0004\u001a\u0004\u0018\u00010\u00022\b\u0010\u0005\u001a\u0004\u0018\u00010\u0002H&¢\u0006\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lcom/ehking/sdk/wepay/interfaces/WalletPay$ServicePayCallback;", "", "", "source", "status", "errorMessage", "", "callback", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "sdk_release"}, k = 1, mv = {1, 4, 0})
public interface ServicePayCallback {
void callback(@Nullable String source, @Nullable String status, @Nullable String errorMessage);
}
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J-\u0010\u0007\u001a\u00020\u00062\b\u0010\u0003\u001a\u0004\u0018\u00010\u00022\b\u0010\u0004\u001a\u0004\u0018\u00010\u00022\b\u0010\u0005\u001a\u0004\u0018\u00010\u0002H&¢\u0006\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lcom/ehking/sdk/wepay/interfaces/WalletPay$WalletPayCallback;", "", "", "source", "status", "errorMessage", "", "callback", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "sdk_release"}, k = 1, mv = {1, 4, 0})
public interface WalletPayCallback {
void callback(@Nullable String source, @Nullable String status, @Nullable String errorMessage);
}
public WalletPay() {
this.lock = new ReentrantLock(true);
this.productInfo = "";
this.appPayOrderInfo = "";
PayAuthType payAuthType = PayAuthType.FORCE_PAY_PASSWORD;
this.mPayAuthType = "FORCE_PAY_PASSWORD";
this.sourceName = "";
this.validateTokenTimeText = "";
this.authSourceTimeText = "";
this.walletQueryTimeText = "";
this.cardListTimeText = "";
this.payDialogTimeText = "";
this.mCheckPwdAuthType = "";
this.authList = new ArrayList<>();
this.bindCardId = "";
this.phoneNumber = "";
this.payCard = "";
this.imageUrl = "";
this.cardList = new ArrayList<>();
TransferPaytype transferPaytype = TransferPaytype.BANK_CARD;
this.paymentModel = "BANK_CARD";
}
public WalletPay(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final WeakReference access$getMActivity$p(WalletPay walletPay) {
WeakReference<Activity> weakReference = walletPay.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
return weakReference;
}
public final void autoCer() {
if (TextUtils.isEmpty(Constants.key)) {
initFile();
String str = Constants.storePath;
Intrinsics.checkExpressionValueIsNotNull(str, "Constants.storePath");
Constants.key = getPrivateKey(str);
}
if (TextUtils.isEmpty(Constants.key)) {
autoGenerateCert();
return;
}
WalletPayCallback walletPayCallback = this.walletPayCallback;
if (walletPayCallback != null) {
String str2 = this.source;
Status status = Status.SUCCESS;
walletPayCallback.callback(str2, "SUCCESS", "");
}
}
private final void autoGenerateCert() {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity it = weakReference.get();
if (it != null) {
Intrinsics.checkExpressionValueIsNotNull(it, "it");
showLoadingDialog(it);
}
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference2.get();
DefaultConstructorMarker defaultConstructorMarker = null;
Context applicationContext = activity != null ? activity.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
String str = this.token;
if (str == null) {
Intrinsics.throwNpe();
}
zw2<Beans.GenerateCertResult> h3 = wepayApi.generateCertBySecretKey(new RequestBean.AutoGenerateCertBySecretKey(str, false, 2, defaultConstructorMarker)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread());
ty2<Beans.GenerateCertResult> ty2Var = new ty2<Beans.GenerateCertResult>() {
@Override
public final void accept(Beans.GenerateCertResult generateCertResult) {
String privateKey;
WalletPay.this.hideLoadingDialog();
String status = generateCertResult.getStatus();
Status status2 = Status.SUCCESS;
if (!Intrinsics.areEqual(status, "SUCCESS")) {
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String source = WalletPay.this.getSource();
Status status3 = Status.FAIL;
walletPayCallback.callback(source, "FAIL", generateCertResult.getCause());
return;
}
return;
}
FileUtils.saveFile(Constants.storePath, c.lite_try(generateCertResult.getPfx()));
WalletPay walletPay = WalletPay.this;
String str2 = Constants.storePath;
Intrinsics.checkExpressionValueIsNotNull(str2, "Constants.storePath");
privateKey = walletPay.getPrivateKey(str2);
Constants.key = privateKey;
Activity activity2 = (Activity) WalletPay.access$getMActivity$p(WalletPay.this).get();
if (activity2 != null) {
Activity activity3 = (Activity) WalletPay.access$getMActivity$p(WalletPay.this).get();
activity2.startActivity(new Intent(activity3 != null ? activity3.getApplicationContext() : null, (Class<?>) SetPwdActivity.class).putExtra(Constants.businessCode, WalletPay.this.getSource()).putExtra(Constants.isFirstSetPwd, true).putExtra("tokenId", WalletPay.this.getToken()).addFlags(268435456));
}
}
};
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference3.get();
if (activity2 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity2, "mActivity.get()!!");
final Activity activity3 = activity2;
h3.c5(ty2Var, new ExternalFlowable(activity3) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String source = WalletPay.this.getSource();
Status status = Status.FAIL;
walletPayCallback.callback(source, "FAIL", e.getMessage());
}
}
});
}
public static void checkCertificate$default(WalletPay walletPay, String str, String str2, String str3, String str4, int i, Object obj) {
if ((i & 4) != 0) {
str3 = "";
}
if ((i & 8) != 0) {
str4 = "";
}
walletPay.checkCertificate(str, str2, str3, str4);
}
public final void checkPwd(final String businessCode, String pwd, final Activity mActivity, String authType, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
showLoadingDialog(mActivity);
wepayApi.validateForMerchant(new RequestBean.ValidatePassword(Constants.token, pwd, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), facePhoto, false, 16, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$checkPwd$1(this, businessCode, mActivity), new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = businessCode;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", getMMsg());
}
}
});
}
public static void checkPwd$default(WalletPay walletPay, String str, String str2, Activity activity, String str3, String str4, int i, Object obj) {
if ((i & 8) != 0) {
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
str3 = "PAY_PASSWORD";
}
String str5 = str3;
if ((i & 16) != 0) {
str4 = "";
}
walletPay.checkPwd(str, str2, activity, str5, str4);
}
public static void checkStoragePermission$default(WalletPay walletPay, Activity activity, Function1 function1, int i, Object obj) {
if ((i & 2) != 0) {
function1 = new Function1<Boolean, Unit>() {
@Override
public Unit invoke(Boolean bool) {
invoke(bool.booleanValue());
return Unit.INSTANCE;
}
public final void invoke(boolean z) {
}
};
}
walletPay.checkStoragePermission(activity, function1);
}
public final void chooseCard(final TextView type, final View parent, final ImageView iv, AlertDialog mOptionAd, final String businessCode, final int cPosition) {
AlertDialog alertDialog = this.mOptionAd1;
if (alertDialog != null) {
alertDialog.dismiss();
}
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity == null) {
Intrinsics.throwNpe();
}
final AlertDialog create = new AlertDialog.Builder(activity).create();
this.mOptionAd1 = create;
if (create != null) {
create.show();
parent.postDelayed(new Runnable() {
@Override
public final void run() {
WalletPay.this.moveToLeft(parent);
}
}, 300L);
Window window = create.getWindow();
if (window == null) {
Intrinsics.throwNpe();
}
WindowManager.LayoutParams attributes = window.getAttributes();
Context context = type.getContext();
Intrinsics.checkExpressionValueIsNotNull(context, "type.context");
attributes.width = AndroidUtilsKt.getScreenWidth(context);
Context context2 = type.getContext();
Intrinsics.checkExpressionValueIsNotNull(context2, "type.context");
attributes.height = (AndroidUtilsKt.getScreenHeight(context2) * 2) / 3;
window.setAttributes(attributes);
window.setWindowAnimations(R.style.LeftAnimDialogStyle);
window.setBackgroundDrawableResource(android.R.color.transparent);
window.setGravity(80);
window.setContentView(R.layout.webox_dialog_choose_card);
create.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
WalletPay.this.enterCenter(parent);
}
});
create.setCanceledOnTouchOutside(true);
RecyclerView rl = (RecyclerView) window.findViewById(R.id.rl);
Intrinsics.checkExpressionValueIsNotNull(rl, "rl");
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
rl.setLayoutManager(new LinearLayoutManager(activity2 != null ? activity2.getApplicationContext() : null));
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity3 = weakReference3.get();
Context applicationContext = activity3 != null ? activity3.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
final ChooseCardRlAdapter chooseCardRlAdapter = new ChooseCardRlAdapter(applicationContext, this.cardList, false, 4, null);
chooseCardRlAdapter.setItemClickListener(new ChooseCardRlAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position, @Nullable String id, @Nullable String bankLogo, @Nullable String cardName, @Nullable String bankCardType) {
AlertDialog.this.dismiss();
this.setMPosition(position);
chooseCardRlAdapter.setCurrentPosition(position);
chooseCardRlAdapter.notifyDataSetChanged();
this.bindCardId = id;
if (!TextUtils.isEmpty(cardName)) {
WalletPay walletPay = this;
if (cardName == null) {
Intrinsics.throwNpe();
}
walletPay.setPayCard(cardName);
type.setText(this.getPayCard());
}
WalletPay walletPay2 = this;
CardType cardType = CardType.BALANCE;
String str = "BALANCE";
if (Intrinsics.areEqual("BALANCE", bankCardType)) {
TransferPaytype transferPaytype = TransferPaytype.BALANCE;
} else {
TransferPaytype transferPaytype2 = TransferPaytype.BANK_CARD;
str = "BANK_CARD";
}
walletPay2.setPaymentModel(str);
if (TextUtils.isEmpty(bankLogo)) {
iv.setImageResource(R.mipmap.ic_card);
} else {
e.lite_new(bankLogo, R.mipmap.ic_card, iv);
}
}
});
rl.setAdapter(chooseCardRlAdapter);
chooseCardRlAdapter.setCurrentPosition(cPosition);
window.findViewById(R.id.ibtn_close).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AlertDialog.this.dismiss();
}
});
window.findViewById(R.id.add).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
WalletPay walletPay;
String str;
int i;
String str2 = businessCode;
AuthType authType = AuthType.APP_PAY;
if (Intrinsics.areEqual(str2, "APP_PAY")) {
walletPay = WalletPay.this;
str = businessCode;
i = 121;
} else {
walletPay = WalletPay.this;
str = businessCode;
i = 100;
}
walletPay.toAddCard(str, i, true);
}
});
}
}
private final void cleanCard() {
this.cardList.clear();
this.bindCardId = "";
this.payCard = "";
this.phoneNumber = "";
this.payCard = "";
this.imageUrl = "";
}
@JvmOverloads
private final void deposit(String str, String str2, Activity activity) {
deposit$default(this, str, str2, activity, null, null, 24, null);
}
@JvmOverloads
private final void deposit(String str, String str2, Activity activity, String str3) {
deposit$default(this, str, str2, activity, str3, null, 16, null);
}
@JvmOverloads
public final void deposit(final String businessCode, String pwd, final Activity mActivity, String payAuthType, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
showLoadingDialog(mActivity);
wepayApi.deposit(new RequestBean.Withdraw(Constants.token, this.bindCardId, pwd, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), facePhoto, false, 32, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new ty2<Beans.DepositResult>() {
@Override
public final void accept(Beans.DepositResult depositResult) {
WalletPay.WalletPayCallback walletPayCallback;
WalletPay.this.hideLoadingDialog();
Alert2ChooseDialog alert2ChooseDialog = new Alert2ChooseDialog();
String str = "SUCCESS";
boolean areEqual = Intrinsics.areEqual(depositResult.getStatus(), "SUCCESS");
String str2 = Constants.defaultError;
if (!areEqual) {
ErrorCode errorCode = ErrorCode.EJ0000302;
if (Intrinsics.areEqual("EJ0000302", depositResult.getCode())) {
WalletPay.this.findPassword(alert2ChooseDialog, mActivity, depositResult.getCause(), businessCode);
return;
}
ErrorCode errorCode2 = ErrorCode.EJ0000312;
if (Intrinsics.areEqual("EJ0000312", depositResult.getCode())) {
WalletPay.this.showFaceResultDialog(mActivity, businessCode, "抱歉,没有认出你来", depositResult.getCause());
return;
}
if (!TextUtils.isEmpty(depositResult.getCause())) {
str2 = depositResult.getCause();
}
if (!TextUtils.isEmpty(depositResult.getErrorMessage())) {
str2 = depositResult.getErrorMessage();
}
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback2 = WalletPay.this.getWalletPayCallback();
if (walletPayCallback2 != null) {
String str3 = businessCode;
Status status = Status.FAIL;
walletPayCallback2.callback(str3, "FAIL", str2);
return;
}
return;
}
Status status2 = Status.FAIL;
String orderStatus = depositResult.getOrderStatus();
DepositStatus depositStatus = DepositStatus.FAIL;
String str4 = "";
if (!Intrinsics.areEqual(orderStatus, "FAIL")) {
String orderStatus2 = depositResult.getOrderStatus();
DepositStatus depositStatus2 = DepositStatus.PROCESS;
if (Intrinsics.areEqual(orderStatus2, "PROCESS")) {
Status status3 = Status.PROCESS;
str = "PROCESS";
} else {
String orderStatus3 = depositResult.getOrderStatus();
DepositStatus depositStatus3 = DepositStatus.CANCEL;
if (!Intrinsics.areEqual(orderStatus3, "CANCEL")) {
String orderStatus4 = depositResult.getOrderStatus();
DepositStatus depositStatus4 = DepositStatus.SUCCESS;
if (Intrinsics.areEqual(orderStatus4, "SUCCESS")) {
Status status4 = Status.SUCCESS;
} else {
if (!TextUtils.isEmpty(depositResult.getCause())) {
str2 = depositResult.getCause();
}
if (!TextUtils.isEmpty(depositResult.getErrorMessage())) {
str4 = depositResult.getErrorMessage();
}
}
} else if (!TextUtils.isEmpty(depositResult.getCause())) {
str2 = depositResult.getCause();
}
str4 = str2;
}
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
walletPayCallback.callback(businessCode, str, str4);
return;
}
return;
}
if (!TextUtils.isEmpty(depositResult.getCause())) {
str2 = depositResult.getCause();
}
str = "FAIL";
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
}
}
}, new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = businessCode;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", getMMsg());
}
}
});
}
public static void deposit$default(WalletPay walletPay, String str, String str2, Activity activity, String str3, String str4, int i, Object obj) {
if ((i & 8) != 0) {
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
str3 = "PAY_PASSWORD";
}
String str5 = str3;
if ((i & 16) != 0) {
str4 = "";
}
walletPay.deposit(str, str2, activity, str5, str4);
}
public final void enterCenter(View v) {
Intrinsics.checkExpressionValueIsNotNull(v.getContext(), "v.context");
ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(v, PropertyValuesHolder.ofFloat("translationX", -AndroidUtilsKt.getScreenWidth(r2), 0.0f), PropertyValuesHolder.ofFloat("alpha", 1.0f, 1.0f)).setDuration(200L);
Intrinsics.checkExpressionValueIsNotNull(oa, "oa");
oa.setInterpolator(new LinearInterpolator());
oa.start();
}
public static void evoke$default(WalletPay walletPay, String str, String str2, String str3, String str4, String str5, String str6, ServicePayCallback servicePayCallback, int i, Object obj) {
walletPay.evoke(str, str2, str3, str4, (i & 16) != 0 ? "" : str5, (i & 32) != 0 ? "" : str6, (i & 64) != 0 ? null : servicePayCallback);
}
public final void findPassword(Alert2ChooseDialog alert2ChooseDialog, Activity mActivity, String cause, final String businessCode) {
alert2ChooseDialog.showMessage(mActivity, cause, "重试", "忘记密码");
alert2ChooseDialog.setOnCancleClickListener(new Alert2ChooseDialog.OnCancelClickListener() {
@Override
public final void cancel(String str) {
WalletPay.getAllCardList$default(WalletPay.this, businessCode, false, false, 6, null);
}
});
alert2ChooseDialog.setOnConfirmClickListener(new Alert2ChooseDialog.OnConfirmClickListener() {
@Override
public final void confirm(String str) {
WalletPay.toFindPassword$default(WalletPay.this, businessCode, false, 2, null);
}
});
}
public static void getAllCardList$default(WalletPay walletPay, String str, boolean z, boolean z2, int i, Object obj) {
if ((i & 2) != 0) {
z = true;
}
if ((i & 4) != 0) {
z2 = false;
}
walletPay.getAllCardList(str, z, z2);
}
private final String getKeyString(Key key) {
byte[] encodeBase64 = Base64.encodeBase64(key.getEncoded());
Intrinsics.checkExpressionValueIsNotNull(encodeBase64, "Base64.encodeBase64(keyBytes)");
return new String(encodeBase64, Charsets.UTF_8);
}
private final void getPermission(final Activity mActivity) {
ju2.lite_break(mActivity).lite_try(new String[]{ou2.lite_while, ou2.lite_throw}).lite_if(new iu2() {
@Override
public final void onAction(List<String> list) {
try {
String source = WalletPay.this.getSource();
AuthType authType = AuthType.AUTO_CHECK_CER;
if (Intrinsics.areEqual(source, "AUTO_CHECK_CER")) {
WalletPay.this.autoCer();
} else {
WalletPay.this.initKey();
}
} catch (Exception e) {
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String source2 = WalletPay.this.getSource();
Status status = Status.FAIL;
StringBuilder b = r5.b("Permission Fail:");
b.append(String.valueOf(e.getMessage()));
walletPayCallback.callback(source2, "FAIL", b.toString());
}
DebugLogUtils.e("Permission", String.valueOf(e.getMessage()));
WalletPay.this.hideLoadingDialog();
}
}
}).lite_int(new iu2() {
@Override
public final void onAction(List<String> list) {
Toast.makeText(mActivity.getApplicationContext(), "存储权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (ju2.lite_new(mActivity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(ou2.lite_while, ou2.lite_throw))) {
ju2.lite_this(mActivity.getApplicationContext()).execute();
}
}
}).start();
}
public static void getPermissionCheckCer$default(WalletPay walletPay, Activity activity, String str, String str2, String str3, int i, Object obj) {
if ((i & 8) != 0) {
str3 = "";
}
walletPay.getPermissionCheckCer(activity, str, str2, str3);
}
public final String getPrivateKey(String filePath) {
String str;
try {
FileInputStream fileInputStream = new FileInputStream(filePath);
KeyStore keyStore = KeyStore.getInstance(HttpClientSslHelper.KEY_STORE_TYPE_P12);
Md5Util.Companion companion = Md5Util.INSTANCE;
StringBuilder sb = new StringBuilder();
sb.append("5upay-webox-wallet_");
SystemUtils systemUtils = SystemUtils.INSTANCE;
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
Context applicationContext = activity != null ? activity.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
sb.append(systemUtils.getAndroidId(applicationContext));
String md5 = companion.getMD5(sb.toString());
if (md5 == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
char[] charArray = md5.toCharArray();
Intrinsics.checkExpressionValueIsNotNull(charArray, "(this as java.lang.String).toCharArray()");
keyStore.load(fileInputStream, charArray);
fileInputStream.close();
Enumeration<String> aliases = keyStore.aliases();
if (aliases.hasMoreElements()) {
String nextElement = aliases.nextElement();
if (nextElement == null) {
throw new TypeCastException("null cannot be cast to non-null type kotlin.String");
}
str = nextElement;
} else {
str = "";
}
Key key = keyStore.getKey(str, charArray);
if (key != null) {
return getKeyString((PrivateKey) key);
}
throw new TypeCastException("null cannot be cast to non-null type java.security.PrivateKey");
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
private final void goAuth(String token, String code, String businessCode, boolean isLiveDetect, boolean isPassword) {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
activity.startActivity(new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) AuthenticationActivity.class).putExtra("tokenId", token).putExtra("toolBarTitle", "身份认证").putExtra(Constants.businessCode, code).putExtra(Constants.currentBusinessCode, businessCode).putExtra(Constants.isPassword, isPassword).putExtra("isLiveDetect", isLiveDetect));
}
}
private final void goLiveDetect(String token, String code, String businessCode, boolean isPassword) {
Class cls = Constants.biopsy == 0 ? FaceActivity.class : HtcjActivity.class;
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
activity.startActivity(new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) cls).putExtra("tokenId", token).putExtra("toolBarTitle", "活体认证").putExtra(Constants.businessCode, code).putExtra(Constants.currentBusinessCode, businessCode).putExtra(Constants.isPassword, isPassword));
}
}
public final void hideLoadingDialog() {
LoadingDialog loadingDialog;
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
if (weakReference == null) {
return;
}
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference2.get();
if (activity == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity, "mActivity.get()!!");
if (activity.isDestroyed() || (loadingDialog = this.mDialog) == null) {
return;
}
Boolean valueOf = Boolean.valueOf(loadingDialog.isShowing());
if (valueOf == null) {
Intrinsics.throwNpe();
}
if (valueOf.booleanValue()) {
this.lock.lock();
try {
LoadingDialog loadingDialog2 = this.mDialog;
if (loadingDialog2 != null) {
loadingDialog2.dismiss();
}
} finally {
this.lock.unlock();
}
}
}
private final void initFile() {
StringBuilder sb = new StringBuilder();
File externalStorageDirectory = Environment.getExternalStorageDirectory();
Intrinsics.checkExpressionValueIsNotNull(externalStorageDirectory, "Environment.getExternalStorageDirectory()");
sb.append(externalStorageDirectory.getPath());
sb.append(AuthenticationPhoneActivity.WHITE_SPACE);
sb.append(SHA256Utils.getSHA256StrJava("pay_sdk"));
sb.append(SHA256Utils.getSHA256StrJava("wallet_" + Constants.walletId + "_sdk"));
String sb2 = sb.toString();
StringBuilder b = r5.b("5upay_");
b.append(Constants.deviceNo);
b.append("sdk");
File file = new File(sb2, SHA256Utils.getSHA256StrJava(b.toString()));
if (!file.exists()) {
File file2 = new File(sb2);
if (!file2.exists()) {
file2.mkdirs();
}
file.createNewFile();
}
Constants.storePath = file.getAbsolutePath();
}
public final void initKey() {
if (TextUtils.isEmpty(Constants.key)) {
initFile();
String str = Constants.storePath;
Intrinsics.checkExpressionValueIsNotNull(str, "Constants.storePath");
Constants.key = getPrivateKey(str);
}
if (TextUtils.isEmpty(Constants.key)) {
hideLoadingDialog();
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
Intent putExtra = new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) CertificateActivity.class).putExtra("toolBarTitle", "安装数字证书").putExtra("tokenId", this.token);
AuthType authType = AuthType.VERIFY_CERT;
activity.startActivity(putExtra.putExtra(Constants.currentBusinessCode, "VERIFY_CERT").putExtra(Constants.businessCode, this.source).addFlags(268435456));
return;
}
return;
}
String str2 = this.source;
AuthType authType2 = AuthType.MANUAL_CHECK_CER;
if (Intrinsics.areEqual(str2, "MANUAL_CHECK_CER")) {
hideLoadingDialog();
WalletPayCallback walletPayCallback = this.walletPayCallback;
if (walletPayCallback != null) {
String str3 = this.source;
Status status = Status.SUCCESS;
walletPayCallback.callback(str3, "SUCCESS", "");
return;
}
return;
}
StringBuilder b = r5.b("调起SDK");
b.append(this.sourceName);
b.append("业务的证书的检查时间:");
b.append(System.currentTimeMillis() - this.start);
LogUtil.d(b.toString());
String str4 = this.token;
if (str4 == null) {
Intrinsics.throwNpe();
}
validateAndQueryInfo$default(this, str4, this.source, null, 4, null);
}
private final void initRetrofitClient() throws UnsupportedEncodingException {
RetrofitClient.Companion companion = RetrofitClient.INSTANCE;
companion.setAPI_VERSION("1.0");
companion.setAPPNAME("Loan");
RequestInfoBean requestInfoBean = new RequestInfoBean();
requestInfoBean.setAPI_VERSION("1.0");
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
String format = String.format("application/vnd.ehking.-v%s+json", Arrays.copyOf(new Object[]{"1.0"}, 1));
Intrinsics.checkExpressionValueIsNotNull(format, "java.lang.String.format(format, *args)");
requestInfoBean.setACCEPT(format);
requestInfoBean.setHOLDER_CODE("CF");
requestInfoBean.setDEBUG(false);
requestInfoBean.setDEFUALT_TIMEOUT(60L);
requestInfoBean.setWRITE_TIMEOUT(60L);
requestInfoBean.setREAD_TIMEOUT(60L);
String str = Constants.baseUrl;
Intrinsics.checkExpressionValueIsNotNull(str, "Constants.baseUrl");
requestInfoBean.setBASE_URL(str);
requestInfoBean.setFLAVOR("dev");
Locale locale = Locale.getDefault();
Intrinsics.checkExpressionValueIsNotNull(locale, "Locale.getDefault()");
String language = locale.getLanguage();
Intrinsics.checkExpressionValueIsNotNull(language, "Locale.getDefault().language");
requestInfoBean.setACCEPT_LANGUAGE(language);
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
requestInfoBean.setContext(weakReference.get());
companion.setRequestInfoBean(requestInfoBean);
}
private final void initWallet(String merchantId, String walletId, String requestId, String token) {
Constants.merchantId = merchantId;
Constants.walletId = walletId;
SystemUtils systemUtils = SystemUtils.INSTANCE;
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
Context applicationContext = activity != null ? activity.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
Constants.deviceNo = systemUtils.getAndroidId(applicationContext);
Constants.requestId = requestId;
Constants.token = token;
Constants.balance = "";
Constants.amount = "";
Constants.REALNAME = "";
Constants.mobileDesc = "";
Constants.idCardNoDesc = "";
this.feeAmount = ShadowDrawableWrapper.COS_45;
this.isOnlySupportBalance = false;
this.isSupportCredit = false;
this.bindCardId = "";
this.payCard = "";
this.productInfo = "";
this.cardList.clear();
}
public final void moveToLeft(View v) {
Intrinsics.checkExpressionValueIsNotNull(v.getContext(), "v.context");
ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(v, PropertyValuesHolder.ofFloat("translationX", -AndroidUtilsKt.getScreenWidth(r2)), PropertyValuesHolder.ofFloat("alpha", 1.0f, 1.0f)).setDuration(200L);
Intrinsics.checkExpressionValueIsNotNull(oa, "oa");
oa.setInterpolator(new LinearInterpolator());
oa.start();
}
@JvmOverloads
private final void onAppPay(String str, String str2, Activity activity) {
onAppPay$default(this, str, str2, activity, null, null, 24, null);
}
@JvmOverloads
private final void onAppPay(String str, String str2, Activity activity, String str3) {
onAppPay$default(this, str, str2, activity, str3, null, 16, null);
}
@JvmOverloads
public final void onAppPay(final String businessCode, String pwd, final Activity mActivity, String payAuthType, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
showLoadingDialog(mActivity);
wepayApi.onAppPayConfirm(new RequestBean.Transfer(Constants.token, this.bindCardId, pwd, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), facePhoto, false, 64, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$onAppPay$1(this, businessCode, mActivity), new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
WalletPay.ServicePayCallback servicePayCallback;
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = businessCode;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", getMMsg());
}
servicePayCallback = WalletPay.this.mServicePayCallback;
if (servicePayCallback != null) {
String str2 = businessCode;
Status status2 = Status.FAIL;
servicePayCallback.callback(str2, "FAIL", getMMsg());
}
}
});
}
public static void onAppPay$default(WalletPay walletPay, String str, String str2, Activity activity, String str3, String str4, int i, Object obj) {
if ((i & 8) != 0) {
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
str3 = "PAY_PASSWORD";
}
String str5 = str3;
if ((i & 16) != 0) {
str4 = "";
}
walletPay.onAppPay(str, str2, activity, str5, str4);
}
@JvmOverloads
private final void onlinePay(String str, String str2, Activity activity) {
onlinePay$default(this, str, str2, activity, null, null, 24, null);
}
@JvmOverloads
private final void onlinePay(String str, String str2, Activity activity, String str3) {
onlinePay$default(this, str, str2, activity, str3, null, 16, null);
}
@JvmOverloads
public final void onlinePay(final String businessCode, String pwd, final Activity mActivity, String payAuthType, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
showLoadingDialog(mActivity);
wepayApi.onlinePayConfirm(new RequestBean.Transfer(Constants.token, this.bindCardId, pwd, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), facePhoto, false, 64, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$onlinePay$1(this, businessCode, mActivity), new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = businessCode;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", getMMsg());
}
}
});
}
public static void onlinePay$default(WalletPay walletPay, String str, String str2, Activity activity, String str3, String str4, int i, Object obj) {
if ((i & 8) != 0) {
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
str3 = "PAY_PASSWORD";
}
String str5 = str3;
if ((i & 16) != 0) {
str4 = "";
}
walletPay.onlinePay(str, str2, activity, str5, str4);
}
public final void openFace(final String businessCode, final Activity mActivity, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
if (mActivity instanceof BaseActivity) {
((BaseActivity) mActivity).showLoadingDialog();
} else {
showLoadingDialog(mActivity);
}
wepayApi.faceScanConfigOpen(new RequestBean.FaceSwitch(facePhoto, false, 2, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new ty2<Beans.FaceSwitchResultInfo>() {
@Override
public final void accept(Beans.FaceSwitchResultInfo faceSwitchResultInfo) {
SettingActivity.SwitchFaceCallBack mSettingFaceCallback;
boolean z;
Activity activity = mActivity;
if (activity instanceof BaseActivity) {
((BaseActivity) activity).hideLoadingDialog();
} else {
WalletPay.this.hideLoadingDialog();
}
if (Intrinsics.areEqual(faceSwitchResultInfo.getStatus(), "SUCCESS")) {
ToastUtil toastUtil = ToastUtil.INSTANCE;
Activity activity2 = mActivity;
Context applicationContext2 = activity2 != null ? activity2.getApplicationContext() : null;
if (applicationContext2 == null) {
Intrinsics.throwNpe();
}
toastUtil.showToast(applicationContext2, "开启成功");
mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback == null) {
return;
} else {
z = true;
}
} else {
ErrorCode errorCode = ErrorCode.EJ0000410;
if (Intrinsics.areEqual("EJ0000410", faceSwitchResultInfo.getCode())) {
WalletPay.this.showFaceResultDialog(mActivity, businessCode, "抱歉,没有认出你来", faceSwitchResultInfo.getCause());
return;
}
mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback == null) {
return;
} else {
z = false;
}
}
mSettingFaceCallback.onOpenResult(z);
}
}, new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
SettingActivity.SwitchFaceCallBack mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback != null) {
mSettingFaceCallback.onOpenResult(false);
}
}
});
}
public static void openFace$default(WalletPay walletPay, String str, Activity activity, String str2, int i, Object obj) {
if ((i & 4) != 0) {
str2 = "";
}
walletPay.openFace(str, activity, str2);
}
private final void passHandle(String token, String businessCode, boolean isPassword, String nextBusinessCode, String businessUrl, String openId, String payAuthType, Beans.WalletSafety walletSafety) {
Activity activity;
Intent putExtra;
Activity activity2;
Intent putExtra2;
this.mPayAuthType = payAuthType;
AuthType authType = AuthType.VERIFY_CERT;
if (Intrinsics.areEqual(businessCode, "VERIFY_CERT")) {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
activity2 = weakReference.get();
if (activity2 == null) {
return;
}
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity3 = weakReference2.get();
putExtra2 = new Intent(activity3 != null ? activity3.getApplicationContext() : null, (Class<?>) CertificateActivity.class).putExtra("toolBarTitle", "安装数字证书").putExtra(Constants.currentBusinessCode, "VERIFY_CERT").putExtra(Constants.businessCode, nextBusinessCode).putExtra(Constants.isPassword, isPassword);
} else {
AuthType authType2 = AuthType.FIRSTSET_PASSWORD;
if (!Intrinsics.areEqual(businessCode, "FIRSTSET_PASSWORD")) {
AuthType authType3 = AuthType.ACCESS_SAFETY;
if (Intrinsics.areEqual(businessCode, "ACCESS_SAFETY")) {
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
activity = weakReference3.get();
if (activity == null) {
return;
}
WeakReference<Activity> weakReference4 = this.mActivity;
if (weakReference4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity4 = weakReference4.get();
putExtra = new Intent(activity4 != null ? activity4.getApplicationContext() : null, (Class<?>) SettingActivity.class).putExtra("startTime", this.start).putExtra("bean", walletSafety);
} else {
AuthType authType4 = AuthType.ACCESS_CARDlIST;
if (!Intrinsics.areEqual(businessCode, "ACCESS_CARDlIST")) {
AuthType authType5 = AuthType.RECHARGE;
if (!Intrinsics.areEqual(businessCode, "RECHARGE")) {
AuthType authType6 = AuthType.TRANSFER;
if (!Intrinsics.areEqual(businessCode, "TRANSFER")) {
AuthType authType7 = AuthType.WITHHOLDING;
if (!Intrinsics.areEqual(businessCode, "WITHHOLDING")) {
AuthType authType8 = AuthType.REDPACKET;
if (!Intrinsics.areEqual(businessCode, "REDPACKET")) {
AuthType authType9 = AuthType.ONLINEPAY;
if (!Intrinsics.areEqual(businessCode, "ONLINEPAY")) {
AuthType authType10 = AuthType.APP_PAY;
if (!Intrinsics.areEqual(businessCode, "APP_PAY")) {
AuthType authType11 = AuthType.VALIDATE_PASSWORD;
if (Intrinsics.areEqual(businessCode, "VALIDATE_PASSWORD")) {
showCheckPwdDialog$default(this, businessCode, null, 2, null);
return;
}
return;
}
}
}
}
}
}
showPayDialog$default(this, businessCode, false, null, 6, null);
return;
}
WeakReference<Activity> weakReference5 = this.mActivity;
if (weakReference5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
activity = weakReference5.get();
if (activity == null) {
return;
}
WeakReference<Activity> weakReference6 = this.mActivity;
if (weakReference6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity5 = weakReference6.get();
putExtra = new Intent(activity5 != null ? activity5.getApplicationContext() : null, (Class<?>) BankCardActivity.class).putExtra("startTime", this.start);
}
activity.startActivity(putExtra.addFlags(268435456));
return;
}
WeakReference<Activity> weakReference7 = this.mActivity;
if (weakReference7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
activity2 = weakReference7.get();
if (activity2 == null) {
return;
}
WeakReference<Activity> weakReference8 = this.mActivity;
if (weakReference8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity6 = weakReference8.get();
putExtra2 = new Intent(activity6 != null ? activity6.getApplicationContext() : null, (Class<?>) SetPwdActivity.class).putExtra(Constants.businessCode, nextBusinessCode).putExtra(Constants.isFirstSetPwd, true);
}
activity2.startActivity(putExtra2.putExtra("tokenId", token).addFlags(268435456));
}
public static void passHandle$default(WalletPay walletPay, String str, String str2, boolean z, String str3, String str4, String str5, String str6, Beans.WalletSafety walletSafety, int i, Object obj) {
String str7;
boolean z2 = (i & 4) != 0 ? true : z;
String str8 = (i & 8) != 0 ? "" : str3;
String str9 = (i & 16) != 0 ? "" : str4;
String str10 = (i & 32) != 0 ? "" : str5;
if ((i & 64) != 0) {
PayAuthType payAuthType = PayAuthType.FORCE_PAY_PASSWORD;
str7 = "FORCE_PAY_PASSWORD";
} else {
str7 = str6;
}
walletPay.passHandle(str, str2, z2, str8, str9, str10, str7, (i & 128) != 0 ? null : walletSafety);
}
@JvmOverloads
private final void redEnvelope(String str, String str2, Activity activity) {
redEnvelope$default(this, str, str2, activity, null, null, 24, null);
}
@JvmOverloads
private final void redEnvelope(String str, String str2, Activity activity, String str3) {
redEnvelope$default(this, str, str2, activity, str3, null, 16, null);
}
@JvmOverloads
public final void redEnvelope(final String businessCode, String pwd, final Activity mActivity, String payAuthType, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
showLoadingDialog(mActivity);
wepayApi.redEnvelope(new RequestBean.Transfer(Constants.token, this.bindCardId, pwd, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), facePhoto, false, 64, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$redEnvelope$1(this, businessCode, mActivity), new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = businessCode;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", e.getMessage());
}
}
});
}
public static void redEnvelope$default(WalletPay walletPay, String str, String str2, Activity activity, String str3, String str4, int i, Object obj) {
if ((i & 8) != 0) {
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
str3 = "PAY_PASSWORD";
}
String str5 = str3;
if ((i & 16) != 0) {
str4 = "";
}
walletPay.redEnvelope(str, str2, activity, str5, str4);
}
public static void setColor$default(WalletPay walletPay, String str, String str2, String str3, String str4, int i, Object obj) {
if ((i & 1) != 0) {
str = "#FF5252";
}
if ((i & 2) != 0) {
str2 = "#f3f4f6";
}
if ((i & 4) != 0) {
str3 = "#FFFFFF";
}
if ((i & 8) != 0) {
str4 = "#666666";
}
walletPay.setColor(str, str2, str3, str4);
}
public static void setEnvironment$default(WalletPay walletPay, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = "qa";
}
walletPay.setEnvironment(str);
}
public static void setToolBarBackImg$default(WalletPay walletPay, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = 0;
}
walletPay.setToolBarBackImg(i);
}
private final void showCheckPwdDialog(final String businessCode, String defaultPayAuthType) {
int i;
Window window;
View decorView;
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity == null) {
Intrinsics.throwNpe();
}
final AlertDialog create = new AlertDialog.Builder(activity).create();
this.checkPwdDialog = create;
if (create != null) {
LoadingDialog loadingDialog = this.mDialog;
if (loadingDialog != null && (window = loadingDialog.getWindow()) != null && (decorView = window.getDecorView()) != null) {
decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
@Override
public final void onSystemUiVisibilityChange(int i2) {
LoadingDialog loadingDialog2;
loadingDialog2 = WalletPay.this.mDialog;
if (loadingDialog2 == null) {
Intrinsics.throwNpe();
}
Window window2 = loadingDialog2.getWindow();
Intrinsics.checkExpressionValueIsNotNull(window2, "mDialog!!.window");
View decorView2 = window2.getDecorView();
Intrinsics.checkExpressionValueIsNotNull(decorView2, "mDialog!!.window.decorView");
decorView2.setSystemUiVisibility(5122);
}
});
}
create.show();
Window window2 = create.getWindow();
window2.addFlags(8192);
window2.setBackgroundDrawableResource(android.R.color.transparent);
window2.setWindowAnimations(R.style.BottomAnimDialogStyle);
window2.setGravity(17);
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
final View inflate = View.inflate(weakReference2.get(), R.layout.webox_dialog_check_pwd, null);
window2.setContentView(inflate);
create.setCanceledOnTouchOutside(false);
final PasswordEditText password = (PasswordEditText) window2.findViewById(R.id.layout_password_input_password);
View findViewById = window2.findViewById(R.id.layout_password_keyboard);
Intrinsics.checkExpressionValueIsNotNull(findViewById, "window.findViewById(R.id.layout_password_keyboard)");
final KeyboardView keyboardView = (KeyboardView) findViewById;
View findViewById2 = window2.findViewById(R.id.btn_confirm_pay);
Intrinsics.checkExpressionValueIsNotNull(findViewById2, "window.findViewById(R.id.btn_confirm_pay)");
final Button button = (Button) findViewById2;
final View findViewById3 = window2.findViewById(R.id.face_ic);
Intrinsics.checkExpressionValueIsNotNull(findViewById3, "window.findViewById(R.id.face_ic)");
final View findViewById4 = window2.findViewById(R.id.pwd_ic);
Intrinsics.checkExpressionValueIsNotNull(findViewById4, "window.findViewById(R.id.pwd_ic)");
View findViewById5 = window2.findViewById(R.id.tv_check_title);
Intrinsics.checkExpressionValueIsNotNull(findViewById5, "window.findViewById(R.id.tv_check_title)");
final TextView textView = (TextView) findViewById5;
button.setBackgroundColor(Color.parseColor(Constants.buttonColor));
button.setTextColor(Color.parseColor(Constants.buttonTextColor));
password.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PasswordEditText.this.requestFocus();
keyboardView.setVisibility(0);
}
});
final TextView switchFace = (TextView) window2.findViewById(R.id.tv_switch_face);
String str = this.mPayAuthType;
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
if (!Intrinsics.areEqual(str, "PAY_PASSWORD")) {
PayAuthType payAuthType2 = PayAuthType.FACE_SCAN;
if (Intrinsics.areEqual(str, "FACE_SCAN")) {
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference3.get();
if (activity2 == null) {
Intrinsics.throwNpe();
}
switchFace.setText(activity2.getString(R.string.use_pwd));
WeakReference<Activity> weakReference4 = this.mActivity;
if (weakReference4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity3 = weakReference4.get();
if (activity3 == null) {
Intrinsics.throwNpe();
}
textView.setText(activity3.getString(R.string.face));
Intrinsics.checkExpressionValueIsNotNull(password, "password");
password.setVisibility(8);
keyboardView.setVisibility(4);
button.setVisibility(0);
findViewById3.setVisibility(0);
findViewById4.setVisibility(8);
} else {
PayAuthType payAuthType3 = PayAuthType.FORCE_FACE_SCAN;
if (Intrinsics.areEqual(str, "FORCE_FACE_SCAN")) {
WeakReference<Activity> weakReference5 = this.mActivity;
if (weakReference5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity4 = weakReference5.get();
if (activity4 == null) {
Intrinsics.throwNpe();
}
textView.setText(activity4.getString(R.string.face));
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
i = 8;
switchFace.setVisibility(8);
Intrinsics.checkExpressionValueIsNotNull(password, "password");
password.setVisibility(8);
keyboardView.setVisibility(4);
button.setVisibility(0);
findViewById3.setVisibility(0);
} else {
WeakReference<Activity> weakReference6 = this.mActivity;
if (weakReference6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity5 = weakReference6.get();
if (activity5 == null) {
Intrinsics.throwNpe();
}
textView.setText(activity5.getString(R.string.pwd));
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
switchFace.setVisibility(8);
Intrinsics.checkExpressionValueIsNotNull(password, "password");
password.setVisibility(0);
keyboardView.setVisibility(0);
button.setVisibility(8);
findViewById3.setVisibility(8);
findViewById4.setVisibility(0);
PayAuthType payAuthType4 = PayAuthType.FORCE_PAY_PASSWORD;
this.mPayAuthType = "FORCE_PAY_PASSWORD";
}
}
switchFace.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
String str2;
str2 = this.mPayAuthType;
PayAuthType payAuthType5 = PayAuthType.PAY_PASSWORD;
if (Intrinsics.areEqual(str2, "PAY_PASSWORD")) {
TextView textView2 = textView;
Object obj = WalletPay.access$getMActivity$p(this).get();
if (obj == null) {
Intrinsics.throwNpe();
}
textView2.setText(((Activity) obj).getString(R.string.face));
TextView switchFace2 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace2, "switchFace");
Object obj2 = WalletPay.access$getMActivity$p(this).get();
if (obj2 == null) {
Intrinsics.throwNpe();
}
switchFace2.setText(((Activity) obj2).getString(R.string.use_pwd));
PasswordEditText password2 = password;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
password2.setVisibility(8);
keyboardView.setVisibility(4);
button.setVisibility(0);
findViewById3.setVisibility(0);
findViewById4.setVisibility(8);
WalletPay walletPay = this;
PayAuthType payAuthType6 = PayAuthType.FACE_SCAN;
walletPay.mPayAuthType = "FACE_SCAN";
return;
}
PayAuthType payAuthType7 = PayAuthType.FACE_SCAN;
if (Intrinsics.areEqual(str2, "FACE_SCAN")) {
TextView textView3 = textView;
Object obj3 = WalletPay.access$getMActivity$p(this).get();
if (obj3 == null) {
Intrinsics.throwNpe();
}
textView3.setText(((Activity) obj3).getString(R.string.pwd));
TextView switchFace3 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace3, "switchFace");
Object obj4 = WalletPay.access$getMActivity$p(this).get();
if (obj4 == null) {
Intrinsics.throwNpe();
}
switchFace3.setText(((Activity) obj4).getString(R.string.use_face));
PasswordEditText password3 = password;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
password3.setVisibility(0);
keyboardView.setVisibility(0);
button.setVisibility(8);
findViewById3.setVisibility(8);
findViewById4.setVisibility(0);
this.mPayAuthType = "PAY_PASSWORD";
}
}
});
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
WalletPay walletPay = this;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
walletPay.getFacePermission((Activity) obj, businessCode, inflate);
}
});
final ArrayList arrayList = new ArrayList();
keyboardView.setOnKeyChangeListener(new KeyChangeListener() {
@Override
public final void onKeyChange(View view, String decKey, String str2) {
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
if (text.length() >= 6 || arrayList.size() >= 6) {
if (str2 == null) {
Intrinsics.throwNpe();
}
if (str2.length() > 0) {
arrayList.clear();
PasswordEditText password3 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
Editable text2 = password3.getText();
if (text2 == null) {
Intrinsics.throwNpe();
}
text2.clear();
return;
}
}
if (str2 == null) {
Intrinsics.throwNpe();
}
if (str2.length() == 0) {
PasswordEditText password4 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password4, "password");
Editable text3 = password4.getText();
if (text3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(text3, "password.text!!");
if (text3.length() > 0) {
PasswordEditText password5 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password5, "password");
Editable text4 = password5.getText();
if (text4 == null) {
Intrinsics.throwNpe();
}
if (text4.length() <= 1) {
PasswordEditText password6 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password6, "password");
Editable text5 = password6.getText();
if (text5 == null) {
Intrinsics.throwNpe();
}
text5.clear();
arrayList.clear();
return;
}
PasswordEditText password7 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password7, "password");
Editable text6 = password7.getText();
if (text6 == null) {
Intrinsics.throwNpe();
}
PasswordEditText password8 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password8, "password");
Editable text7 = password8.getText();
if (text7 == null) {
Intrinsics.throwNpe();
}
int length = text7.length() - 1;
PasswordEditText password9 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password9, "password");
Editable text8 = password9.getText();
if (text8 == null) {
Intrinsics.throwNpe();
}
text6.delete(length, text8.length());
ArrayList arrayList2 = arrayList;
PasswordEditText password10 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password10, "password");
Editable text9 = password10.getText();
if (text9 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(arrayList2.remove(text9.length()), "aList.removeAt(password.text!!.length)");
return;
}
return;
}
PasswordEditText password11 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password11, "password");
Editable text10 = password11.getText();
if (text10 == null) {
Intrinsics.throwNpe();
}
if (text10.length() < 6) {
PasswordEditText password12 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password12, "password");
Editable text11 = password12.getText();
if (text11 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(decKey, "decKey");
if (decKey == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring = decKey.substring(0, 1);
Intrinsics.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
text11.append((CharSequence) substring);
arrayList.add(str2);
}
PasswordEditText password13 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password13, "password");
Editable text12 = password13.getText();
if (text12 == null) {
Intrinsics.throwNpe();
}
if (text12.length() == 6 && arrayList.size() == 6) {
keyboardView.setVisibility(8);
create.dismiss();
StringBuffer stringBuffer = new StringBuffer();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
stringBuffer.append(((String) it.next()) + ';');
}
String stringBuffer2 = stringBuffer.toString();
Intrinsics.checkExpressionValueIsNotNull(stringBuffer2, "sb.toString()");
int length2 = stringBuffer.toString().length() - 1;
if (stringBuffer2 == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring2 = stringBuffer2.substring(0, length2);
Intrinsics.checkExpressionValueIsNotNull(substring2, "(this as java.lang.Strin…ing(startIndex, endIndex)");
WalletPay walletPay = this;
String str3 = businessCode;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
WalletPay.checkPwd$default(walletPay, str3, substring2, (Activity) obj, null, null, 24, null);
PasswordEditText password14 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password14, "password");
Editable text13 = password14.getText();
if (text13 == null) {
Intrinsics.throwNpe();
}
text13.clear();
arrayList.clear();
}
}
});
((ImageButton) window2.findViewById(R.id.ibtn_close1)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str2 = businessCode;
Status status = Status.CANCEL;
walletPayCallback.callback(str2, "CANCEL", Constants.cancel);
}
AlertDialog.this.dismiss();
}
});
create.setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public final boolean onKey(DialogInterface dialogInterface, int i2, KeyEvent keyEvent) {
if (i2 != 4) {
return false;
}
AlertDialog.this.dismiss();
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str2 = businessCode;
Status status = Status.CANCEL;
walletPayCallback.callback(str2, "CANCEL", Constants.cancel);
}
return true;
}
});
create.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
text.clear();
arrayList.clear();
}
});
}
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
WeakReference<Activity> weakReference7 = this.mActivity;
if (weakReference7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity6 = weakReference7.get();
if (activity6 == null) {
Intrinsics.throwNpe();
}
switchFace.setText(activity6.getString(R.string.use_face));
WeakReference<Activity> weakReference8 = this.mActivity;
if (weakReference8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity7 = weakReference8.get();
if (activity7 == null) {
Intrinsics.throwNpe();
}
textView.setText(activity7.getString(R.string.pwd));
i = 0;
button.setVisibility(0);
Intrinsics.checkExpressionValueIsNotNull(password, "password");
password.setVisibility(0);
keyboardView.setVisibility(0);
button.setVisibility(8);
findViewById3.setVisibility(8);
findViewById4.setVisibility(i);
switchFace.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
String str2;
str2 = this.mPayAuthType;
PayAuthType payAuthType5 = PayAuthType.PAY_PASSWORD;
if (Intrinsics.areEqual(str2, "PAY_PASSWORD")) {
TextView textView2 = textView;
Object obj = WalletPay.access$getMActivity$p(this).get();
if (obj == null) {
Intrinsics.throwNpe();
}
textView2.setText(((Activity) obj).getString(R.string.face));
TextView switchFace2 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace2, "switchFace");
Object obj2 = WalletPay.access$getMActivity$p(this).get();
if (obj2 == null) {
Intrinsics.throwNpe();
}
switchFace2.setText(((Activity) obj2).getString(R.string.use_pwd));
PasswordEditText password2 = password;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
password2.setVisibility(8);
keyboardView.setVisibility(4);
button.setVisibility(0);
findViewById3.setVisibility(0);
findViewById4.setVisibility(8);
WalletPay walletPay = this;
PayAuthType payAuthType6 = PayAuthType.FACE_SCAN;
walletPay.mPayAuthType = "FACE_SCAN";
return;
}
PayAuthType payAuthType7 = PayAuthType.FACE_SCAN;
if (Intrinsics.areEqual(str2, "FACE_SCAN")) {
TextView textView3 = textView;
Object obj3 = WalletPay.access$getMActivity$p(this).get();
if (obj3 == null) {
Intrinsics.throwNpe();
}
textView3.setText(((Activity) obj3).getString(R.string.pwd));
TextView switchFace3 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace3, "switchFace");
Object obj4 = WalletPay.access$getMActivity$p(this).get();
if (obj4 == null) {
Intrinsics.throwNpe();
}
switchFace3.setText(((Activity) obj4).getString(R.string.use_face));
PasswordEditText password3 = password;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
password3.setVisibility(0);
keyboardView.setVisibility(0);
button.setVisibility(8);
findViewById3.setVisibility(8);
findViewById4.setVisibility(0);
this.mPayAuthType = "PAY_PASSWORD";
}
}
});
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
WalletPay walletPay = this;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
walletPay.getFacePermission((Activity) obj, businessCode, inflate);
}
});
final ArrayList arrayList2 = new ArrayList();
keyboardView.setOnKeyChangeListener(new KeyChangeListener() {
@Override
public final void onKeyChange(View view, String decKey, String str2) {
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
if (text.length() >= 6 || arrayList2.size() >= 6) {
if (str2 == null) {
Intrinsics.throwNpe();
}
if (str2.length() > 0) {
arrayList2.clear();
PasswordEditText password3 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
Editable text2 = password3.getText();
if (text2 == null) {
Intrinsics.throwNpe();
}
text2.clear();
return;
}
}
if (str2 == null) {
Intrinsics.throwNpe();
}
if (str2.length() == 0) {
PasswordEditText password4 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password4, "password");
Editable text3 = password4.getText();
if (text3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(text3, "password.text!!");
if (text3.length() > 0) {
PasswordEditText password5 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password5, "password");
Editable text4 = password5.getText();
if (text4 == null) {
Intrinsics.throwNpe();
}
if (text4.length() <= 1) {
PasswordEditText password6 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password6, "password");
Editable text5 = password6.getText();
if (text5 == null) {
Intrinsics.throwNpe();
}
text5.clear();
arrayList2.clear();
return;
}
PasswordEditText password7 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password7, "password");
Editable text6 = password7.getText();
if (text6 == null) {
Intrinsics.throwNpe();
}
PasswordEditText password8 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password8, "password");
Editable text7 = password8.getText();
if (text7 == null) {
Intrinsics.throwNpe();
}
int length = text7.length() - 1;
PasswordEditText password9 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password9, "password");
Editable text8 = password9.getText();
if (text8 == null) {
Intrinsics.throwNpe();
}
text6.delete(length, text8.length());
ArrayList arrayList22 = arrayList2;
PasswordEditText password10 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password10, "password");
Editable text9 = password10.getText();
if (text9 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(arrayList22.remove(text9.length()), "aList.removeAt(password.text!!.length)");
return;
}
return;
}
PasswordEditText password11 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password11, "password");
Editable text10 = password11.getText();
if (text10 == null) {
Intrinsics.throwNpe();
}
if (text10.length() < 6) {
PasswordEditText password12 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password12, "password");
Editable text11 = password12.getText();
if (text11 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(decKey, "decKey");
if (decKey == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring = decKey.substring(0, 1);
Intrinsics.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
text11.append((CharSequence) substring);
arrayList2.add(str2);
}
PasswordEditText password13 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password13, "password");
Editable text12 = password13.getText();
if (text12 == null) {
Intrinsics.throwNpe();
}
if (text12.length() == 6 && arrayList2.size() == 6) {
keyboardView.setVisibility(8);
create.dismiss();
StringBuffer stringBuffer = new StringBuffer();
Iterator it = arrayList2.iterator();
while (it.hasNext()) {
stringBuffer.append(((String) it.next()) + ';');
}
String stringBuffer2 = stringBuffer.toString();
Intrinsics.checkExpressionValueIsNotNull(stringBuffer2, "sb.toString()");
int length2 = stringBuffer.toString().length() - 1;
if (stringBuffer2 == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring2 = stringBuffer2.substring(0, length2);
Intrinsics.checkExpressionValueIsNotNull(substring2, "(this as java.lang.Strin…ing(startIndex, endIndex)");
WalletPay walletPay = this;
String str3 = businessCode;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
WalletPay.checkPwd$default(walletPay, str3, substring2, (Activity) obj, null, null, 24, null);
PasswordEditText password14 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password14, "password");
Editable text13 = password14.getText();
if (text13 == null) {
Intrinsics.throwNpe();
}
text13.clear();
arrayList2.clear();
}
}
});
((ImageButton) window2.findViewById(R.id.ibtn_close1)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str2 = businessCode;
Status status = Status.CANCEL;
walletPayCallback.callback(str2, "CANCEL", Constants.cancel);
}
AlertDialog.this.dismiss();
}
});
create.setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public final boolean onKey(DialogInterface dialogInterface, int i2, KeyEvent keyEvent) {
if (i2 != 4) {
return false;
}
AlertDialog.this.dismiss();
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str2 = businessCode;
Status status = Status.CANCEL;
walletPayCallback.callback(str2, "CANCEL", Constants.cancel);
}
return true;
}
});
create.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
text.clear();
arrayList2.clear();
}
});
}
}
public static void showCheckPwdDialog$default(WalletPay walletPay, String str, String str2, int i, Object obj) {
if ((i & 2) != 0) {
PayAuthType payAuthType = PayAuthType.FORCE_PAY_PASSWORD;
str2 = "FORCE_PAY_PASSWORD";
}
walletPay.showCheckPwdDialog(str, str2);
}
@JvmOverloads
private final void showFaceResultDialog(Activity activity, String str, String str2) {
showFaceResultDialog$default(this, activity, str, str2, null, 8, null);
}
@JvmOverloads
public final void showFaceResultDialog(final Activity activity, final String businessCode, String msg, String msg2) {
final Ref.ObjectRef objectRef = new Ref.ObjectRef();
if (activity == null) {
Intrinsics.throwNpe();
}
?? create = new AlertDialog.Builder(activity).create();
objectRef.element = create;
create.show();
AlertDialog faceResultDialog = (AlertDialog) objectRef.element;
Intrinsics.checkExpressionValueIsNotNull(faceResultDialog, "faceResultDialog");
Window window = faceResultDialog.getWindow();
window.setBackgroundDrawableResource(android.R.color.transparent);
window.setWindowAnimations(R.style.BottomAnimDialogStyle);
window.setGravity(17);
window.setContentView(View.inflate(activity, R.layout.webox_dialog_face_result, null));
((AlertDialog) objectRef.element).setCanceledOnTouchOutside(false);
((AlertDialog) objectRef.element).setCancelable(false);
TextView textView = (TextView) window.findViewById(R.id.dialog_face_result_cancel);
View findViewById = window.findViewById(R.id.dialog_face_result_retry);
Intrinsics.checkExpressionValueIsNotNull(findViewById, "window.findViewById(R.id.dialog_face_result_retry)");
TextView textView2 = (TextView) findViewById;
View findViewById2 = window.findViewById(R.id.dialog_face_result_msg);
Intrinsics.checkExpressionValueIsNotNull(findViewById2, "window.findViewById(R.id.dialog_face_result_msg)");
View findViewById3 = window.findViewById(R.id.dialog_face_result_msg2);
Intrinsics.checkExpressionValueIsNotNull(findViewById3, "window.findViewById(R.id.dialog_face_result_msg2)");
TextView textView3 = (TextView) findViewById3;
((TextView) findViewById2).setText(msg);
if (msg2 != null) {
textView3.setText(msg2);
}
textView2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
View view2;
((AlertDialog) objectRef.element).dismiss();
WalletPay walletPay = WalletPay.this;
Activity activity2 = activity;
String str = businessCode;
view2 = walletPay.mDialogContentView;
walletPay.getFacePermission(activity2, str, view2);
}
});
textView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
View view2;
((AlertDialog) objectRef.element).dismiss();
view2 = WalletPay.this.mDialogContentView;
if (view2 != null) {
WalletPay.this.enterCenter(view2);
}
}
});
}
public static void showFaceResultDialog$default(WalletPay walletPay, Activity activity, String str, String str2, String str3, int i, Object obj) {
if ((i & 8) != 0) {
str3 = null;
}
walletPay.showFaceResultDialog(activity, str, str2, str3);
}
private final void showLoadingDialog(Activity mActivity) {
if (mActivity == null || mActivity.isDestroyed()) {
return;
}
if (this.mDialog == null) {
this.mDialog = new LoadingDialog(mActivity);
}
LoadingDialog loadingDialog = this.mDialog;
if (loadingDialog == null || loadingDialog.isShowing()) {
return;
}
this.lock.lock();
try {
LoadingDialog loadingDialog2 = this.mDialog;
if (loadingDialog2 != null) {
loadingDialog2.show();
}
} finally {
this.lock.unlock();
}
}
@JvmOverloads
private final void showPayDialog(String str) {
showPayDialog$default(this, str, false, null, 6, null);
}
@JvmOverloads
private final void showPayDialog(String str, boolean z) {
showPayDialog$default(this, str, z, null, 4, null);
}
@JvmOverloads
private final void showPayDialog(final String businessCode, final boolean switchPayModelList, String defaultPayAuthType) {
TextView textView;
TextView textView2;
ImageView imageView;
TextView textView3;
View view;
int i;
int i2;
Iterator<Card> it;
Card card;
Iterator<Card> it2;
ImageView imageView2;
String str;
String lite_volatile;
Window window;
View decorView;
LogUtil.i("默认验证方式为" + defaultPayAuthType);
this.bindCardId = "";
this.payCard = "";
AlertDialog alertDialog = this.mOptionAd;
if (alertDialog != null) {
alertDialog.dismiss();
Unit unit = Unit.INSTANCE;
}
AlertDialog alertDialog2 = this.mOptionAd1;
if (alertDialog2 != null) {
alertDialog2.dismiss();
Unit unit2 = Unit.INSTANCE;
}
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity == null) {
Intrinsics.throwNpe();
}
final AlertDialog create = new AlertDialog.Builder(activity).create();
this.mOptionAd = create;
if (create == null) {
return;
}
LoadingDialog loadingDialog = this.mDialog;
if (loadingDialog != null && (window = loadingDialog.getWindow()) != null && (decorView = window.getDecorView()) != null) {
decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
@Override
public final void onSystemUiVisibilityChange(int i3) {
LoadingDialog loadingDialog2;
loadingDialog2 = WalletPay.this.mDialog;
if (loadingDialog2 == null) {
Intrinsics.throwNpe();
}
Window window2 = loadingDialog2.getWindow();
Intrinsics.checkExpressionValueIsNotNull(window2, "mDialog!!.window");
View decorView2 = window2.getDecorView();
Intrinsics.checkExpressionValueIsNotNull(decorView2, "mDialog!!.window.decorView");
decorView2.setSystemUiVisibility(5122);
}
});
Unit unit3 = Unit.INSTANCE;
}
create.show();
final ArrayList arrayList = new ArrayList();
Window window2 = create.getWindow();
window2.addFlags(8192);
window2.setBackgroundDrawableResource(android.R.color.transparent);
window2.setWindowAnimations(R.style.BottomAnimDialogStyle);
window2.setGravity(17);
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
View inflate = View.inflate(weakReference2.get(), R.layout.webox_dialog_pay, null);
window2.setContentView(inflate);
create.setCanceledOnTouchOutside(false);
StringBuilder b = r5.b("SDK调起");
b.append(this.sourceName);
b.append("业务到收银台总共用的时间:");
b.append(System.currentTimeMillis() - this.start);
String sb = b.toString();
this.payDialogTimeText = sb;
LogUtil.d(sb);
TextView textView4 = (TextView) window2.findViewById(R.id.amount);
ImageView imageView3 = (ImageView) window2.findViewById(R.id.iv_card);
final Ref.ObjectRef objectRef = new Ref.ObjectRef();
objectRef.element = (TextView) window2.findViewById(R.id.bank_num);
TextView textView5 = (TextView) window2.findViewById(R.id.type);
TextView textView6 = (TextView) window2.findViewById(R.id.payText);
TextView feeText = (TextView) window2.findViewById(R.id.tv_fee);
AuthType authType = AuthType.WITHHOLDING;
if (Intrinsics.areEqual(businessCode, "WITHHOLDING")) {
imageView = imageView3;
textView3 = textView4;
view = inflate;
textView = textView5;
textView2 = textView6;
if (new BigDecimal(this.feeAmount).setScale(2).doubleValue() > 0) {
View findViewById = window2.findViewById(R.id.rl_fee);
Intrinsics.checkExpressionValueIsNotNull(findViewById, "window.findViewById<View>(R.id.rl_fee)");
findViewById.setVisibility(0);
DecimalFormat decimalFormat = new DecimalFormat("0.00");
Intrinsics.checkExpressionValueIsNotNull(feeText, "feeText");
feeText.setText("¥ " + decimalFormat.format(new BigDecimal(this.feeAmount).setScale(2).doubleValue() / 100));
}
} else {
textView = textView5;
textView2 = textView6;
imageView = imageView3;
textView3 = textView4;
view = inflate;
View findViewById2 = window2.findViewById(R.id.rl_fee);
Intrinsics.checkExpressionValueIsNotNull(findViewById2, "window.findViewById<View>(R.id.rl_fee)");
findViewById2.setVisibility(8);
}
((ImageButton) window2.findViewById(R.id.ibtn_close1)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
WalletPay.ServicePayCallback servicePayCallback;
AlertDialog.this.dismiss();
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str2 = businessCode;
Status status = Status.CANCEL;
walletPayCallback.callback(str2, "CANCEL", Constants.cancel);
}
servicePayCallback = this.mServicePayCallback;
if (servicePayCallback != null) {
String str3 = businessCode;
Status status2 = Status.CANCEL;
servicePayCallback.callback(str3, "CANCEL", Constants.cancel);
}
}
});
create.setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public final boolean onKey(DialogInterface dialogInterface, int i3, KeyEvent keyEvent) {
WalletPay.ServicePayCallback servicePayCallback;
if (i3 != 4) {
return false;
}
AlertDialog.this.dismiss();
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str2 = businessCode;
Status status = Status.CANCEL;
walletPayCallback.callback(str2, "CANCEL", Constants.cancel);
}
servicePayCallback = this.mServicePayCallback;
if (servicePayCallback != null) {
String str3 = businessCode;
Status status2 = Status.CANCEL;
servicePayCallback.callback(str3, "CANCEL", Constants.cancel);
}
return true;
}
});
AuthType authType2 = AuthType.RECHARGE;
String str2 = "充值";
if (Intrinsics.areEqual(businessCode, "RECHARGE")) {
this.isSupportCredit = false;
} else if (Intrinsics.areEqual(businessCode, "WITHHOLDING")) {
this.isSupportCredit = false;
str2 = "提现";
} else {
AuthType authType3 = AuthType.TRANSFER;
if (Intrinsics.areEqual(businessCode, "TRANSFER")) {
this.isSupportCredit = false;
str2 = "转账";
} else {
AuthType authType4 = AuthType.REDPACKET;
if (Intrinsics.areEqual(businessCode, "REDPACKET")) {
this.isSupportCredit = false;
str2 = "红包";
} else {
AuthType authType5 = AuthType.APP_PAY;
if (Intrinsics.areEqual(businessCode, "APP_PAY")) {
str2 = TextUtils.isEmpty(this.appPayOrderInfo) ? "服务号支付" : this.appPayOrderInfo;
} else {
AuthType authType6 = AuthType.ONLINEPAY;
if (Intrinsics.areEqual(businessCode, "ONLINEPAY")) {
str2 = TextUtils.isEmpty(this.productInfo) ? "订单支付" : this.productInfo;
}
}
}
}
}
TextView typeText = textView;
Intrinsics.checkExpressionValueIsNotNull(typeText, "typeText");
typeText.setText(str2);
boolean areEqual = Intrinsics.areEqual("WITHHOLDING", businessCode);
TextView payText = textView2;
Intrinsics.checkExpressionValueIsNotNull(payText, "payText");
payText.setText(areEqual ? "到账银行卡" : "支付方式");
final PasswordEditText password = (PasswordEditText) window2.findViewById(R.id.layout_password_input_password);
View findViewById3 = window2.findViewById(R.id.layout_password_keyboard);
Intrinsics.checkExpressionValueIsNotNull(findViewById3, "window.findViewById(R.id.layout_password_keyboard)");
final KeyboardView keyboardView = (KeyboardView) findViewById3;
View findViewById4 = window2.findViewById(R.id.btn_confirm_pay);
Intrinsics.checkExpressionValueIsNotNull(findViewById4, "window.findViewById(R.id.btn_confirm_pay)");
final Button button = (Button) findViewById4;
button.setBackgroundColor(Color.parseColor(Constants.buttonColor));
button.setTextColor(Color.parseColor(Constants.buttonTextColor));
password.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
PasswordEditText.this.requestFocus();
keyboardView.setVisibility(0);
}
});
final TextView switchFace = (TextView) window2.findViewById(R.id.tv_switch_face);
String str3 = this.mPayAuthType;
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
if (Intrinsics.areEqual(str3, "PAY_PASSWORD")) {
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference3.get();
if (activity2 == null) {
Intrinsics.throwNpe();
}
switchFace.setText(activity2.getString(R.string.use_face));
button.setVisibility(0);
Intrinsics.checkExpressionValueIsNotNull(password, "password");
password.setVisibility(0);
keyboardView.setVisibility(0);
i2 = 8;
} else {
PayAuthType payAuthType2 = PayAuthType.FACE_SCAN;
if (Intrinsics.areEqual(str3, "FACE_SCAN")) {
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
WeakReference<Activity> weakReference4 = this.mActivity;
if (weakReference4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity3 = weakReference4.get();
if (activity3 == null) {
Intrinsics.throwNpe();
}
switchFace.setText(activity3.getString(R.string.use_pwd));
Intrinsics.checkExpressionValueIsNotNull(password, "password");
i = 8;
} else {
PayAuthType payAuthType3 = PayAuthType.FORCE_FACE_SCAN;
if (!Intrinsics.areEqual(str3, "FORCE_FACE_SCAN")) {
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
switchFace.setVisibility(8);
Intrinsics.checkExpressionValueIsNotNull(password, "password");
password.setVisibility(0);
keyboardView.setVisibility(0);
button.setVisibility(8);
PayAuthType payAuthType4 = PayAuthType.FORCE_PAY_PASSWORD;
this.mPayAuthType = "FORCE_PAY_PASSWORD";
ImageView imageView4 = imageView;
TextView amount = textView3;
final View view2 = view;
switchFace.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
String str4;
str4 = this.mPayAuthType;
PayAuthType payAuthType5 = PayAuthType.PAY_PASSWORD;
if (Intrinsics.areEqual(str4, "PAY_PASSWORD")) {
TextView switchFace2 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace2, "switchFace");
Object obj = WalletPay.access$getMActivity$p(this).get();
if (obj == null) {
Intrinsics.throwNpe();
}
switchFace2.setText(((Activity) obj).getString(R.string.use_pwd));
PasswordEditText password2 = password;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
password2.setVisibility(8);
keyboardView.setVisibility(4);
button.setVisibility(0);
WalletPay walletPay = this;
PayAuthType payAuthType6 = PayAuthType.FACE_SCAN;
walletPay.mPayAuthType = "FACE_SCAN";
} else {
PayAuthType payAuthType7 = PayAuthType.FACE_SCAN;
if (Intrinsics.areEqual(str4, "FACE_SCAN")) {
TextView switchFace3 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace3, "switchFace");
Object obj2 = WalletPay.access$getMActivity$p(this).get();
if (obj2 == null) {
Intrinsics.throwNpe();
}
switchFace3.setText(((Activity) obj2).getString(R.string.use_face));
PasswordEditText password3 = password;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
password3.setVisibility(0);
keyboardView.setVisibility(0);
button.setVisibility(8);
this.mPayAuthType = "PAY_PASSWORD";
}
}
create.dismiss();
WalletPay.getAllCardList$default(this, businessCode, false, false, 6, null);
}
});
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
String str4;
String str5;
StringBuilder b2 = r5.b("bindCardId=");
str4 = this.bindCardId;
b2.append(str4);
LogUtil.i(b2.toString());
TransferPaytype transferPaytype = TransferPaytype.BANK_CARD;
if (Intrinsics.areEqual("BANK_CARD", this.getPaymentModel())) {
str5 = this.bindCardId;
if (TextUtils.isEmpty(str5)) {
ToastUtil toastUtil = ToastUtil.INSTANCE;
Activity activity4 = (Activity) WalletPay.access$getMActivity$p(this).get();
Context applicationContext = activity4 != null ? activity4.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
toastUtil.showToast(applicationContext, "请选择支付方式");
return;
}
}
WalletPay walletPay = this;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
walletPay.getFacePermission((Activity) obj, businessCode, view2);
}
});
keyboardView.setOnKeyChangeListener(new KeyChangeListener() {
@Override
public final void onKeyChange(View view3, String decKey, String str4) {
String str5;
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
if (text.length() >= 6 || arrayList.size() >= 6) {
if (str4 == null) {
Intrinsics.throwNpe();
}
if (str4.length() > 0) {
arrayList.clear();
PasswordEditText password3 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
Editable text2 = password3.getText();
if (text2 == null) {
Intrinsics.throwNpe();
}
text2.clear();
return;
}
}
if (str4 == null) {
Intrinsics.throwNpe();
}
if (str4.length() == 0) {
PasswordEditText password4 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password4, "password");
Editable text3 = password4.getText();
if (text3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(text3, "password.text!!");
if (text3.length() > 0) {
PasswordEditText password5 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password5, "password");
Editable text4 = password5.getText();
if (text4 == null) {
Intrinsics.throwNpe();
}
if (text4.length() <= 1) {
PasswordEditText password6 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password6, "password");
Editable text5 = password6.getText();
if (text5 == null) {
Intrinsics.throwNpe();
}
text5.clear();
arrayList.clear();
return;
}
PasswordEditText password7 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password7, "password");
Editable text6 = password7.getText();
if (text6 == null) {
Intrinsics.throwNpe();
}
PasswordEditText password8 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password8, "password");
Editable text7 = password8.getText();
if (text7 == null) {
Intrinsics.throwNpe();
}
int length = text7.length() - 1;
PasswordEditText password9 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password9, "password");
Editable text8 = password9.getText();
if (text8 == null) {
Intrinsics.throwNpe();
}
text6.delete(length, text8.length());
ArrayList arrayList2 = arrayList;
PasswordEditText password10 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password10, "password");
Editable text9 = password10.getText();
if (text9 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(arrayList2.remove(text9.length()), "aList.removeAt(password.text!!.length)");
return;
}
return;
}
PasswordEditText password11 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password11, "password");
Editable text10 = password11.getText();
if (text10 == null) {
Intrinsics.throwNpe();
}
if (text10.length() < 6) {
TransferPaytype transferPaytype = TransferPaytype.BANK_CARD;
if (Intrinsics.areEqual("BANK_CARD", this.getPaymentModel())) {
str5 = this.bindCardId;
if (TextUtils.isEmpty(str5)) {
ToastUtil toastUtil = ToastUtil.INSTANCE;
Activity activity4 = (Activity) WalletPay.access$getMActivity$p(this).get();
Context applicationContext = activity4 != null ? activity4.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
toastUtil.showToast(applicationContext, "请选择支付方式");
return;
}
}
PasswordEditText password12 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password12, "password");
Editable text11 = password12.getText();
if (text11 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(decKey, "decKey");
if (decKey == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring = decKey.substring(0, 1);
Intrinsics.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
text11.append((CharSequence) substring);
arrayList.add(str4);
}
PasswordEditText password13 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password13, "password");
Editable text12 = password13.getText();
if (text12 == null) {
Intrinsics.throwNpe();
}
if (text12.length() == 6 && arrayList.size() == 6) {
keyboardView.setVisibility(8);
create.dismiss();
StringBuffer stringBuffer = new StringBuffer();
Iterator it3 = arrayList.iterator();
while (it3.hasNext()) {
stringBuffer.append(((String) it3.next()) + ';');
}
String stringBuffer2 = stringBuffer.toString();
Intrinsics.checkExpressionValueIsNotNull(stringBuffer2, "sb.toString()");
int length2 = stringBuffer.toString().length() - 1;
if (stringBuffer2 == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring2 = stringBuffer2.substring(0, length2);
Intrinsics.checkExpressionValueIsNotNull(substring2, "(this as java.lang.Strin…ing(startIndex, endIndex)");
String str6 = businessCode;
AuthType authType7 = AuthType.TRANSFER;
if (Intrinsics.areEqual(str6, "TRANSFER")) {
WalletPay walletPay = this;
String str7 = businessCode;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
WalletPay.transfer$default(walletPay, str7, substring2, (Activity) obj, null, null, 24, null);
} else {
AuthType authType8 = AuthType.RECHARGE;
if (Intrinsics.areEqual(str6, "RECHARGE")) {
WalletPay walletPay2 = this;
String str8 = businessCode;
Object obj2 = WalletPay.access$getMActivity$p(walletPay2).get();
if (obj2 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj2, "mActivity.get()!!");
WalletPay.deposit$default(walletPay2, str8, substring2, (Activity) obj2, null, null, 24, null);
} else {
AuthType authType9 = AuthType.WITHHOLDING;
if (Intrinsics.areEqual(str6, "WITHHOLDING")) {
WalletPay walletPay3 = this;
String str9 = businessCode;
Object obj3 = WalletPay.access$getMActivity$p(walletPay3).get();
if (obj3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj3, "mActivity.get()!!");
WalletPay.withdraw$default(walletPay3, str9, substring2, (Activity) obj3, null, null, 24, null);
} else {
AuthType authType10 = AuthType.REDPACKET;
if (Intrinsics.areEqual(str6, "REDPACKET")) {
WalletPay walletPay4 = this;
String str10 = businessCode;
Object obj4 = WalletPay.access$getMActivity$p(walletPay4).get();
if (obj4 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj4, "mActivity.get()!!");
WalletPay.redEnvelope$default(walletPay4, str10, substring2, (Activity) obj4, null, null, 24, null);
} else {
AuthType authType11 = AuthType.ONLINEPAY;
if (Intrinsics.areEqual(str6, "ONLINEPAY")) {
WalletPay walletPay5 = this;
String str11 = businessCode;
Object obj5 = WalletPay.access$getMActivity$p(walletPay5).get();
if (obj5 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj5, "mActivity.get()!!");
WalletPay.onlinePay$default(walletPay5, str11, substring2, (Activity) obj5, null, null, 24, null);
} else {
AuthType authType12 = AuthType.APP_PAY;
if (Intrinsics.areEqual(str6, "APP_PAY")) {
WalletPay walletPay6 = this;
String str12 = businessCode;
Object obj6 = WalletPay.access$getMActivity$p(walletPay6).get();
if (obj6 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj6, "mActivity.get()!!");
WalletPay.onAppPay$default(walletPay6, str12, substring2, (Activity) obj6, null, null, 24, null);
}
}
}
}
}
}
PasswordEditText password14 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password14, "password");
Editable text13 = password14.getText();
if (text13 == null) {
Intrinsics.throwNpe();
}
text13.clear();
arrayList.clear();
}
}
});
create.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
text.clear();
arrayList.clear();
}
});
((TextView) window2.findViewById(R.id.forget_password)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
WalletPay.toFindPassword$default(this, businessCode, false, 2, null);
AlertDialog.this.dismiss();
}
});
DecimalFormat decimalFormat2 = new DecimalFormat("0.00");
Intrinsics.checkExpressionValueIsNotNull(amount, "amount");
StringBuilder b2 = r5.b("¥ ");
double d = 100;
b2.append(decimalFormat2.format(new BigDecimal(Constants.amount).setScale(2).doubleValue() / d));
amount.setText(b2.toString());
String str4 = "¥" + decimalFormat2.format(new BigDecimal(Constants.balance).setScale(2).doubleValue() / d);
it = this.cardList.iterator();
while (true) {
if (it.hasNext()) {
card = null;
break;
} else {
card = it.next();
if (card.getUsable()) {
break;
}
}
}
it2 = this.cardList.iterator();
while (true) {
if (it2.hasNext()) {
break;
}
Card next = it2.next();
String bankCardType = next.getBankCardType();
CardType cardType = CardType.BALANCE;
if (Intrinsics.areEqual(bankCardType, "BALANCE")) {
next.setBankName("余额 (剩余" + str4 + ')');
next.setBlance(str4);
break;
}
}
if (this.isOnlySupportBalance) {
View findViewById5 = window2.findViewById(R.id.choose);
Intrinsics.checkExpressionValueIsNotNull(findViewById5, "window.findViewById<View>(R.id.choose)");
findViewById5.setVisibility(8);
}
if (card != null) {
CardType cardType2 = CardType.BALANCE;
if (Intrinsics.areEqual("BALANCE", card.getBankCardType())) {
TransferPaytype transferPaytype = TransferPaytype.BALANCE;
this.paymentModel = "BALANCE";
this.imageUrl = card.getBankLogoUrl();
this.bindCardId = "";
lite_volatile = "余额 (剩余" + str4 + ')';
} else {
TransferPaytype transferPaytype2 = TransferPaytype.BANK_CARD;
this.paymentModel = "BANK_CARD";
this.imageUrl = card.getBankLogoUrl();
this.bindCardId = card.getId();
if (!TextUtils.isEmpty(card.getBankCardNumberDesc())) {
String bankCardNumberDesc = card.getBankCardNumberDesc();
Integer valueOf = bankCardNumberDesc != null ? Integer.valueOf(bankCardNumberDesc.length()) : null;
if (valueOf == null) {
Intrinsics.throwNpe();
}
if (valueOf.intValue() > 4) {
StringBuilder sb2 = new StringBuilder();
sb2.append(card.getBankName());
CardType cardType3 = CardType.CREDIT_CARD;
sb2.append(Intrinsics.areEqual("CREDIT_CARD", card.getBankCardType()) ? "信用卡" : "储蓄卡");
sb2.append("(");
String bankCardNumberDesc2 = card.getBankCardNumberDesc();
if (bankCardNumberDesc2 != null) {
String bankCardNumberDesc3 = card.getBankCardNumberDesc();
Integer valueOf2 = bankCardNumberDesc3 != null ? Integer.valueOf(bankCardNumberDesc3.length()) : null;
if (valueOf2 == null) {
Intrinsics.throwNpe();
}
int intValue = valueOf2.intValue() - 4;
String bankCardNumberDesc4 = card.getBankCardNumberDesc();
if (bankCardNumberDesc4 == null) {
Intrinsics.throwNpe();
}
str = bankCardNumberDesc2.substring(intValue, bankCardNumberDesc4.length());
Intrinsics.checkExpressionValueIsNotNull(str, "(this as java.lang.Strin…ing(startIndex, endIndex)");
} else {
str = null;
}
lite_volatile = r5.lite_volatile(sb2, str, ")");
}
}
}
this.payCard = lite_volatile;
}
if (TextUtils.isEmpty(this.payCard)) {
if (TextUtils.isEmpty(this.imageUrl)) {
imageView2 = imageView4;
imageView2.setImageResource(R.mipmap.ic_card);
} else {
WeakReference<Activity> weakReference5 = this.mActivity;
if (weakReference5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
weakReference5.get();
imageView2 = imageView4;
e.lite_new(this.imageUrl, R.mipmap.ic_card, imageView2);
}
((TextView) objectRef.element).setTextColor(Color.parseColor("#000000"));
TextView numText = (TextView) objectRef.element;
Intrinsics.checkExpressionValueIsNotNull(numText, "numText");
numText.setText(this.payCard);
} else {
TextView numText2 = (TextView) objectRef.element;
Intrinsics.checkExpressionValueIsNotNull(numText2, "numText");
numText2.setText("新增绑卡");
((TextView) objectRef.element).setTextColor(Color.parseColor("#4b89ff"));
((TextView) objectRef.element).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
String str5 = businessCode;
AuthType authType7 = AuthType.APP_PAY;
if (Intrinsics.areEqual(str5, "APP_PAY")) {
WalletPay.toAddCard$default(WalletPay.this, businessCode, 121, false, 4, null);
} else {
WalletPay.toAddCard$default(WalletPay.this, businessCode, 100, false, 4, null);
}
}
});
imageView2 = imageView4;
}
if (this.isOnlySupportBalance) {
if (!TextUtils.isEmpty(this.payCard)) {
final ImageView imageView5 = imageView2;
window2.findViewById(R.id.choose).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
ArrayList arrayList2;
String str5;
int i3 = 0;
this.setMPosition(0);
arrayList2 = this.cardList;
for (Object obj : arrayList2) {
int i4 = i3 + 1;
if (i3 < 0) {
CollectionsKt__CollectionsKt.throwIndexOverflow();
}
str5 = this.bindCardId;
if (Intrinsics.areEqual(str5, ((Card) obj).getId())) {
this.setMPosition(i3);
}
i3 = i4;
}
WalletPay walletPay = this;
TextView numText3 = (TextView) Ref.ObjectRef.this.element;
Intrinsics.checkExpressionValueIsNotNull(numText3, "numText");
View contentView = view2;
Intrinsics.checkExpressionValueIsNotNull(contentView, "contentView");
ImageView iv = imageView5;
Intrinsics.checkExpressionValueIsNotNull(iv, "iv");
walletPay.chooseCard(numText3, contentView, iv, create, businessCode, this.getMPosition());
}
});
}
if (switchPayModelList) {
window2.findViewById(R.id.choose).performClick();
}
keyboardView.requestFocus();
return;
}
return;
}
Intrinsics.checkExpressionValueIsNotNull(switchFace, "switchFace");
i = 8;
switchFace.setVisibility(8);
Intrinsics.checkExpressionValueIsNotNull(password, "password");
}
password.setVisibility(i);
keyboardView.setVisibility(4);
i2 = 0;
}
button.setVisibility(i2);
ImageView imageView42 = imageView;
TextView amount2 = textView3;
final View view22 = view;
switchFace.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
String str42;
str42 = this.mPayAuthType;
PayAuthType payAuthType5 = PayAuthType.PAY_PASSWORD;
if (Intrinsics.areEqual(str42, "PAY_PASSWORD")) {
TextView switchFace2 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace2, "switchFace");
Object obj = WalletPay.access$getMActivity$p(this).get();
if (obj == null) {
Intrinsics.throwNpe();
}
switchFace2.setText(((Activity) obj).getString(R.string.use_pwd));
PasswordEditText password2 = password;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
password2.setVisibility(8);
keyboardView.setVisibility(4);
button.setVisibility(0);
WalletPay walletPay = this;
PayAuthType payAuthType6 = PayAuthType.FACE_SCAN;
walletPay.mPayAuthType = "FACE_SCAN";
} else {
PayAuthType payAuthType7 = PayAuthType.FACE_SCAN;
if (Intrinsics.areEqual(str42, "FACE_SCAN")) {
TextView switchFace3 = switchFace;
Intrinsics.checkExpressionValueIsNotNull(switchFace3, "switchFace");
Object obj2 = WalletPay.access$getMActivity$p(this).get();
if (obj2 == null) {
Intrinsics.throwNpe();
}
switchFace3.setText(((Activity) obj2).getString(R.string.use_face));
PasswordEditText password3 = password;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
password3.setVisibility(0);
keyboardView.setVisibility(0);
button.setVisibility(8);
this.mPayAuthType = "PAY_PASSWORD";
}
}
create.dismiss();
WalletPay.getAllCardList$default(this, businessCode, false, false, 6, null);
}
});
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
String str42;
String str5;
StringBuilder b22 = r5.b("bindCardId=");
str42 = this.bindCardId;
b22.append(str42);
LogUtil.i(b22.toString());
TransferPaytype transferPaytype3 = TransferPaytype.BANK_CARD;
if (Intrinsics.areEqual("BANK_CARD", this.getPaymentModel())) {
str5 = this.bindCardId;
if (TextUtils.isEmpty(str5)) {
ToastUtil toastUtil = ToastUtil.INSTANCE;
Activity activity4 = (Activity) WalletPay.access$getMActivity$p(this).get();
Context applicationContext = activity4 != null ? activity4.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
toastUtil.showToast(applicationContext, "请选择支付方式");
return;
}
}
WalletPay walletPay = this;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
walletPay.getFacePermission((Activity) obj, businessCode, view22);
}
});
keyboardView.setOnKeyChangeListener(new KeyChangeListener() {
@Override
public final void onKeyChange(View view3, String decKey, String str42) {
String str5;
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
if (text.length() >= 6 || arrayList.size() >= 6) {
if (str42 == null) {
Intrinsics.throwNpe();
}
if (str42.length() > 0) {
arrayList.clear();
PasswordEditText password3 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password3, "password");
Editable text2 = password3.getText();
if (text2 == null) {
Intrinsics.throwNpe();
}
text2.clear();
return;
}
}
if (str42 == null) {
Intrinsics.throwNpe();
}
if (str42.length() == 0) {
PasswordEditText password4 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password4, "password");
Editable text3 = password4.getText();
if (text3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(text3, "password.text!!");
if (text3.length() > 0) {
PasswordEditText password5 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password5, "password");
Editable text4 = password5.getText();
if (text4 == null) {
Intrinsics.throwNpe();
}
if (text4.length() <= 1) {
PasswordEditText password6 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password6, "password");
Editable text5 = password6.getText();
if (text5 == null) {
Intrinsics.throwNpe();
}
text5.clear();
arrayList.clear();
return;
}
PasswordEditText password7 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password7, "password");
Editable text6 = password7.getText();
if (text6 == null) {
Intrinsics.throwNpe();
}
PasswordEditText password8 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password8, "password");
Editable text7 = password8.getText();
if (text7 == null) {
Intrinsics.throwNpe();
}
int length = text7.length() - 1;
PasswordEditText password9 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password9, "password");
Editable text8 = password9.getText();
if (text8 == null) {
Intrinsics.throwNpe();
}
text6.delete(length, text8.length());
ArrayList arrayList2 = arrayList;
PasswordEditText password10 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password10, "password");
Editable text9 = password10.getText();
if (text9 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(arrayList2.remove(text9.length()), "aList.removeAt(password.text!!.length)");
return;
}
return;
}
PasswordEditText password11 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password11, "password");
Editable text10 = password11.getText();
if (text10 == null) {
Intrinsics.throwNpe();
}
if (text10.length() < 6) {
TransferPaytype transferPaytype3 = TransferPaytype.BANK_CARD;
if (Intrinsics.areEqual("BANK_CARD", this.getPaymentModel())) {
str5 = this.bindCardId;
if (TextUtils.isEmpty(str5)) {
ToastUtil toastUtil = ToastUtil.INSTANCE;
Activity activity4 = (Activity) WalletPay.access$getMActivity$p(this).get();
Context applicationContext = activity4 != null ? activity4.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
toastUtil.showToast(applicationContext, "请选择支付方式");
return;
}
}
PasswordEditText password12 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password12, "password");
Editable text11 = password12.getText();
if (text11 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(decKey, "decKey");
if (decKey == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring = decKey.substring(0, 1);
Intrinsics.checkExpressionValueIsNotNull(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
text11.append((CharSequence) substring);
arrayList.add(str42);
}
PasswordEditText password13 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password13, "password");
Editable text12 = password13.getText();
if (text12 == null) {
Intrinsics.throwNpe();
}
if (text12.length() == 6 && arrayList.size() == 6) {
keyboardView.setVisibility(8);
create.dismiss();
StringBuffer stringBuffer = new StringBuffer();
Iterator it3 = arrayList.iterator();
while (it3.hasNext()) {
stringBuffer.append(((String) it3.next()) + ';');
}
String stringBuffer2 = stringBuffer.toString();
Intrinsics.checkExpressionValueIsNotNull(stringBuffer2, "sb.toString()");
int length2 = stringBuffer.toString().length() - 1;
if (stringBuffer2 == null) {
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
String substring2 = stringBuffer2.substring(0, length2);
Intrinsics.checkExpressionValueIsNotNull(substring2, "(this as java.lang.Strin…ing(startIndex, endIndex)");
String str6 = businessCode;
AuthType authType7 = AuthType.TRANSFER;
if (Intrinsics.areEqual(str6, "TRANSFER")) {
WalletPay walletPay = this;
String str7 = businessCode;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
WalletPay.transfer$default(walletPay, str7, substring2, (Activity) obj, null, null, 24, null);
} else {
AuthType authType8 = AuthType.RECHARGE;
if (Intrinsics.areEqual(str6, "RECHARGE")) {
WalletPay walletPay2 = this;
String str8 = businessCode;
Object obj2 = WalletPay.access$getMActivity$p(walletPay2).get();
if (obj2 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj2, "mActivity.get()!!");
WalletPay.deposit$default(walletPay2, str8, substring2, (Activity) obj2, null, null, 24, null);
} else {
AuthType authType9 = AuthType.WITHHOLDING;
if (Intrinsics.areEqual(str6, "WITHHOLDING")) {
WalletPay walletPay3 = this;
String str9 = businessCode;
Object obj3 = WalletPay.access$getMActivity$p(walletPay3).get();
if (obj3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj3, "mActivity.get()!!");
WalletPay.withdraw$default(walletPay3, str9, substring2, (Activity) obj3, null, null, 24, null);
} else {
AuthType authType10 = AuthType.REDPACKET;
if (Intrinsics.areEqual(str6, "REDPACKET")) {
WalletPay walletPay4 = this;
String str10 = businessCode;
Object obj4 = WalletPay.access$getMActivity$p(walletPay4).get();
if (obj4 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj4, "mActivity.get()!!");
WalletPay.redEnvelope$default(walletPay4, str10, substring2, (Activity) obj4, null, null, 24, null);
} else {
AuthType authType11 = AuthType.ONLINEPAY;
if (Intrinsics.areEqual(str6, "ONLINEPAY")) {
WalletPay walletPay5 = this;
String str11 = businessCode;
Object obj5 = WalletPay.access$getMActivity$p(walletPay5).get();
if (obj5 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj5, "mActivity.get()!!");
WalletPay.onlinePay$default(walletPay5, str11, substring2, (Activity) obj5, null, null, 24, null);
} else {
AuthType authType12 = AuthType.APP_PAY;
if (Intrinsics.areEqual(str6, "APP_PAY")) {
WalletPay walletPay6 = this;
String str12 = businessCode;
Object obj6 = WalletPay.access$getMActivity$p(walletPay6).get();
if (obj6 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj6, "mActivity.get()!!");
WalletPay.onAppPay$default(walletPay6, str12, substring2, (Activity) obj6, null, null, 24, null);
}
}
}
}
}
}
PasswordEditText password14 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password14, "password");
Editable text13 = password14.getText();
if (text13 == null) {
Intrinsics.throwNpe();
}
text13.clear();
arrayList.clear();
}
}
});
create.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
text.clear();
arrayList.clear();
}
});
((TextView) window2.findViewById(R.id.forget_password)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
WalletPay.toFindPassword$default(this, businessCode, false, 2, null);
AlertDialog.this.dismiss();
}
});
DecimalFormat decimalFormat22 = new DecimalFormat("0.00");
Intrinsics.checkExpressionValueIsNotNull(amount2, "amount");
StringBuilder b22 = r5.b("¥ ");
double d2 = 100;
b22.append(decimalFormat22.format(new BigDecimal(Constants.amount).setScale(2).doubleValue() / d2));
amount2.setText(b22.toString());
String str42 = "¥" + decimalFormat22.format(new BigDecimal(Constants.balance).setScale(2).doubleValue() / d2);
it = this.cardList.iterator();
while (true) {
if (it.hasNext()) {
}
}
it2 = this.cardList.iterator();
while (true) {
if (it2.hasNext()) {
}
}
if (this.isOnlySupportBalance) {
}
if (card != null) {
}
if (TextUtils.isEmpty(this.payCard)) {
}
if (this.isOnlySupportBalance) {
}
}
public static void showPayDialog$default(WalletPay walletPay, String str, boolean z, String str2, int i, Object obj) {
if ((i & 2) != 0) {
z = false;
}
if ((i & 4) != 0) {
PayAuthType payAuthType = PayAuthType.FORCE_PAY_PASSWORD;
str2 = "FORCE_PAY_PASSWORD";
}
walletPay.showPayDialog(str, z, str2);
}
public final void toAddCard(String businessCode, int requestCode, boolean isPaymentModeList) {
boolean z = this.isSupportCredit;
if (requestCode == 121) {
z = true;
}
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
activity.startActivityForResult(new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) CheckPwdActivity.class).putExtra("sourceType", 1).putExtra(Constants.isSupportCredit, z).putExtra(Constants.businessCode, businessCode).putExtra(Constants.cashierDeskBindingCard, isPaymentModeList), requestCode);
}
}
public static void toAddCard$default(WalletPay walletPay, String str, int i, boolean z, int i2, Object obj) {
if ((i2 & 4) != 0) {
z = false;
}
walletPay.toAddCard(str, i, z);
}
@JvmOverloads
private final void toFindPassword(String str) {
toFindPassword$default(this, str, false, 2, null);
}
@JvmOverloads
public final void toFindPassword(final String businessCode, boolean isShowPayDialog) {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
activity.startActivity(new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) FindPasswordActivity.class).putExtra(Constants.isSupportCredit, true).putExtra(Constants.businessCode, businessCode));
}
if (isShowPayDialog) {
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
WalletPay.getAllCardList$default(WalletPay.this, businessCode, false, false, 4, null);
}
}, 500L);
}
}
public static void toFindPassword$default(WalletPay walletPay, String str, boolean z, int i, Object obj) {
if ((i & 2) != 0) {
z = true;
}
walletPay.toFindPassword(str, z);
}
@JvmOverloads
private final void transfer(String str, String str2, Activity activity) {
transfer$default(this, str, str2, activity, null, null, 24, null);
}
@JvmOverloads
private final void transfer(String str, String str2, Activity activity, String str3) {
transfer$default(this, str, str2, activity, str3, null, 16, null);
}
@JvmOverloads
public final void transfer(final String businessCode, String pwd, final Activity mActivity, String payAuthType, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
showLoadingDialog(mActivity);
wepayApi.transfer(new RequestBean.Transfer(Constants.token, this.bindCardId, pwd, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), facePhoto, false, 64, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$transfer$1(this, businessCode, mActivity), new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = businessCode;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", getMMsg());
}
}
});
}
public static void transfer$default(WalletPay walletPay, String str, String str2, Activity activity, String str3, String str4, int i, Object obj) {
if ((i & 8) != 0) {
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
str3 = "PAY_PASSWORD";
}
String str5 = str3;
if ((i & 16) != 0) {
str4 = "";
}
walletPay.transfer(str, str2, activity, str5, str4);
}
public static void validateAndQueryInfo$default(WalletPay walletPay, String str, String str2, String str3, int i, Object obj) {
if ((i & 4) != 0) {
str3 = "";
}
walletPay.validateAndQueryInfo(str, str2, str3);
}
@JvmOverloads
private final void withdraw(String str, String str2, Activity activity) {
withdraw$default(this, str, str2, activity, null, null, 24, null);
}
@JvmOverloads
private final void withdraw(String str, String str2, Activity activity, String str3) {
withdraw$default(this, str, str2, activity, str3, null, 16, null);
}
@JvmOverloads
public final void withdraw(final String businessCode, String pwd, final Activity mActivity, String payAuthType, String facePhoto) {
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
showLoadingDialog(mActivity);
wepayApi.withdraw(new RequestBean.Withdraw(Constants.token, this.bindCardId, pwd, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), facePhoto, false, 32, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new ty2<Beans.WithdrawResult>() {
@Override
public final void accept(Beans.WithdrawResult withdrawResult) {
WalletPay.WalletPayCallback walletPayCallback;
WalletPay.this.hideLoadingDialog();
Alert2ChooseDialog alert2ChooseDialog = new Alert2ChooseDialog();
String str = "SUCCESS";
boolean areEqual = Intrinsics.areEqual(withdrawResult.getStatus(), "SUCCESS");
String str2 = Constants.defaultError;
if (!areEqual) {
ErrorCode errorCode = ErrorCode.EJ0000302;
if (Intrinsics.areEqual("EJ0000302", withdrawResult.getCode())) {
WalletPay.this.findPassword(alert2ChooseDialog, mActivity, withdrawResult.getCause(), businessCode);
return;
}
ErrorCode errorCode2 = ErrorCode.EJ0000312;
if (Intrinsics.areEqual("EJ0000312", withdrawResult.getCode())) {
WalletPay.this.showFaceResultDialog(mActivity, businessCode, "抱歉,没有认出你来", withdrawResult.getCause());
return;
}
if (!TextUtils.isEmpty(withdrawResult.getCause())) {
str2 = withdrawResult.getCause();
}
if (!TextUtils.isEmpty(withdrawResult.getErrorMessage())) {
str2 = withdrawResult.getErrorMessage();
}
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback2 = WalletPay.this.getWalletPayCallback();
if (walletPayCallback2 != null) {
String str3 = businessCode;
Status status = Status.FAIL;
walletPayCallback2.callback(str3, "FAIL", str2);
return;
}
return;
}
Status status2 = Status.FAIL;
String withholdingStatus = withdrawResult.getWithholdingStatus();
DepositStatus depositStatus = DepositStatus.FAIL;
String str4 = "";
if (!Intrinsics.areEqual(withholdingStatus, "FAIL")) {
String withholdingStatus2 = withdrawResult.getWithholdingStatus();
DepositStatus depositStatus2 = DepositStatus.PROCESS;
if (Intrinsics.areEqual(withholdingStatus2, "PROCESS")) {
Status status3 = Status.PROCESS;
str = "PROCESS";
} else {
String withholdingStatus3 = withdrawResult.getWithholdingStatus();
DepositStatus depositStatus3 = DepositStatus.CANCEL;
if (!Intrinsics.areEqual(withholdingStatus3, "CANCEL")) {
String withholdingStatus4 = withdrawResult.getWithholdingStatus();
DepositStatus depositStatus4 = DepositStatus.SUCCESS;
if (Intrinsics.areEqual(withholdingStatus4, "SUCCESS")) {
Status status4 = Status.SUCCESS;
} else {
if (!TextUtils.isEmpty(withdrawResult.getCause())) {
str2 = withdrawResult.getCause();
}
if (!TextUtils.isEmpty(withdrawResult.getErrorMessage())) {
str4 = withdrawResult.getErrorMessage();
}
}
} else if (!TextUtils.isEmpty(withdrawResult.getCause())) {
str2 = withdrawResult.getCause();
}
str4 = str2;
}
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
walletPayCallback.callback(businessCode, str, str4);
return;
}
return;
}
if (!TextUtils.isEmpty(withdrawResult.getCause())) {
str2 = withdrawResult.getCause();
}
str = "FAIL";
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
}
}
}, new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = businessCode;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", e.getMessage());
}
}
});
}
public static void withdraw$default(WalletPay walletPay, String str, String str2, Activity activity, String str3, String str4, int i, Object obj) {
if ((i & 8) != 0) {
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
str3 = "PAY_PASSWORD";
}
String str5 = str3;
if ((i & 16) != 0) {
str4 = "";
}
walletPay.withdraw(str, str2, activity, str5, str4);
}
public final void checkCertificate(@NotNull String merchantId, @NotNull String walletId, @NotNull String requestId, @NotNull String token) {
Intrinsics.checkParameterIsNotNull(merchantId, "merchantId");
Intrinsics.checkParameterIsNotNull(walletId, "walletId");
Intrinsics.checkParameterIsNotNull(requestId, "requestId");
Intrinsics.checkParameterIsNotNull(token, "token");
initWallet(merchantId, walletId, requestId, token);
if (TextUtils.isEmpty(Constants.key)) {
initFile();
String str = Constants.storePath;
Intrinsics.checkExpressionValueIsNotNull(str, "Constants.storePath");
Constants.key = getPrivateKey(str);
}
if (!TextUtils.isEmpty(Constants.key)) {
WalletPayCallback walletPayCallback = this.walletPayCallback;
if (walletPayCallback != null) {
AuthType authType = AuthType.VERIFY_CERT;
Status status = Status.SUCCESS;
walletPayCallback.callback("VERIFY_CERT", "SUCCESS", "");
return;
}
return;
}
hideLoadingDialog();
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
Intent putExtra = new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) CertificateActivity.class).putExtra("toolBarTitle", "安装数字证书");
AuthType authType2 = AuthType.VERIFY_CERT;
activity.startActivity(putExtra.putExtra(Constants.currentBusinessCode, "VERIFY_CERT").putExtra(Constants.businessCode, "VERIFY_CERT").addFlags(268435456));
}
}
public final void checkStoragePermission(@NotNull final Activity mActivity, @NotNull final Function1<? super Boolean, ? extends Object> result) {
Intrinsics.checkParameterIsNotNull(mActivity, "mActivity");
Intrinsics.checkParameterIsNotNull(result, "result");
ju2.lite_break(mActivity).lite_try(new String[]{ou2.lite_while, ou2.lite_throw}).lite_if(new iu2() {
@Override
public final void onAction(List<String> list) {
try {
result.invoke(Boolean.TRUE);
} catch (Exception e) {
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String source = WalletPay.this.getSource();
Status status = Status.FAIL;
StringBuilder b = r5.b("Permission Fail:");
b.append(String.valueOf(e.getMessage()));
walletPayCallback.callback(source, "FAIL", b.toString());
}
DebugLogUtils.e("Permission", String.valueOf(e.getMessage()));
WalletPay.this.hideLoadingDialog();
}
}
}).lite_int(new iu2() {
@Override
public final void onAction(List<String> list) {
result.invoke(Boolean.FALSE);
Toast.makeText(mActivity.getApplicationContext(), "存储权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (ju2.lite_new(mActivity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(ou2.lite_while, ou2.lite_throw))) {
ju2.lite_this(mActivity.getApplicationContext()).execute();
}
}
}).start();
}
public final void closeFace(@NotNull final Activity mActivity) {
Intrinsics.checkParameterIsNotNull(mActivity, "mActivity");
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
Context applicationContext = mActivity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
if (mActivity instanceof BaseActivity) {
((BaseActivity) mActivity).showLoadingDialog();
} else {
showLoadingDialog(mActivity);
}
wepayApi.faceScanConfigClose(new RequestBean.IsEncryption(false, 1, null)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new ty2<Beans.FaceSwitchResultInfo>() {
@Override
public final void accept(Beans.FaceSwitchResultInfo faceSwitchResultInfo) {
SettingActivity.SwitchFaceCallBack mSettingFaceCallback;
boolean z;
Activity activity = mActivity;
if (activity instanceof BaseActivity) {
((BaseActivity) activity).hideLoadingDialog();
} else {
WalletPay.this.hideLoadingDialog();
}
if (Intrinsics.areEqual(faceSwitchResultInfo.getStatus(), "SUCCESS")) {
ToastUtil toastUtil = ToastUtil.INSTANCE;
Activity activity2 = mActivity;
Context applicationContext2 = activity2 != null ? activity2.getApplicationContext() : null;
if (applicationContext2 == null) {
Intrinsics.throwNpe();
}
toastUtil.showToast(applicationContext2, "关闭成功");
mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback == null) {
return;
} else {
z = true;
}
} else {
mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback == null) {
return;
} else {
z = false;
}
}
mSettingFaceCallback.onCloseResult(z);
}
}, new ExternalFlowable(mActivity) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
SettingActivity.SwitchFaceCallBack mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback != null) {
mSettingFaceCallback.onCloseResult(false);
}
}
});
}
public final boolean deleteCer(@NotNull Context context, @NotNull String merchantId, @NotNull String walletId) {
Intrinsics.checkParameterIsNotNull(context, "context");
Intrinsics.checkParameterIsNotNull(merchantId, "merchantId");
Intrinsics.checkParameterIsNotNull(walletId, "walletId");
StringBuilder sb = new StringBuilder();
File externalStorageDirectory = Environment.getExternalStorageDirectory();
Intrinsics.checkExpressionValueIsNotNull(externalStorageDirectory, "Environment.getExternalStorageDirectory()");
sb.append(externalStorageDirectory.getPath());
sb.append(AuthenticationPhoneActivity.WHITE_SPACE);
sb.append(SHA256Utils.getSHA256StrJava("pay_sdk"));
sb.append(SHA256Utils.getSHA256StrJava("wallet_" + walletId + "_sdk"));
File file = new File(sb.toString());
file.mkdirs();
String absolutePath = file.getAbsolutePath();
StringBuilder b = r5.b("5upay_");
b.append(SystemUtils.INSTANCE.getAndroidId(context));
b.append("sdk");
File file2 = new File(absolutePath, SHA256Utils.getSHA256StrJava(b.toString()));
file2.delete();
if (file2.exists()) {
return false;
}
Constants.key = "";
Constants.publicKey = "";
return true;
}
public final void destroy() {
LoadingDialog loadingDialog;
LoadingDialog loadingDialog2;
try {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
if (weakReference.get() != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference2.get();
if (activity == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity, "mActivity.get()!!");
if (!activity.isDestroyed() && (loadingDialog = this.mDialog) != null) {
if (loadingDialog == null) {
Intrinsics.throwNpe();
}
if (loadingDialog.isShowing() && (loadingDialog2 = this.mDialog) != null) {
loadingDialog2.dismiss();
}
}
}
INSTANCE = null;
Constants.key = "";
Constants.publicKey = "";
} catch (Exception e) {
StringBuilder b = r5.b("destroy fail:");
b.append(e.getMessage());
LogUtil.i(b.toString());
}
}
public final void dismissAllDialog() {
AlertDialog alertDialog = this.mOptionAd;
if (alertDialog != null && alertDialog.isShowing()) {
alertDialog.dismiss();
}
AlertDialog alertDialog2 = this.mOptionAd1;
if (alertDialog2 != null && alertDialog2.isShowing()) {
alertDialog2.dismiss();
}
AlertDialog alertDialog3 = this.checkPwdDialog;
if (alertDialog3 != null && alertDialog3.isShowing()) {
alertDialog3.dismiss();
}
this.mOptionAd = null;
this.mOptionAd1 = null;
this.checkPwdDialog = null;
this.mDialogContentView = null;
}
@JvmOverloads
public final void evoke(@NotNull String str, @NotNull String str2, @NotNull String str3, @NotNull String str4) {
evoke$default(this, str, str2, str3, str4, null, null, null, 112, null);
}
@JvmOverloads
public final void evoke(@NotNull String str, @NotNull String str2, @NotNull String str3, @NotNull String str4, @NotNull String str5) {
evoke$default(this, str, str2, str3, str4, str5, null, null, 96, null);
}
@JvmOverloads
public final void evoke(@NotNull String str, @NotNull String str2, @NotNull String str3, @NotNull String str4, @NotNull String str5, @NotNull String str6) {
evoke$default(this, str, str2, str3, str4, str5, str6, null, 64, null);
}
@JvmOverloads
public final void evoke(@NotNull String merchantId, @NotNull String walletId, @NotNull String token, @NotNull String source, @NotNull String requestId, @NotNull String checkPwdAuthType, @Nullable ServicePayCallback servicePayCallback) {
Activity activity;
Class<?> cls;
Intrinsics.checkParameterIsNotNull(merchantId, "merchantId");
Intrinsics.checkParameterIsNotNull(walletId, "walletId");
Intrinsics.checkParameterIsNotNull(token, "token");
Intrinsics.checkParameterIsNotNull(source, "source");
Intrinsics.checkParameterIsNotNull(requestId, "requestId");
Intrinsics.checkParameterIsNotNull(checkPwdAuthType, "checkPwdAuthType");
if (TextUtils.isEmpty(source)) {
throw new ExceptionInInitializerError("钱包初始化失败,检查你设置的参数是否正确");
}
if (TextUtils.isEmpty(AuthTypeName.valueOf(source).getCode())) {
throw new ExceptionInInitializerError("钱包初始化失败,检查你设置的参数是否正确");
}
this.sourceName = AuthTypeName.valueOf(source).getCode();
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
if (weakReference == null) {
throw new ExceptionInInitializerError("钱包初始化失败,检查你设置的参数是否正确");
}
if (this.walletPayCallback == null) {
throw new ExceptionInInitializerError("钱包初始化失败,检查你设置的参数是否正确");
}
if (TextUtils.isEmpty(merchantId)) {
throw new ExceptionInInitializerError("钱包初始化失败,商户编号不能为空");
}
if (TextUtils.isEmpty(walletId)) {
throw new ExceptionInInitializerError("钱包初始化失败,钱包id不能为空");
}
if (TextUtils.isEmpty(token)) {
AuthType authType = AuthType.MANUAL_CHECK_CER;
if (!Intrinsics.areEqual(source, "MANUAL_CHECK_CER")) {
throw new ExceptionInInitializerError("钱包初始化失败,token不能为空");
}
}
Boolean bool = ConfigConstants.isDebug;
Intrinsics.checkExpressionValueIsNotNull(bool, "ConfigConstants.isDebug");
if (bool.booleanValue()) {
StringBuilder j = r5.j("merchantId=", merchantId, " walletId=", walletId, " token=");
j.append(token);
j.append(" source=");
j.append(source);
DebugLogUtils.i(j.toString());
}
this.mServicePayCallback = servicePayCallback;
this.mCheckPwdAuthType = checkPwdAuthType;
this.start = System.currentTimeMillis();
StringBuilder b = r5.b("调起SDK");
b.append(this.sourceName);
b.append("业务的开始时间:");
b.append(this.start);
LogUtil.d(b.toString());
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
this.mDialog = new LoadingDialog(weakReference2.get());
this.merchantId = merchantId;
this.walletId = walletId;
this.token = token;
this.source = source;
this.requestId = requestId;
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference3.get();
if (activity2 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity2, "mActivity.get()!!");
showLoadingDialog(activity2);
initWallet(merchantId, walletId, requestId, token);
WeakReference<Activity> weakReference4 = this.mActivity;
if (weakReference4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity3 = weakReference4.get();
if (activity3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity3, "mActivity.get()!!");
getPermission(activity3);
StringBuilder b2 = r5.b("调起SDK");
b2.append(this.sourceName);
b2.append("业务的证书的检查时间:");
b2.append(System.currentTimeMillis() - this.start);
LogUtil.d(b2.toString());
ClassLoader classLoader = WalletPay.class.getClassLoader();
WalletPayCallback walletPayCallback = this.walletPayCallback;
Context context = null;
Class<?>[] interfaces = (walletPayCallback == null || (cls = walletPayCallback.getClass()) == null) ? null : cls.getInterfaces();
WeakReference<Activity> weakReference5 = this.mActivity;
if (weakReference5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
if (weakReference5 != null && (activity = weakReference5.get()) != null) {
context = activity.getApplicationContext();
}
this.walletPayCallback = (WalletPayCallback) Proxy.newProxyInstance(classLoader, interfaces, new CallBackInvocationHandler(context, this.walletPayCallback));
}
public final void expiredAutomaticDeletionCer() {
dismissAllDialog();
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity it = weakReference.get();
if (it == null || TextUtils.isEmpty(this.merchantId) || TextUtils.isEmpty(this.walletId)) {
return;
}
System.out.println((Object) "删除证书");
Intrinsics.checkExpressionValueIsNotNull(it, "it");
Context applicationContext = it.getApplicationContext();
if (applicationContext == null) {
Intrinsics.throwNpe();
}
String str = this.merchantId;
if (str == null) {
Intrinsics.throwNpe();
}
String str2 = this.walletId;
if (str2 == null) {
Intrinsics.throwNpe();
}
if (deleteCer(applicationContext, str, str2)) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference2.get();
if (activity != null) {
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference3.get();
Intent putExtra = new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) CertificateActivity.class).putExtra("toolBarTitle", "安装数字证书").putExtra("tokenId", this.token);
AuthType authType = AuthType.VERIFY_CERT;
activity.startActivity(putExtra.putExtra(Constants.currentBusinessCode, "VERIFY_CERT").putExtra(Constants.businessCode, this.source).addFlags(268435456));
}
}
}
@JvmOverloads
public final void getAllCardList(@NotNull String str) {
getAllCardList$default(this, str, false, false, 6, null);
}
@JvmOverloads
public final void getAllCardList(@NotNull String str, boolean z) {
getAllCardList$default(this, str, z, false, 4, null);
}
@JvmOverloads
public final void getAllCardList(@NotNull final String businessCode, boolean isShowLoading, final boolean switchPayModelList) {
zw2<Beans.BindList> h3;
Activity it;
Intrinsics.checkParameterIsNotNull(businessCode, "businessCode");
if (isShowLoading) {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
if (weakReference != null && (it = weakReference.get()) != null) {
Intrinsics.checkExpressionValueIsNotNull(it, "it");
showLoadingDialog(it);
}
}
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference2.get();
Context applicationContext = activity != null ? activity.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
final long currentTimeMillis = System.currentTimeMillis();
String str = Constants.token;
Intrinsics.checkExpressionValueIsNotNull(str, "Constants.token");
zw2<Beans.BindList> h5 = wepayApi.queryPaymentModelList(new RequestBean.AllCardList(str, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), false, 4, null)).h5(yb3.lite_for());
if (h5 == null || (h3 = h5.h3(AndroidSchedulers.mainThread())) == null) {
return;
}
ty2<Beans.BindList> ty2Var = new ty2<Beans.BindList>() {
@Override
public final void accept(Beans.BindList bindList) {
String str2;
String str3;
ArrayList arrayList;
WalletPay.this.hideLoadingDialog();
WalletPay walletPay = WalletPay.this;
StringBuilder sb = new StringBuilder();
str2 = WalletPay.this.sourceName;
sb.append(str2);
sb.append("业务的查询银行卡列表的网络请求时间:");
sb.append(System.currentTimeMillis() - currentTimeMillis);
walletPay.cardListTimeText = sb.toString();
str3 = WalletPay.this.cardListTimeText;
LogUtil.d(str3);
if (!Intrinsics.areEqual("SUCCESS", bindList.getQueryStatus()) || !Intrinsics.areEqual("SUCCESS", bindList.getStatus())) {
new Alert2ChooseDialog().showMessage((Activity) WalletPay.access$getMActivity$p(WalletPay.this).get(), !TextUtils.isEmpty(bindList.getCause()) ? bindList.getCause() : Constants.defaultError, "", "确定");
return;
}
arrayList = WalletPay.this.cardList;
arrayList.clear();
if (bindList.getBindCards() != null && bindList.getBindCards().size() > 0) {
WalletPay.this.cardList = bindList.getBindCards();
}
if (!TextUtils.isEmpty(bindList.getBalance())) {
Constants.balance = bindList.getBalance();
}
WalletPay.this.isSupportCredit = Intrinsics.areEqual("ALL", bindList.getAvailBankCardType());
WalletPay.this.setMPosition(0);
WalletPay.showPayDialog$default(WalletPay.this, businessCode, switchPayModelList, null, 4, null);
}
};
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference3.get();
if (activity2 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity2, "mActivity.get()!!");
final Activity activity3 = activity2;
h3.c5(ty2Var, new ExternalFlowable(activity3) {
@Override
public void accept(@NotNull Throwable e) {
Intrinsics.checkParameterIsNotNull(e, "e");
super.accept(e);
WalletPay.this.hideLoadingDialog();
}
});
}
@NotNull
public final String getEvokeTime() {
return this.validateTokenTimeText + "\n" + this.authSourceTimeText + "\n" + this.walletQueryTimeText + "\n" + this.cardListTimeText + "\n" + this.payDialogTimeText;
}
public final void getFacePermission(@NotNull final Activity mActivity, @NotNull final String businessCode, @Nullable final View parent) {
Intrinsics.checkParameterIsNotNull(mActivity, "mActivity");
Intrinsics.checkParameterIsNotNull(businessCode, "businessCode");
ju2.lite_break(mActivity).lite_try(new String[]{ou2.lite_while, ou2.lite_for}).lite_if(new iu2() {
@Override
public final void onAction(List<String> list) {
try {
Activity activity = mActivity;
if (activity != null) {
WalletPay.this.startFaceDialog(activity, businessCode, parent);
}
} catch (Exception e) {
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String source = WalletPay.this.getSource();
Status status = Status.FAIL;
StringBuilder b = r5.b("Permission Fail:");
b.append(String.valueOf(e.getMessage()));
walletPayCallback.callback(source, "FAIL", b.toString());
}
DebugLogUtils.e("Permission", String.valueOf(e.getMessage()));
WalletPay.this.hideLoadingDialog();
}
}
}).lite_int(new iu2() {
@Override
public final void onAction(List<String> list) {
Toast.makeText(mActivity.getApplicationContext(), "摄像头权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (ju2.lite_new(mActivity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(ou2.lite_while, ou2.lite_for))) {
ju2.lite_this(mActivity.getApplicationContext()).execute();
}
}
}).start();
}
@Nullable
public final LogCallback getLogCallback() {
return this.logCallback;
}
public final int getMPosition() {
return this.mPosition;
}
@Nullable
public final SettingActivity.SwitchFaceCallBack getMSettingFaceCallback() {
return this.mSettingFaceCallback;
}
@Nullable
public final String getMerchantId() {
return this.merchantId;
}
@NotNull
public final String getPayCard() {
return this.payCard;
}
@NotNull
public final String getPaymentModel() {
return this.paymentModel;
}
@JvmOverloads
public final void getPermissionCheckCer(@NotNull Activity activity, @NotNull String str, @NotNull String str2) {
getPermissionCheckCer$default(this, activity, str, str2, null, 8, null);
}
@JvmOverloads
public final void getPermissionCheckCer(@NotNull final Activity mActivity, @NotNull final String merchantId, @NotNull final String walletId, @NotNull final String token) {
Intrinsics.checkParameterIsNotNull(mActivity, "mActivity");
Intrinsics.checkParameterIsNotNull(merchantId, "merchantId");
Intrinsics.checkParameterIsNotNull(walletId, "walletId");
Intrinsics.checkParameterIsNotNull(token, "token");
ju2.lite_break(mActivity).lite_try(new String[]{ou2.lite_while, ou2.lite_throw}).lite_if(new iu2() {
@Override
public final void onAction(List<String> list) {
try {
WalletPay.checkCertificate$default(WalletPay.this, merchantId, walletId, token, null, 8, null);
} catch (Exception e) {
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String source = WalletPay.this.getSource();
Status status = Status.FAIL;
StringBuilder b = r5.b("Permission Fail:");
b.append(String.valueOf(e.getMessage()));
walletPayCallback.callback(source, "FAIL", b.toString());
}
DebugLogUtils.e("Permission", String.valueOf(e.getMessage()));
WalletPay.this.hideLoadingDialog();
}
}
}).lite_int(new iu2() {
@Override
public final void onAction(List<String> list) {
Toast.makeText(mActivity.getApplicationContext(), "存储权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (ju2.lite_new(mActivity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(ou2.lite_while, ou2.lite_throw))) {
ju2.lite_this(mActivity.getApplicationContext()).execute();
}
}
}).start();
}
@Nullable
public final String getRequestId() {
return this.requestId;
}
@NotNull
public final String getSdkVersion() {
return "1.1.1";
}
@Nullable
public final String getSource() {
return this.source;
}
public final long getStart() {
return this.start;
}
@Nullable
public final String getToken() {
return this.token;
}
@Nullable
public final String getWalletId() {
return this.walletId;
}
@Nullable
public final WalletPayCallback getWalletPayCallback() {
return this.walletPayCallback;
}
public final void goAuth(@NotNull String token, @Nullable String code, @Nullable String businessCode, boolean isPassword) {
Activity activity;
Intent putExtra;
String str;
Intrinsics.checkParameterIsNotNull(token, "token");
if (!this.authList.isEmpty()) {
String str2 = this.authList.get(0);
Intrinsics.checkExpressionValueIsNotNull(str2, "authList[0]");
String str3 = str2;
this.authList.remove(str3);
if (StringsKt__StringsKt.contains$default((CharSequence) str3, (CharSequence) "AUTH_USER", false, 2, (Object) null)) {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
activity = weakReference.get();
if (activity == null) {
return;
}
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
putExtra = new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) AuthenticationActivity.class).putExtra("tokenId", token);
str = "身份认证";
} else {
if (StringsKt__StringsKt.contains$default((CharSequence) str3, (CharSequence) "AUTH_PERSON", false, 2, (Object) null)) {
goLiveDetect(token, code, businessCode, isPassword);
return;
}
if (StringsKt__StringsKt.contains$default((CharSequence) str3, (CharSequence) "AUTH_IDCARD_PIC", false, 2, (Object) null)) {
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
activity = weakReference3.get();
if (activity == null) {
return;
}
WeakReference<Activity> weakReference4 = this.mActivity;
if (weakReference4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity3 = weakReference4.get();
putExtra = new Intent(activity3 != null ? activity3.getApplicationContext() : null, (Class<?>) UploadIdCardActivity.class).putExtra("tokenId", token);
str = "上传身份证";
}
}
activity.startActivity(putExtra.putExtra("toolBarTitle", str).putExtra(Constants.businessCode, code).putExtra(Constants.currentBusinessCode, businessCode).putExtra(Constants.isPassword, isPassword));
return;
}
validateAndQueryInfo(token, code, businessCode);
}
public final void init(@NotNull Activity activity) {
Intrinsics.checkParameterIsNotNull(activity, "activity");
this.mActivity = new WeakReference<>(activity);
initRetrofitClient();
}
public final void releaseActivity() {
LoadingDialog loadingDialog;
LoadingDialog loadingDialog2;
try {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
if (weakReference.get() != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference2.get();
if (activity == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity, "mActivity.get()!!");
if (!activity.isDestroyed() && (loadingDialog = this.mDialog) != null) {
if (loadingDialog == null) {
Intrinsics.throwNpe();
}
if (loadingDialog.isShowing() && (loadingDialog2 = this.mDialog) != null) {
loadingDialog2.dismiss();
}
}
}
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
weakReference3.clear();
} catch (Exception e) {
StringBuilder b = r5.b("releaseActivity fail:");
b.append(e.getMessage());
LogUtil.i(b.toString());
}
}
@JvmOverloads
public final void setColor() {
setColor$default(this, null, null, null, null, 15, null);
}
@JvmOverloads
public final void setColor(@NotNull String str) {
setColor$default(this, str, null, null, null, 14, null);
}
@JvmOverloads
public final void setColor(@NotNull String str, @NotNull String str2) {
setColor$default(this, str, str2, null, null, 12, null);
}
@JvmOverloads
public final void setColor(@NotNull String str, @NotNull String str2, @NotNull String str3) {
setColor$default(this, str, str2, str3, null, 8, null);
}
@JvmOverloads
public final void setColor(@NotNull String buttonColor, @NotNull String toolBarColor, @NotNull String buttonTextColor, @NotNull String toolBarTextColor) {
Intrinsics.checkParameterIsNotNull(buttonColor, "buttonColor");
Intrinsics.checkParameterIsNotNull(toolBarColor, "toolBarColor");
Intrinsics.checkParameterIsNotNull(buttonTextColor, "buttonTextColor");
Intrinsics.checkParameterIsNotNull(toolBarTextColor, "toolBarTextColor");
Constants.buttonColor = buttonColor;
Constants.toolBarTextColor = toolBarTextColor;
Constants.buttonTextColor = buttonTextColor;
Constants.toolBarColor = toolBarColor;
}
public final void setDebug(boolean isDebug) {
ConfigConstants.isDebug = Boolean.valueOf(isDebug);
}
public final void setEnvironment(@NotNull String environment) {
String str;
Intrinsics.checkParameterIsNotNull(environment, "environment");
int hashCode = environment.hashCode();
if (hashCode == 3600) {
if (environment.equals("qa")) {
Constants.baseUrl = "https://qa-webox-api.5upay.com/";
Constants.h5Url = "https://qa-merchant.5upay.com/webox/agreement/privacyPolicy.html";
str = "https://qa-merchant.5upay.com/webox/agreement/serviceAgreement.html";
}
Constants.baseUrl = "https://webox.5upay.com/";
Constants.h5Url = com.payeasenet.wepay.constant.Constants.PRIVATE_AGREEMENT;
str = com.payeasenet.wepay.constant.Constants.SERVICE_AGREEMENT;
} else if (hashCode != 99349) {
if (hashCode == 111277) {
environment.equals("pro");
} else if (hashCode == 115560 && environment.equals("uat")) {
Constants.baseUrl = "https://uat-webox-api.5upay.com/";
Constants.h5Url = "https://uat-merchant.5upay.com/webox/agreement/privacyPolicy.html";
str = "https://uat-merchant.5upay.com/webox/agreement/serviceAgreement.html";
}
Constants.baseUrl = "https://webox.5upay.com/";
Constants.h5Url = com.payeasenet.wepay.constant.Constants.PRIVATE_AGREEMENT;
str = com.payeasenet.wepay.constant.Constants.SERVICE_AGREEMENT;
} else {
if (environment.equals("dev")) {
Constants.baseUrl = "https://dev-webox-api.ehking.com/";
Constants.h5Url = "https://dev-merchant.5upay.com/webox/agreement/privacyPolicy.html";
str = "https://dev-merchant.5upay.com/webox/agreement/serviceAgreement.html";
}
Constants.baseUrl = "https://webox.5upay.com/";
Constants.h5Url = com.payeasenet.wepay.constant.Constants.PRIVATE_AGREEMENT;
str = com.payeasenet.wepay.constant.Constants.SERVICE_AGREEMENT;
}
Constants.serviceAgreementUrl = str;
}
public final void setIsRandomKeyboard(boolean isRandomKeyboard) {
Constants.isRandomKeyboard = isRandomKeyboard;
}
public final void setLogCallback(@Nullable LogCallback logCallback) {
this.logCallback = logCallback;
}
public final void setMPosition(int i) {
this.mPosition = i;
}
public final void setMSettingFaceCallback(@Nullable SettingActivity.SwitchFaceCallBack switchFaceCallBack) {
this.mSettingFaceCallback = switchFaceCallBack;
}
public final void setMerchantId(@Nullable String str) {
this.merchantId = str;
}
public final void setOnlySupportBalance(boolean isOnlySupportBalance, @NotNull ArrayList<String> sourceList) {
Intrinsics.checkParameterIsNotNull(sourceList, "sourceList");
Constants.isOnlySupportBalance = isOnlySupportBalance;
Constants.sourceList = sourceList;
}
public final void setPayCard(@NotNull String str) {
Intrinsics.checkParameterIsNotNull(str, "<set-?>");
this.payCard = str;
}
public final void setPaymentModel(@NotNull String str) {
Intrinsics.checkParameterIsNotNull(str, "<set-?>");
this.paymentModel = str;
}
public final void setRequestId(@Nullable String str) {
this.requestId = str;
}
public final void setSource(@Nullable String str) {
this.source = str;
}
public final void setStart(long j) {
this.start = j;
}
public final void setToken(@Nullable String str) {
this.token = str;
}
@JvmOverloads
public final void setToolBarBackImg() {
setToolBarBackImg$default(this, 0, 1, null);
}
@JvmOverloads
public final void setToolBarBackImg(int toolBarBackImgColor) {
Constants.toolBarBackImgColor = toolBarBackImgColor;
}
public final void setWalletId(@Nullable String str) {
this.walletId = str;
}
public final void setWalletPayCallback(@Nullable WalletPayCallback walletPayCallback) {
this.walletPayCallback = walletPayCallback;
}
@JvmOverloads
public final void startFaceDialog(@NotNull final Activity activity, @NotNull final String businessCode, @Nullable final View parent) {
Intrinsics.checkParameterIsNotNull(activity, "activity");
Intrinsics.checkParameterIsNotNull(businessCode, "businessCode");
try {
this.mDialogContentView = parent;
activity.startActivity(new Intent(activity, (Class<?>) SilentLivenessDialog.class));
e.lite_for = new n() {
@Override
public final void callback(String str, String errorMessage, String str2) {
View view;
if (!Intrinsics.areEqual(str, "SUCCESS")) {
if (!Intrinsics.areEqual(str, "FAIL") && !Intrinsics.areEqual(str, "INIT_FAIL")) {
view = WalletPay.this.mDialogContentView;
if (view != null) {
WalletPay.this.enterCenter(view);
return;
}
return;
}
WalletPay walletPay = WalletPay.this;
Activity activity2 = activity;
String str3 = businessCode;
Intrinsics.checkExpressionValueIsNotNull(errorMessage, "errorMessage");
WalletPay.showFaceResultDialog$default(walletPay, activity2, str3, errorMessage, null, 8, null);
return;
}
String imageToBase64 = ImageUtil.imageToBase64(str2);
if (imageToBase64 == null) {
WalletPay.showFaceResultDialog$default(WalletPay.this, activity, businessCode, "人脸图片获取失败", null, 8, null);
return;
}
String str4 = businessCode;
AuthType authType = AuthType.TRANSFER;
if (Intrinsics.areEqual(str4, "TRANSFER")) {
WalletPay walletPay2 = WalletPay.this;
String str5 = businessCode;
Activity activity3 = activity;
if (activity3 == null) {
Intrinsics.throwNpe();
}
PayAuthType payAuthType = PayAuthType.FACE_SCAN;
walletPay2.transfer(str5, "", activity3, "FACE_SCAN", imageToBase64);
return;
}
AuthType authType2 = AuthType.RECHARGE;
if (Intrinsics.areEqual(str4, "RECHARGE")) {
WalletPay walletPay3 = WalletPay.this;
String str6 = businessCode;
Activity activity4 = activity;
if (activity4 == null) {
Intrinsics.throwNpe();
}
PayAuthType payAuthType2 = PayAuthType.FACE_SCAN;
walletPay3.deposit(str6, "", activity4, "FACE_SCAN", imageToBase64);
return;
}
AuthType authType3 = AuthType.WITHHOLDING;
if (Intrinsics.areEqual(str4, "WITHHOLDING")) {
WalletPay walletPay4 = WalletPay.this;
String str7 = businessCode;
Activity activity5 = activity;
if (activity5 == null) {
Intrinsics.throwNpe();
}
PayAuthType payAuthType3 = PayAuthType.FACE_SCAN;
walletPay4.withdraw(str7, "", activity5, "FACE_SCAN", imageToBase64);
return;
}
AuthType authType4 = AuthType.REDPACKET;
if (Intrinsics.areEqual(str4, "REDPACKET")) {
WalletPay walletPay5 = WalletPay.this;
String str8 = businessCode;
Activity activity6 = activity;
if (activity6 == null) {
Intrinsics.throwNpe();
}
PayAuthType payAuthType4 = PayAuthType.FACE_SCAN;
walletPay5.redEnvelope(str8, "", activity6, "FACE_SCAN", imageToBase64);
return;
}
AuthType authType5 = AuthType.ONLINEPAY;
if (Intrinsics.areEqual(str4, "ONLINEPAY")) {
WalletPay walletPay6 = WalletPay.this;
String str9 = businessCode;
Activity activity7 = activity;
if (activity7 == null) {
Intrinsics.throwNpe();
}
PayAuthType payAuthType5 = PayAuthType.FACE_SCAN;
walletPay6.onlinePay(str9, "", activity7, "FACE_SCAN", imageToBase64);
return;
}
AuthType authType6 = AuthType.APP_PAY;
if (Intrinsics.areEqual(str4, "APP_PAY")) {
WalletPay walletPay7 = WalletPay.this;
String str10 = businessCode;
Activity activity8 = activity;
if (activity8 == null) {
Intrinsics.throwNpe();
}
PayAuthType payAuthType6 = PayAuthType.FACE_SCAN;
walletPay7.onAppPay(str10, "", activity8, "FACE_SCAN", imageToBase64);
return;
}
AuthType authType7 = AuthType.VALIDATE_PASSWORD;
if (Intrinsics.areEqual(str4, "VALIDATE_PASSWORD")) {
WalletPay walletPay8 = WalletPay.this;
String str11 = businessCode;
Activity activity9 = activity;
if (activity9 == null) {
Intrinsics.throwNpe();
}
PayAuthType payAuthType7 = PayAuthType.FACE_SCAN;
walletPay8.checkPwd(str11, "", activity9, "FACE_SCAN", imageToBase64);
return;
}
AuthType authType8 = AuthType.ACCESS_SAFETY_OPEN_FACE;
if (Intrinsics.areEqual(str4, "ACCESS_SAFETY_OPEN_FACE")) {
WalletPay walletPay9 = WalletPay.this;
String str12 = businessCode;
Activity activity10 = activity;
if (activity10 == null) {
Intrinsics.throwNpe();
}
walletPay9.openFace(str12, activity10, imageToBase64);
}
}
};
if (parent != null) {
parent.postDelayed(new Runnable() {
@Override
public final void run() {
WalletPay.this.moveToLeft(parent);
}
}, 50L);
}
} catch (Exception e) {
WalletPayCallback walletPayCallback = this.walletPayCallback;
if (walletPayCallback != null) {
String str = this.source;
Status status = Status.FAIL;
StringBuilder b = r5.b("Permission Fail:");
b.append(String.valueOf(e.getMessage()));
walletPayCallback.callback(str, "FAIL", b.toString());
}
DebugLogUtils.e("Permission", String.valueOf(e.getMessage()));
hideLoadingDialog();
}
}
public final void startUploadIdCard() {
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
if (activity != null) {
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
Intent intent = new Intent(activity2 != null ? activity2.getApplicationContext() : null, (Class<?>) UploadIdCardActivity.class);
AuthType authType = AuthType.VERIFY_CERT;
activity.startActivity(intent.putExtra(Constants.currentBusinessCode, "VERIFY_CERT").putExtra(Constants.businessCode, "VERIFY_CERT").addFlags(268435456));
}
}
public final void validateAndQueryInfo(@NotNull final String token, @Nullable final String source, @NotNull final String nextBusinessCode) {
Intrinsics.checkParameterIsNotNull(token, "token");
Intrinsics.checkParameterIsNotNull(nextBusinessCode, "nextBusinessCode");
RetrofitClient companion = RetrofitClient.INSTANCE.getInstance();
WeakReference<Activity> weakReference = this.mActivity;
if (weakReference == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity = weakReference.get();
DefaultConstructorMarker defaultConstructorMarker = null;
Context applicationContext = activity != null ? activity.getApplicationContext() : null;
if (applicationContext == null) {
Intrinsics.throwNpe();
}
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
WeakReference<Activity> weakReference2 = this.mActivity;
if (weakReference2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity2 = weakReference2.get();
if (activity2 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity2, "mActivity.get()!!");
showLoadingDialog(activity2);
final long currentTimeMillis = System.currentTimeMillis();
zw2<Beans.ValidateAndQueryInfoResult> h3 = wepayApi.validateAndQueryInfo(new RequestBean.ValidateToken(token, false, 2, defaultConstructorMarker)).h5(yb3.lite_for()).h3(AndroidSchedulers.mainThread());
ty2<Beans.ValidateAndQueryInfoResult> ty2Var = new ty2<Beans.ValidateAndQueryInfoResult>() {
@Override
public final void accept(Beans.ValidateAndQueryInfoResult validateAndQueryInfoResult) {
String str;
String str2;
String str3;
WalletPay walletPay;
String str4;
String payAuthType;
Beans.WalletSafety walletSafety;
String str5;
String str6;
int i;
Object obj;
String str7;
ArrayList arrayList;
ArrayList arrayList2;
ArrayList arrayList3;
WalletPay.this.hideLoadingDialog();
WalletPay walletPay2 = WalletPay.this;
StringBuilder sb = new StringBuilder();
str = WalletPay.this.sourceName;
sb.append(str);
sb.append("业务的验证token网络请求时间:");
sb.append(System.currentTimeMillis() - currentTimeMillis);
walletPay2.validateTokenTimeText = sb.toString();
str2 = WalletPay.this.validateTokenTimeText;
LogUtil.d(str2);
Constants.amount = validateAndQueryInfoResult.getAmount();
if (validateAndQueryInfoResult.getOnlinePayOrder() != null && !TextUtils.isEmpty(validateAndQueryInfoResult.getOnlinePayOrder().getRemark())) {
WalletPay.this.productInfo = validateAndQueryInfoResult.getOnlinePayOrder().getRemark();
}
if (validateAndQueryInfoResult.getAppPayOrder() != null && !TextUtils.isEmpty(validateAndQueryInfoResult.getAppPayOrder().getRemark())) {
WalletPay.this.appPayOrderInfo = validateAndQueryInfoResult.getAppPayOrder().getRemark();
}
boolean hasPassword = validateAndQueryInfoResult.getHasPassword();
String str8 = source;
if (Intrinsics.areEqual("BALANCE", validateAndQueryInfoResult.getPaymentModel())) {
WalletPay.this.isOnlySupportBalance = true;
}
if (hasPassword) {
str3 = str8;
} else {
AuthType authType = AuthType.FIRSTSET_PASSWORD;
str3 = "FIRSTSET_PASSWORD";
}
if (!TextUtils.isEmpty(nextBusinessCode) && (!Intrinsics.areEqual(str3, nextBusinessCode))) {
str8 = nextBusinessCode;
}
String str9 = str8;
if (validateAndQueryInfoResult.getWallet() != null) {
Constants.REALNAME = validateAndQueryInfoResult.getWallet().getNameDesc();
Constants.idCardNoDesc = validateAndQueryInfoResult.getWallet().getIdCardNoDesc();
Constants.mobileDesc = validateAndQueryInfoResult.getWallet().getMobileDesc();
Constants.balance = TextUtils.isEmpty(validateAndQueryInfoResult.getWallet().getBalance()) ? "0.00" : validateAndQueryInfoResult.getWallet().getBalance();
}
if (validateAndQueryInfoResult.getAuthItems() != null) {
String[] authItems = validateAndQueryInfoResult.getAuthItems();
if (authItems == null) {
Intrinsics.throwNpe();
}
if (!(authItems.length == 0)) {
arrayList = WalletPay.this.authList;
arrayList.clear();
String[] authItems2 = validateAndQueryInfoResult.getAuthItems();
if (authItems2 == null) {
Intrinsics.throwNpe();
}
for (String str10 : authItems2) {
if (Intrinsics.areEqual(str10, "AUTH_USER") || Intrinsics.areEqual(str10, "AUTH_PERSON") || Intrinsics.areEqual(str10, "AUTH_IDCARD_PIC")) {
arrayList3 = WalletPay.this.authList;
arrayList3.add(str10);
}
}
arrayList2 = WalletPay.this.authList;
if (!arrayList2.isEmpty()) {
WalletPay.this.goAuth(token, str9, str3, hasPassword);
return;
}
walletPay = WalletPay.this;
str4 = token;
if (str9 == null) {
Intrinsics.throwNpe();
}
if (str3 == null) {
Intrinsics.throwNpe();
}
payAuthType = validateAndQueryInfoResult.getPayAuthType();
walletSafety = validateAndQueryInfoResult.getWalletSafety();
str5 = null;
str6 = null;
i = 48;
obj = null;
str7 = str9;
str9 = str3;
WalletPay.passHandle$default(walletPay, str4, str7, hasPassword, str9, str5, str6, payAuthType, walletSafety, i, obj);
}
}
if (validateAndQueryInfoResult.getBindCards() != null) {
ArrayList<Card> bindCards = validateAndQueryInfoResult.getBindCards();
if (bindCards == null) {
Intrinsics.throwNpe();
}
if (bindCards.size() > 0) {
WalletPay.this.cardList = validateAndQueryInfoResult.getBindCards();
}
}
if (validateAndQueryInfoResult.getWithholdingOrder() != null && validateAndQueryInfoResult.getWithholdingOrder().getFeeAmount() != null) {
WalletPay.this.feeAmount = new BigDecimal(validateAndQueryInfoResult.getWithholdingOrder().getFeeAmount()).doubleValue();
}
WalletPay.this.isSupportCredit = Intrinsics.areEqual("ALL", validateAndQueryInfoResult.getAvailBankCardType());
walletPay = WalletPay.this;
str4 = token;
payAuthType = validateAndQueryInfoResult.getPayAuthType();
walletSafety = validateAndQueryInfoResult.getWalletSafety();
str5 = null;
str6 = null;
i = 48;
obj = null;
str7 = str3;
WalletPay.passHandle$default(walletPay, str4, str7, hasPassword, str9, str5, str6, payAuthType, walletSafety, i, obj);
}
};
WeakReference<Activity> weakReference3 = this.mActivity;
if (weakReference3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mActivity");
}
Activity activity3 = weakReference3.get();
if (activity3 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(activity3, "mActivity.get()!!");
final Activity activity4 = activity3;
h3.c5(ty2Var, new ExternalFlowable(activity4) {
@Override
public void accept(@NotNull Throwable e) {
WalletPay.ServicePayCallback servicePayCallback;
Intrinsics.checkParameterIsNotNull(e, "e");
WalletPay.this.hideLoadingDialog();
WalletPay.WalletPayCallback walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback != null) {
String str = source;
Status status = Status.FAIL;
walletPayCallback.callback(str, "FAIL", e.getMessage());
}
servicePayCallback = WalletPay.this.mServicePayCallback;
if (servicePayCallback != null) {
String str2 = source;
Status status2 = Status.FAIL;
servicePayCallback.callback(str2, "FAIL", e.getMessage());
}
}
});
}
}