超媒网络 v3.0.0版本的 MD5 值为:e72248abb238993f421967424d9a9515
以下内容为反编译后的 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.hu2;
import p.a.y.e.a.s.e.net.iu2;
import p.a.y.e.a.s.e.net.n;
import p.a.y.e.a.s.e.net.nu2;
import p.a.y.e.a.s.e.net.r5;
import p.a.y.e.a.s.e.net.sy2;
import p.a.y.e.a.s.e.net.xb3;
import p.a.y.e.a.s.e.net.yw2;
@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\r\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\t\n\u0002\b\u0011\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u0006\n\u0002\b\u0010\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\t\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\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u009d\u0001\u0010\u009e\u0001R\u001a\u0010 \u0001\u001a\u00030\u009f\u00018\u0002@\u0002X\u0082\u0004¢\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\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«\u0001\u001a\u00020%8\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\b«\u0001\u0010¬\u0001\u001a\u0006\b\u00ad\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\u009e\u0001\u001a\u0005\b±\u0001\u0010o\"\u0005\b²\u0001\u0010|R'\u0010\u000b\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\u000b\u0010\u009e\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\u009e\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\u0084\u0001\u001a\u00020\u00108\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0084\u0001\u0010½\u0001R'\u0010\b\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\b\u0010\u009e\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\u009e\u0001\u001a\u0005\bÀ\u0001\u0010o\"\u0005\bÁ\u0001\u0010|R,\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\u009e\u0001R\u0019\u0010Ê\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÊ\u0001\u0010\u009e\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\u009e\u0001R\u001a\u0010Ô\u0001\u001a\u00030Ó\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÔ\u0001\u0010Õ\u0001R\u0019\u0010Ö\u0001\u001a\u00020\u00108\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'\u0010\n\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\n\u0010\u009e\u0001\u001a\u0005\bÙ\u0001\u0010o\"\u0005\bÚ\u0001\u0010|R\u001b\u0010Û\u0001\u001a\u0004\u0018\u00010e8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÛ\u0001\u0010Ü\u0001R\u001b\u0010Ý\u0001\u001a\u0004\u0018\u00010#8\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\u009e\u0001\u001a\u0005\bà\u0001\u0010o\"\u0005\bá\u0001\u0010|R'\u0010c\u001a\u0004\u0018\u00010\u00078\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\bc\u0010\u009e\u0001\u001a\u0005\bâ\u0001\u0010o\"\u0005\bã\u0001\u0010|R-\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\u001e\u00101\u001a\t\u0012\u0004\u0012\u00020\u00170æ\u00018\u0002@\u0002X\u0082.¢\u0006\u0007\n\u0005\b1\u0010ç\u0001R\u0019\u0010è\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bè\u0001\u0010\u009e\u0001R\u0019\u0010é\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bé\u0001\u0010\u009e\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\u009e\u0001R\u0019\u0010ë\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bë\u0001\u0010\u009e\u0001R\u0019\u0010ì\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bì\u0001\u0010\u009e\u0001R\u001b\u0010í\u0001\u001a\u0004\u0018\u00010\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bí\u0001\u0010\u009e\u0001R\u0019\u0010î\u0001\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bî\u0001\u0010\u009e\u0001R\u001b\u0010ï\u0001\u001a\u0004\u0018\u00010\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bï\u0001\u0010\u009e\u0001R\u001c\u0010ñ\u0001\u001a\u0005\u0018\u00010ð\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bñ\u0001\u0010ò\u0001R\u001b\u0010ó\u0001\u001a\u0004\u0018\u00010#8\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", "payDialogTimeText", "Ljava/lang/String;", "Ljava/util/concurrent/locks/ReentrantLock;", "lock", "Ljava/util/concurrent/locks/ReentrantLock;", "authList", "Ljava/util/ArrayList;", "", TtmlNode.START, "J", "getStart", "()J", "setStart", "(J)V", "mPosition", "I", "getMPosition", "()I", "setMPosition", "paymentModel", "getPaymentModel", "setPaymentModel", "getToken", "setToken", "phoneNumber", "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", "Z", "getMerchantId", "setMerchantId", "getWalletId", "setWalletId", "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", "walletQueryTimeText", "sourceName", "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", "mPayAuthType", "", "feeAmount", "D", Constants.isSupportCredit, "mDialogContentView", "Landroid/view/View;", "getRequestId", "setRequestId", "mServicePayCallback", "Lcom/ehking/sdk/wepay/interfaces/WalletPay$ServicePayCallback;", "mOptionAd1", "Landroidx/appcompat/app/AlertDialog;", "payCard", "getPayCard", "setPayCard", "getSource", "setSource", "Lcom/ehking/sdk/wepay/net/bean/Card;", "cardList", "Ljava/lang/ref/WeakReference;", "Ljava/lang/ref/WeakReference;", "validateTokenTimeText", "appPayOrderInfo", "authSourceTimeText", "cardListTimeText", "mCheckPwdAuthType", "imageUrl", "productInfo", Constants.bindCardId, "Lcom/ehking/sdk/wepay/ui/view/dialog/LoadingDialog;", "mDialog", "Lcom/ehking/sdk/wepay/ui/view/dialog/LoadingDialog;", "checkPwdDialog", "<init>", "Companion", "LogCallback", "ServicePayCallback", "WalletPayCallback", "sdk_release"}, k = 1, mv = {1, 4, 0})
public final class WalletPay {
public static final Companion Companion = 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 str);
}
@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 str, @Nullable String str2, @Nullable String str3);
}
@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 str, @Nullable String str2, @Nullable String str3);
}
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.Companion.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);
String str = this.token;
if (str == null) {
Intrinsics.throwNpe();
}
yw2<Beans.GenerateCertResult> h3 = wepayApi.generateCertBySecretKey(new RequestBean.AutoGenerateCertBySecretKey(str, false, 2, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread());
sy2<Beans.GenerateCertResult> sy2Var = new sy2<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, 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 Context activity3 = activity2;
h3.c5(sy2Var, 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 str, String str2, final Context activity, String str3, String str4) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
showLoadingDialog(activity);
((WepayApi) companion.create(applicationContext, WepayApi.class)).validateForMerchant(new RequestBean.ValidatePassword(Constants.token, str2, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), str4, false, 16, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$checkPwd$1(this, str, activity), new ExternalFlowable(activity) {
@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 str5 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str5, "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 textView, final View view, final ImageView imageView, AlertDialog alertDialog, final String str, final int i) {
AlertDialog alertDialog2 = this.mOptionAd1;
if (alertDialog2 != null) {
alertDialog2.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();
view.postDelayed(new Runnable() {
@Override
public final void run() {
WalletPay.this.moveToLeft(view);
}
}, 300L);
Window window = create.getWindow();
if (window == null) {
Intrinsics.throwNpe();
}
WindowManager.LayoutParams attributes = window.getAttributes();
Context context = textView.getContext();
Intrinsics.checkExpressionValueIsNotNull(context, "type.context");
attributes.width = AndroidUtilsKt.getScreenWidth(context);
Context context2 = textView.getContext();
Intrinsics.checkExpressionValueIsNotNull(context2, "type.context");
attributes.height = (AndroidUtilsKt.getScreenHeight(context2) * 2) / 3;
window.setAttributes(attributes);
window.setWindowAnimations(R.style.LeftAnimDialogStyle);
window.setBackgroundDrawableResource(17170445);
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(view);
}
});
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(@Nullable int i2, @Nullable String str2, @Nullable String str3, @Nullable String str4, String str5) {
AlertDialog.this.dismiss();
this.setMPosition(i2);
chooseCardRlAdapter.setCurrentPosition(i2);
chooseCardRlAdapter.notifyDataSetChanged();
this.bindCardId = str2;
if (!TextUtils.isEmpty(str4)) {
WalletPay walletPay = this;
if (str4 == null) {
Intrinsics.throwNpe();
}
walletPay.setPayCard(str4);
textView.setText(this.getPayCard());
}
WalletPay walletPay2 = this;
CardType cardType = CardType.BALANCE;
String str6 = "BALANCE";
if (Intrinsics.areEqual("BALANCE", str5)) {
TransferPaytype transferPaytype = TransferPaytype.BALANCE;
} else {
TransferPaytype transferPaytype2 = TransferPaytype.BANK_CARD;
str6 = "BANK_CARD";
}
walletPay2.setPaymentModel(str6);
if (TextUtils.isEmpty(str3)) {
imageView.setImageResource(R.mipmap.ic_card);
return;
}
Activity activity4 = (Activity) WalletPay.access$getMActivity$p(this).get();
e.lite_new(str3, R.mipmap.ic_card, imageView);
}
});
rl.setAdapter(chooseCardRlAdapter);
chooseCardRlAdapter.setCurrentPosition(i);
window.findViewById(R.id.ibtn_close).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
AlertDialog.this.dismiss();
}
});
window.findViewById(R.id.add).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
WalletPay walletPay;
String str2;
int i2;
String str3 = str;
AuthType authType = AuthType.APP_PAY;
if (Intrinsics.areEqual(str3, "APP_PAY")) {
walletPay = WalletPay.this;
str2 = str;
i2 = 121;
} else {
walletPay = WalletPay.this;
str2 = str;
i2 = 100;
}
walletPay.toAddCard(str2, i2, 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 str, String str2, final Context activity, String str3, String str4) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
showLoadingDialog(activity);
((WepayApi) companion.create(applicationContext, WepayApi.class)).deposit(new RequestBean.Withdraw(Constants.token, this.bindCardId, str2, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), str4, false, 32, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new sy2<Beans.DepositResult>() {
@Override
public final void accept(Beans.DepositResult depositResult) {
WalletPay.WalletPayCallback walletPayCallback;
WalletPay.this.hideLoadingDialog();
Alert2ChooseDialog alert2ChooseDialog = new Alert2ChooseDialog();
String str5 = "SUCCESS";
boolean areEqual = Intrinsics.areEqual(depositResult.getStatus(), "SUCCESS");
String str6 = Constants.defaultError;
if (!areEqual) {
ErrorCode errorCode = ErrorCode.EJ0000302;
if (Intrinsics.areEqual("EJ0000302", depositResult.getCode())) {
WalletPay.this.findPassword(alert2ChooseDialog, activity, depositResult.getCause(), str);
return;
}
ErrorCode errorCode2 = ErrorCode.EJ0000312;
if (Intrinsics.areEqual("EJ0000312", depositResult.getCode())) {
WalletPay.this.showFaceResultDialog(activity, str, "抱歉,没有认出你来", depositResult.getCause());
return;
}
if (!TextUtils.isEmpty(depositResult.getCause())) {
str6 = depositResult.getCause();
}
if (!TextUtils.isEmpty(depositResult.getErrorMessage())) {
str6 = depositResult.getErrorMessage();
}
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback2 = WalletPay.this.getWalletPayCallback();
if (walletPayCallback2 != null) {
String str7 = str;
Status status = Status.FAIL;
walletPayCallback2.callback(str7, "FAIL", str6);
return;
}
return;
}
Status status2 = Status.FAIL;
String orderStatus = depositResult.getOrderStatus();
DepositStatus depositStatus = DepositStatus.FAIL;
String str8 = "";
if (!Intrinsics.areEqual(orderStatus, "FAIL")) {
String orderStatus2 = depositResult.getOrderStatus();
DepositStatus depositStatus2 = DepositStatus.PROCESS;
if (Intrinsics.areEqual(orderStatus2, "PROCESS")) {
Status status3 = Status.PROCESS;
str5 = "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())) {
str6 = depositResult.getCause();
}
if (!TextUtils.isEmpty(depositResult.getErrorMessage())) {
str8 = depositResult.getErrorMessage();
}
}
} else if (!TextUtils.isEmpty(depositResult.getCause())) {
str6 = depositResult.getCause();
}
str8 = str6;
}
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
walletPayCallback.callback(str, str5, str8);
return;
}
return;
} else if (!TextUtils.isEmpty(depositResult.getCause())) {
str6 = depositResult.getCause();
}
str5 = "FAIL";
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
}
}
}, new ExternalFlowable(activity) {
@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 str5 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str5, "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 view) {
Context context = view.getContext();
Intrinsics.checkExpressionValueIsNotNull(context, "v.context");
ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(view, PropertyValuesHolder.ofFloat("translationX", -AndroidUtilsKt.getScreenWidth(context), 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 activity, String str, final String str2) {
alert2ChooseDialog.showMessage(activity, str, "重试", "忘记密码");
alert2ChooseDialog.setOnCancleClickListener(new Alert2ChooseDialog.OnCancelClickListener() {
@Override
public final void cancel(String str3) {
WalletPay.getAllCardList$default(WalletPay.this, str2, false, false, 6, null);
}
});
alert2ChooseDialog.setOnConfirmClickListener(new Alert2ChooseDialog.OnConfirmClickListener() {
@Override
public final void confirm(String str3) {
WalletPay.toFindPassword$default(WalletPay.this, str2, 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 activity) {
iu2.lite_break(activity).lite_try(new String[]{nu2.lite_while, nu2.lite_throw}).lite_if(new hu2() {
@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 hu2() {
@Override
public final void onAction(List<String> list) {
Toast.makeText(activity.getApplicationContext(), "存储权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (iu2.lite_new(activity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(nu2.lite_while, nu2.lite_throw))) {
iu2.lite_this(activity.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 str) {
String str2;
try {
FileInputStream fileInputStream = new FileInputStream(str);
KeyStore keyStore = KeyStore.getInstance(HttpClientSslHelper.KEY_STORE_TYPE_P12);
Md5Util.Companion companion = Md5Util.Companion;
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) {
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");
}
str2 = nextElement;
} else {
str2 = "";
}
Key key = keyStore.getKey(str2, charArray);
if (key != null) {
return getKeyString((PrivateKey) key);
}
throw new TypeCastException("null cannot be cast to non-null type java.security.PrivateKey");
}
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
private final void goAuth(String str, String str2, String str3, boolean z, boolean z2) {
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, AuthenticationActivity.class).putExtra("tokenId", str).putExtra("toolBarTitle", "身份认证").putExtra(Constants.businessCode, str2).putExtra(Constants.currentBusinessCode, str3).putExtra(Constants.isPassword, z2).putExtra("isLiveDetect", z));
}
}
private final void goLiveDetect(String str, String str2, String str3, boolean z) {
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, cls).putExtra("tokenId", str).putExtra("toolBarTitle", "活体认证").putExtra(Constants.businessCode, str2).putExtra(Constants.currentBusinessCode, str3).putExtra(Constants.isPassword, z));
}
}
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, 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.Companion;
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 str, String str2, String str3, String str4) {
Constants.merchantId = str;
Constants.walletId = str2;
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 = str3;
Constants.token = str4;
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 view) {
Context context = view.getContext();
Intrinsics.checkExpressionValueIsNotNull(context, "v.context");
ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(view, PropertyValuesHolder.ofFloat("translationX", -AndroidUtilsKt.getScreenWidth(context)), 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 str, String str2, final Context activity, String str3, String str4) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
showLoadingDialog(activity);
((WepayApi) companion.create(applicationContext, WepayApi.class)).onAppPayConfirm(new RequestBean.Transfer(Constants.token, this.bindCardId, str2, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), str4, false, 64, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$onAppPay$1(this, str, activity), new ExternalFlowable(activity) {
@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 str5 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str5, "FAIL", getMMsg());
}
servicePayCallback = WalletPay.this.mServicePayCallback;
if (servicePayCallback != null) {
String str6 = str;
Status status2 = Status.FAIL;
servicePayCallback.callback(str6, "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 str, String str2, final Context activity, String str3, String str4) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
showLoadingDialog(activity);
((WepayApi) companion.create(applicationContext, WepayApi.class)).onlinePayConfirm(new RequestBean.Transfer(Constants.token, this.bindCardId, str2, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), str4, false, 64, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$onlinePay$1(this, str, activity), new ExternalFlowable(activity) {
@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 str5 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str5, "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 str, final Context activity, String str2) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
WepayApi wepayApi = (WepayApi) companion.create(applicationContext, WepayApi.class);
if (activity instanceof BaseActivity) {
((BaseActivity) activity).showLoadingDialog();
} else {
showLoadingDialog(activity);
}
wepayApi.faceScanConfigOpen(new RequestBean.FaceSwitch(str2, false, 2, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new sy2<Beans.FaceSwitchResultInfo>() {
@Override
public final void accept(Beans.FaceSwitchResultInfo faceSwitchResultInfo) {
SettingActivity.SwitchFaceCallBack mSettingFaceCallback;
boolean z;
Activity activity2 = activity;
if (activity2 instanceof BaseActivity) {
((BaseActivity) activity2).hideLoadingDialog();
} else {
WalletPay.this.hideLoadingDialog();
}
if (Intrinsics.areEqual(faceSwitchResultInfo.getStatus(), "SUCCESS")) {
ToastUtil toastUtil = ToastUtil.INSTANCE;
Activity activity3 = activity;
Context applicationContext2 = activity3 != null ? activity3.getApplicationContext() : null;
if (applicationContext2 == null) {
Intrinsics.throwNpe();
}
toastUtil.showToast(applicationContext2, "开启成功");
mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback == null) {
return;
}
z = true;
} else {
ErrorCode errorCode = ErrorCode.EJ0000410;
if (Intrinsics.areEqual("EJ0000410", faceSwitchResultInfo.getCode())) {
WalletPay.this.showFaceResultDialog(activity, str, "抱歉,没有认出你来", faceSwitchResultInfo.getCause());
return;
}
mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback == null) {
return;
}
z = false;
}
mSettingFaceCallback.onOpenResult(z);
}
}, new ExternalFlowable(activity) {
@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 str, String str2, boolean z, String str3, String str4, String str5, String str6, Beans.WalletSafety walletSafety) {
Activity activity;
Intent putExtra;
Activity activity2;
Intent putExtra2;
this.mPayAuthType = str6;
AuthType authType = AuthType.VERIFY_CERT;
if (Intrinsics.areEqual(str2, "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, CertificateActivity.class).putExtra("toolBarTitle", "安装数字证书").putExtra(Constants.currentBusinessCode, "VERIFY_CERT").putExtra(Constants.businessCode, str3).putExtra(Constants.isPassword, z);
} else {
AuthType authType2 = AuthType.FIRSTSET_PASSWORD;
if (!Intrinsics.areEqual(str2, "FIRSTSET_PASSWORD")) {
AuthType authType3 = AuthType.ACCESS_SAFETY;
if (Intrinsics.areEqual(str2, "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, SettingActivity.class).putExtra("startTime", this.start).putExtra("bean", walletSafety);
} else {
AuthType authType4 = AuthType.ACCESS_CARDlIST;
if (!Intrinsics.areEqual(str2, "ACCESS_CARDlIST")) {
AuthType authType5 = AuthType.RECHARGE;
if (!Intrinsics.areEqual(str2, "RECHARGE")) {
AuthType authType6 = AuthType.TRANSFER;
if (!Intrinsics.areEqual(str2, "TRANSFER")) {
AuthType authType7 = AuthType.WITHHOLDING;
if (!Intrinsics.areEqual(str2, "WITHHOLDING")) {
AuthType authType8 = AuthType.REDPACKET;
if (!Intrinsics.areEqual(str2, "REDPACKET")) {
AuthType authType9 = AuthType.ONLINEPAY;
if (!Intrinsics.areEqual(str2, "ONLINEPAY")) {
AuthType authType10 = AuthType.APP_PAY;
if (!Intrinsics.areEqual(str2, "APP_PAY")) {
AuthType authType11 = AuthType.VALIDATE_PASSWORD;
if (Intrinsics.areEqual(str2, "VALIDATE_PASSWORD")) {
showCheckPwdDialog$default(this, str2, null, 2, null);
return;
}
return;
}
}
}
}
}
}
showPayDialog$default(this, str2, 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, 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, SetPwdActivity.class).putExtra(Constants.businessCode, str3).putExtra(Constants.isFirstSetPwd, true);
}
activity2.startActivity(putExtra2.putExtra("tokenId", str).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 str, String str2, final Context activity, String str3, String str4) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
showLoadingDialog(activity);
((WepayApi) companion.create(applicationContext, WepayApi.class)).redEnvelope(new RequestBean.Transfer(Constants.token, this.bindCardId, str2, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), str4, false, 64, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$redEnvelope$1(this, str, activity), new ExternalFlowable(activity) {
@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 str5 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str5, "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 str, String str2) {
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(17170445);
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 str3 = this.mPayAuthType;
PayAuthType payAuthType = PayAuthType.PAY_PASSWORD;
if (!Intrinsics.areEqual(str3, "PAY_PASSWORD")) {
PayAuthType payAuthType2 = PayAuthType.FACE_SCAN;
if (Intrinsics.areEqual(str3, "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(str3, "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 str4;
str4 = this.mPayAuthType;
PayAuthType payAuthType5 = PayAuthType.PAY_PASSWORD;
if (Intrinsics.areEqual(str4, "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(str4, "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, str, inflate);
}
});
final ArrayList arrayList2 = new ArrayList();
keyboardView.setOnKeyChangeListener(new KeyChangeListener() {
@Override
public final void onKeyChange(View view, String decKey, String str4) {
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 (str4 == null) {
Intrinsics.throwNpe();
}
if (str4.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 (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();
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(str4);
}
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 str5 = str;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
WalletPay.checkPwd$default(walletPay, str5, 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 str4 = str;
Status status = Status.CANCEL;
walletPayCallback.callback(str4, "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) {
AlertDialog.this.dismiss();
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str4 = str;
Status status = Status.CANCEL;
walletPayCallback.callback(str4, "CANCEL", Constants.cancel);
}
return true;
}
return false;
}
});
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();
}
});
}
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 str4;
str4 = this.mPayAuthType;
PayAuthType payAuthType5 = PayAuthType.PAY_PASSWORD;
if (Intrinsics.areEqual(str4, "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(str4, "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, str, inflate);
}
});
final ArrayList arrayList22 = new ArrayList();
keyboardView.setOnKeyChangeListener(new KeyChangeListener() {
@Override
public final void onKeyChange(View view, String decKey, String str4) {
PasswordEditText password2 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password2, "password");
Editable text = password2.getText();
if (text == null) {
Intrinsics.throwNpe();
}
if (text.length() >= 6 || arrayList22.size() >= 6) {
if (str4 == null) {
Intrinsics.throwNpe();
}
if (str4.length() > 0) {
arrayList22.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();
arrayList22.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 arrayList222 = arrayList22;
PasswordEditText password10 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password10, "password");
Editable text9 = password10.getText();
if (text9 == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(arrayList222.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);
arrayList22.add(str4);
}
PasswordEditText password13 = PasswordEditText.this;
Intrinsics.checkExpressionValueIsNotNull(password13, "password");
Editable text12 = password13.getText();
if (text12 == null) {
Intrinsics.throwNpe();
}
if (text12.length() == 6 && arrayList22.size() == 6) {
keyboardView.setVisibility(8);
create.dismiss();
StringBuffer stringBuffer = new StringBuffer();
Iterator it = arrayList22.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 str5 = str;
Object obj = WalletPay.access$getMActivity$p(walletPay).get();
if (obj == null) {
Intrinsics.throwNpe();
}
Intrinsics.checkExpressionValueIsNotNull(obj, "mActivity.get()!!");
WalletPay.checkPwd$default(walletPay, str5, 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();
arrayList22.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 str4 = str;
Status status = Status.CANCEL;
walletPayCallback.callback(str4, "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) {
AlertDialog.this.dismiss();
WalletPay.WalletPayCallback walletPayCallback = this.getWalletPayCallback();
if (walletPayCallback != null) {
String str4 = str;
Status status = Status.CANCEL;
walletPayCallback.callback(str4, "CANCEL", Constants.cancel);
}
return true;
}
return false;
}
});
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();
arrayList22.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 str, String str2, String str3) {
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(17170445);
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(str2);
if (str3 != null) {
textView3.setText(str3);
}
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 str4 = str;
view2 = walletPay.mDialogContentView;
walletPay.getFacePermission(activity2, str4, 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 activity) {
if (activity == null || activity.isDestroyed()) {
return;
}
if (this.mDialog == null) {
this.mDialog = new LoadingDialog(activity);
}
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);
}
@kotlin.jvm.JvmOverloads
private final void showPayDialog(final java.lang.String r29, final boolean r30, java.lang.String r31) {
throw new UnsupportedOperationException("Method not decompiled: com.ehking.sdk.wepay.interfaces.WalletPay.showPayDialog(java.lang.String, boolean, java.lang.String):void");
}
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 str, int i, boolean z) {
boolean z2 = this.isSupportCredit;
if (i == 121) {
z2 = 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, CheckPwdActivity.class).putExtra("sourceType", 1).putExtra(Constants.isSupportCredit, z2).putExtra(Constants.businessCode, str).putExtra(Constants.cashierDeskBindingCard, z), i);
}
}
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 str, boolean z) {
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, FindPasswordActivity.class).putExtra(Constants.isSupportCredit, true).putExtra(Constants.businessCode, str));
}
if (z) {
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
WalletPay.getAllCardList$default(WalletPay.this, str, 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 str, String str2, final Activity activity, String str3, String str4) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
showLoadingDialog(activity);
((WepayApi) companion.create(applicationContext, WepayApi.class)).transfer(new RequestBean.Transfer(Constants.token, this.bindCardId, str2, this.paymentModel, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), str4, false, 64, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new WalletPay$transfer$1(this, str, activity), new ExternalFlowable(activity) {
@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 str5 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str5, "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 str, String str2, final Activity activity, String str3, String str4) {
RetrofitClient companion = RetrofitClient.Companion.getInstance();
Context applicationContext = activity.getApplicationContext();
Intrinsics.checkExpressionValueIsNotNull(applicationContext, "mActivity.applicationContext");
showLoadingDialog(activity);
((WepayApi) companion.create(applicationContext, WepayApi.class)).withdraw(new RequestBean.Withdraw(Constants.token, this.bindCardId, str2, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), str4, false, 32, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new sy2<Beans.WithdrawResult>() {
@Override
public final void accept(Beans.WithdrawResult withdrawResult) {
WalletPay.WalletPayCallback walletPayCallback;
WalletPay.this.hideLoadingDialog();
Alert2ChooseDialog alert2ChooseDialog = new Alert2ChooseDialog();
String str5 = "SUCCESS";
boolean areEqual = Intrinsics.areEqual(withdrawResult.getStatus(), "SUCCESS");
String str6 = Constants.defaultError;
if (!areEqual) {
ErrorCode errorCode = ErrorCode.EJ0000302;
if (Intrinsics.areEqual("EJ0000302", withdrawResult.getCode())) {
WalletPay.this.findPassword(alert2ChooseDialog, activity, withdrawResult.getCause(), str);
return;
}
ErrorCode errorCode2 = ErrorCode.EJ0000312;
if (Intrinsics.areEqual("EJ0000312", withdrawResult.getCode())) {
WalletPay.this.showFaceResultDialog(activity, str, "抱歉,没有认出你来", withdrawResult.getCause());
return;
}
if (!TextUtils.isEmpty(withdrawResult.getCause())) {
str6 = withdrawResult.getCause();
}
if (!TextUtils.isEmpty(withdrawResult.getErrorMessage())) {
str6 = withdrawResult.getErrorMessage();
}
WalletPay.this.dismissAllDialog();
WalletPay.WalletPayCallback walletPayCallback2 = WalletPay.this.getWalletPayCallback();
if (walletPayCallback2 != null) {
String str7 = str;
Status status = Status.FAIL;
walletPayCallback2.callback(str7, "FAIL", str6);
return;
}
return;
}
Status status2 = Status.FAIL;
String withholdingStatus = withdrawResult.getWithholdingStatus();
DepositStatus depositStatus = DepositStatus.FAIL;
String str8 = "";
if (!Intrinsics.areEqual(withholdingStatus, "FAIL")) {
String withholdingStatus2 = withdrawResult.getWithholdingStatus();
DepositStatus depositStatus2 = DepositStatus.PROCESS;
if (Intrinsics.areEqual(withholdingStatus2, "PROCESS")) {
Status status3 = Status.PROCESS;
str5 = "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())) {
str6 = withdrawResult.getCause();
}
if (!TextUtils.isEmpty(withdrawResult.getErrorMessage())) {
str8 = withdrawResult.getErrorMessage();
}
}
} else if (!TextUtils.isEmpty(withdrawResult.getCause())) {
str6 = withdrawResult.getCause();
}
str8 = str6;
}
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
walletPayCallback.callback(str, str5, str8);
return;
}
return;
} else if (!TextUtils.isEmpty(withdrawResult.getCause())) {
str6 = withdrawResult.getCause();
}
str5 = "FAIL";
WalletPay.this.dismissAllDialog();
walletPayCallback = WalletPay.this.getWalletPayCallback();
if (walletPayCallback == null) {
}
}
}, new ExternalFlowable(activity) {
@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 str5 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str5, "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, 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");
iu2.lite_break(mActivity).lite_try(new String[]{nu2.lite_while, nu2.lite_throw}).lite_if(new hu2() {
@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 hu2() {
@Override
public final void onAction(List<String> list) {
result.invoke(Boolean.FALSE);
Toast.makeText(mActivity.getApplicationContext(), "存储权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (iu2.lite_new(mActivity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(nu2.lite_while, nu2.lite_throw))) {
iu2.lite_this(mActivity.getApplicationContext()).execute();
}
}
}).start();
}
public final void closeFace(@NotNull final Activity mActivity) {
Intrinsics.checkParameterIsNotNull(mActivity, "mActivity");
RetrofitClient companion = RetrofitClient.Companion.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(xb3.lite_for()).h3(AndroidSchedulers.mainThread()).c5(new sy2<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;
}
z = true;
} else {
mSettingFaceCallback = WalletPay.this.getMSettingFaceCallback();
if (mSettingFaceCallback == null) {
return;
}
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, 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 z, final boolean z2) {
yw2<Beans.BindList> h3;
Activity it;
Intrinsics.checkParameterIsNotNull(businessCode, "businessCode");
if (z) {
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.Companion.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();
}
final long currentTimeMillis = System.currentTimeMillis();
String str = Constants.token;
Intrinsics.checkExpressionValueIsNotNull(str, "Constants.token");
yw2<Beans.BindList> h5 = ((WepayApi) companion.create(applicationContext, WepayApi.class)).queryPaymentModelList(new RequestBean.AllCardList(str, AuthTypeConvertUtils.INSTANCE.authTypeToNetWork(this.mPayAuthType), false, 4, null)).h5(xb3.lite_for());
if (h5 == null || (h3 = h5.h3(AndroidSchedulers.mainThread())) == null) {
return;
}
sy2<Beans.BindList> sy2Var = new sy2<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, z2, 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(sy2Var, 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 view) {
Intrinsics.checkParameterIsNotNull(mActivity, "mActivity");
Intrinsics.checkParameterIsNotNull(businessCode, "businessCode");
iu2.lite_break(mActivity).lite_try(new String[]{nu2.lite_while, nu2.lite_for}).lite_if(new hu2() {
@Override
public final void onAction(List<String> list) {
try {
Activity activity = mActivity;
if (activity != null) {
WalletPay.this.startFaceDialog(activity, businessCode, view);
}
} 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 hu2() {
@Override
public final void onAction(List<String> list) {
Toast.makeText(mActivity.getApplicationContext(), "摄像头权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (iu2.lite_new(mActivity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(nu2.lite_while, nu2.lite_for))) {
iu2.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");
iu2.lite_break(mActivity).lite_try(new String[]{nu2.lite_while, nu2.lite_throw}).lite_if(new hu2() {
@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 hu2() {
@Override
public final void onAction(List<String> list) {
Toast.makeText(mActivity.getApplicationContext(), "存储权限被禁止,被禁止的功能将无法使用,请去设置中打开该权限", 0).show();
WalletPay.this.hideLoadingDialog();
if (iu2.lite_new(mActivity.getApplicationContext(), CollectionsKt__CollectionsKt.arrayListOf(nu2.lite_while, nu2.lite_throw))) {
iu2.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 str, @Nullable String str2, boolean z) {
Activity activity;
Intent putExtra;
String str3;
Intrinsics.checkParameterIsNotNull(token, "token");
if (!this.authList.isEmpty()) {
String str4 = this.authList.get(0);
Intrinsics.checkExpressionValueIsNotNull(str4, "authList[0]");
String str5 = str4;
this.authList.remove(str5);
if (StringsKt__StringsKt.contains$default((CharSequence) str5, (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, AuthenticationActivity.class).putExtra("tokenId", token);
str3 = "身份认证";
} else if (StringsKt__StringsKt.contains$default((CharSequence) str5, (CharSequence) "AUTH_PERSON", false, 2, (Object) null)) {
goLiveDetect(token, str, str2, z);
return;
} else if (StringsKt__StringsKt.contains$default((CharSequence) str5, (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, UploadIdCardActivity.class).putExtra("tokenId", token);
str3 = "上传身份证";
}
activity.startActivity(putExtra.putExtra("toolBarTitle", str3).putExtra(Constants.businessCode, str).putExtra(Constants.currentBusinessCode, str2).putExtra(Constants.isPassword, z));
return;
}
validateAndQueryInfo(token, str, str2);
}
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 z) {
ConfigConstants.isDebug = Boolean.valueOf(z);
}
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 z) {
Constants.isRandomKeyboard = z;
}
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(@NotNull boolean z, ArrayList<String> sourceList) {
Intrinsics.checkParameterIsNotNull(sourceList, "sourceList");
Constants.isOnlySupportBalance = z;
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 i) {
Constants.toolBarBackImgColor = i;
}
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 view) {
Intrinsics.checkParameterIsNotNull(activity, "activity");
Intrinsics.checkParameterIsNotNull(businessCode, "businessCode");
try {
this.mDialogContentView = view;
activity.startActivity(new Intent(activity, SilentLivenessDialog.class));
e.lite_for = new n() {
@Override
public final void callback(String str, String errorMessage, String str2) {
View view2;
if (!Intrinsics.areEqual(str, "SUCCESS")) {
if (!Intrinsics.areEqual(str, "FAIL") && !Intrinsics.areEqual(str, "INIT_FAIL")) {
view2 = WalletPay.this.mDialogContentView;
if (view2 != null) {
WalletPay.this.enterCenter(view2);
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 (view != null) {
view.postDelayed(new Runnable() {
@Override
public final void run() {
WalletPay.this.moveToLeft(view);
}
}, 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, 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 str, @NotNull final String nextBusinessCode) {
Intrinsics.checkParameterIsNotNull(token, "token");
Intrinsics.checkParameterIsNotNull(nextBusinessCode, "nextBusinessCode");
RetrofitClient companion = RetrofitClient.Companion.getInstance();
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();
}
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();
yw2<Beans.ValidateAndQueryInfoResult> h3 = wepayApi.validateAndQueryInfo(new RequestBean.ValidateToken(token, false, 2, null)).h5(xb3.lite_for()).h3(AndroidSchedulers.mainThread());
sy2<Beans.ValidateAndQueryInfoResult> sy2Var = new sy2<Beans.ValidateAndQueryInfoResult>() {
@Override
public final void accept(Beans.ValidateAndQueryInfoResult validateAndQueryInfoResult) {
String str2;
String str3;
String str4;
WalletPay walletPay;
String str5;
String payAuthType;
Beans.WalletSafety walletSafety;
String str6;
String str7;
int i;
Object obj;
String str8;
ArrayList arrayList;
ArrayList arrayList2;
ArrayList arrayList3;
WalletPay.this.hideLoadingDialog();
WalletPay walletPay2 = WalletPay.this;
StringBuilder sb = new StringBuilder();
str2 = WalletPay.this.sourceName;
sb.append(str2);
sb.append("业务的验证token网络请求时间:");
sb.append(System.currentTimeMillis() - currentTimeMillis);
walletPay2.validateTokenTimeText = sb.toString();
str3 = WalletPay.this.validateTokenTimeText;
LogUtil.d(str3);
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 str9 = str;
if (Intrinsics.areEqual("BALANCE", validateAndQueryInfoResult.getPaymentModel())) {
WalletPay.this.isOnlySupportBalance = true;
}
if (hasPassword) {
str4 = str9;
} else {
AuthType authType = AuthType.FIRSTSET_PASSWORD;
str4 = "FIRSTSET_PASSWORD";
}
if (!TextUtils.isEmpty(nextBusinessCode) && (!Intrinsics.areEqual(str4, nextBusinessCode))) {
str9 = nextBusinessCode;
}
String str10 = str9;
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 str11 : authItems2) {
if (Intrinsics.areEqual(str11, "AUTH_USER") || Intrinsics.areEqual(str11, "AUTH_PERSON") || Intrinsics.areEqual(str11, "AUTH_IDCARD_PIC")) {
arrayList3 = WalletPay.this.authList;
arrayList3.add(str11);
}
}
arrayList2 = WalletPay.this.authList;
if (!arrayList2.isEmpty()) {
WalletPay.this.goAuth(token, str10, str4, hasPassword);
return;
}
walletPay = WalletPay.this;
str5 = token;
if (str10 == null) {
Intrinsics.throwNpe();
}
if (str4 == null) {
Intrinsics.throwNpe();
}
payAuthType = validateAndQueryInfoResult.getPayAuthType();
walletSafety = validateAndQueryInfoResult.getWalletSafety();
str6 = null;
str7 = null;
i = 48;
obj = null;
str8 = str10;
str10 = str4;
WalletPay.passHandle$default(walletPay, str5, str8, hasPassword, str10, str6, str7, 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;
str5 = token;
payAuthType = validateAndQueryInfoResult.getPayAuthType();
walletSafety = validateAndQueryInfoResult.getWalletSafety();
str6 = null;
str7 = null;
i = 48;
obj = null;
str8 = str4;
WalletPay.passHandle$default(walletPay, str5, str8, hasPassword, str10, str6, str7, 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(sy2Var, 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 str2 = str;
Status status = Status.FAIL;
walletPayCallback.callback(str2, "FAIL", e.getMessage());
}
servicePayCallback = WalletPay.this.mServicePayCallback;
if (servicePayCallback != null) {
String str3 = str;
Status status2 = Status.FAIL;
servicePayCallback.callback(str3, "FAIL", e.getMessage());
}
}
});
}
}