导航菜单

页面标题

页面副标题

Atlys v4.8.7 - C6186b.java 源代码

正在查看: Atlys v4.8.7 应用的 C6186b.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package th;

import Gh.C0761s1;
import Gh.C0766u0;
import Gh.T0;
import Gh.n2;
import Jh.T;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.LocaleList;
import android.util.Base64;
import bn.AbstractC2523a;
import bn.AbstractC2541s;
import ch.C2747s;
import ch.C2748t;
import com.stripe.android.link.LinkForegroundActivity;
import i.AbstractC3898b;
import java.io.Serializable;
import java.util.Locale;
import kotlin.NoWhenBranchMatchedException;
import org.json.JSONObject;
import xl.x;
import zh.C7024c;

public final class C6186b extends AbstractC3898b {

    public final T f63984d;

    public C6186b(T stripeRepository) {
        kotlin.jvm.internal.l.h(stripeRepository, "stripeRepository");
        this.f63984d = stripeRepository;
    }

    @Override
    public final Intent createIntent(Context context, Object obj) {
        Locale locale;
        LocaleList locales;
        Long l;
        C6185a input = (C6185a) obj;
        kotlin.jvm.internal.l.h(context, "context");
        kotlin.jvm.internal.l.h(input, "input");
        C2748t c2748t = C2748t.f36146c;
        zh.l lVar = null;
        if (c2748t == null) {
            SharedPreferences sharedPreferences = new C2747s(context).f36145a;
            String string = sharedPreferences.getString("key_publishable_key", null);
            c2748t = string != null ? new C2748t(string, sharedPreferences.getString("key_account_id", null)) : null;
            if (c2748t == null) {
                throw new IllegalStateException("PaymentConfiguration was not initialized. Call PaymentConfiguration.init().");
            }
            C2748t.f36146c = c2748t;
        }
        C7024c c7024c = zh.m.Companion;
        String c10 = this.f63984d.c(x.f67385a);
        c7024c.getClass();
        g configuration = input.f63983a;
        kotlin.jvm.internal.l.h(configuration, "configuration");
        String publishableKey = c2748t.f36147a;
        kotlin.jvm.internal.l.h(publishableKey, "publishableKey");
        String str = configuration.f63989b;
        String str2 = configuration.f63990c;
        zh.i iVar = new zh.i(str, str2);
        String str3 = configuration.f63994g;
        if (str3 != null) {
            str2 = str3;
        }
        zh.f fVar = new zh.f(configuration.f63992e, str2);
        n2 n2Var = configuration.f63988a;
        if (n2Var instanceof C0766u0) {
            C0766u0 c0766u0 = (C0766u0) n2Var;
            String str4 = c0766u0.f11136k;
            if (str4 != null && (l = c0766u0.f11128c) != null) {
                lVar = new zh.l(str4, l.longValue());
            }
        } else if (!(n2Var instanceof C0761s1)) {
            throw new NoWhenBranchMatchedException();
        }
        zh.l lVar2 = lVar;
        String str5 = context.getApplicationInfo().packageName;
        kotlin.jvm.internal.l.g(str5, "context.applicationInfo.packageName");
        if (Build.VERSION.SDK_INT >= 24) {
            locales = context.getResources().getConfiguration().getLocales();
            locale = locales.get(0);
        } else {
            locale = context.getResources().getConfiguration().locale;
        }
        String country = locale.getCountry();
        kotlin.jvm.internal.l.g(country, "if (Build.VERSION.SDK_IN…ale\n            }.country");
        zh.m mVar = new zh.m(publishableKey, c2748t.f36148b, iVar, fVar, lVar2, str5, country, c10, configuration.f63996i ? "card_payment_method" : "link_payment_method");
        int i10 = LinkForegroundActivity.f43415I;
        String popupUrl = "https://checkout.link.com/#" + Base64.encodeToString(AbstractC2541s.Y(zh.m.f69193o.d(c7024c.serializer(), mVar)), 2);
        kotlin.jvm.internal.l.h(popupUrl, "popupUrl");
        Intent putExtra = new Intent(context, (Class<?>) LinkForegroundActivity.class).putExtra("LinkPopupUrl", popupUrl);
        kotlin.jvm.internal.l.g(putExtra, "Intent(context, LinkFore…XTRA_POPUP_URL, popupUrl)");
        return putExtra;
    }

    @Override
    public final Object parseResult(int i10, Intent intent) {
        Uri data;
        if (i10 == 0) {
            return new C6187c(1);
        }
        T0 t0 = null;
        t0 = null;
        if (i10 != 49871) {
            if (i10 != 91367) {
                return new C6187c(1);
            }
            Serializable serializableExtra = intent != null ? intent.getSerializableExtra("LinkFailure") : null;
            return serializableExtra != null ? new e((Exception) serializableExtra) : new C6187c(1);
        }
        if (intent == null || (data = intent.getData()) == null) {
            return new C6187c(1);
        }
        String queryParameter = data.getQueryParameter("link_status");
        if (queryParameter != null) {
            int hashCode = queryParameter.hashCode();
            if (hashCode != -1097329270) {
                if (hashCode == -599445191 && queryParameter.equals("complete")) {
                    String queryParameter2 = data.getQueryParameter("pm");
                    if (queryParameter2 != null) {
                        try {
                            byte[] decode = Base64.decode(queryParameter2, 0);
                            kotlin.jvm.internal.l.g(decode, "decode(this, 0)");
                            t0 = Hh.a.d(new JSONObject(new String(decode, AbstractC2523a.f34949a)));
                        } catch (Exception unused) {
                        }
                    }
                    return t0 == null ? new C6187c(1) : new C6188d(t0);
                }
            } else if (queryParameter.equals("logout")) {
                return new C6187c(2);
            }
        }
        return new C6187c(1);
    }
}