导航菜单

页面标题

页面副标题

Rilo v2.0.21 - PaymentLauncherViewModel$confirmStripeIntent$1.java 源代码

正在查看: Rilo v2.0.21 应用的 PaymentLauncherViewModel$confirmStripeIntent$1.java JAVA 源代码文件

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


package com.stripe.android.payments.paymentlauncher;

import androidx.lifecycle.SavedStateHandle;
import com.stripe.android.core.networking.ApiRequest;
import com.stripe.android.model.ConfirmStripeIntentParams;
import com.stripe.android.model.StripeIntent;
import com.stripe.android.payments.DefaultReturnUrl;
import com.stripe.android.payments.core.authentication.PaymentAuthenticator;
import com.stripe.android.payments.core.authentication.PaymentAuthenticatorRegistry;
import com.stripe.android.view.AuthActivityStarterHost;
import java.util.Map;
import javax.inject.Provider;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.CoroutineScope;

@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "com.stripe.android.payments.paymentlauncher.PaymentLauncherViewModel$confirmStripeIntent$1", f = "PaymentLauncherViewModel.kt", i = {0}, l = {117, 127, 131, 139}, m = "invokeSuspend", n = {"returnUrl"}, s = {"L$0"})
final class PaymentLauncherViewModel$confirmStripeIntent$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
    final ConfirmStripeIntentParams $confirmStripeIntentParams;
    final AuthActivityStarterHost $host;
    Object L$0;
    int label;
    final PaymentLauncherViewModel this$0;

    PaymentLauncherViewModel$confirmStripeIntent$1(PaymentLauncherViewModel paymentLauncherViewModel, ConfirmStripeIntentParams confirmStripeIntentParams, AuthActivityStarterHost authActivityStarterHost, Continuation<? super PaymentLauncherViewModel$confirmStripeIntent$1> continuation) {
        super(2, continuation);
        this.this$0 = paymentLauncherViewModel;
        this.$confirmStripeIntentParams = confirmStripeIntentParams;
        this.$host = authActivityStarterHost;
    }

    public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
        return new PaymentLauncherViewModel$confirmStripeIntent$1(this.this$0, this.$confirmStripeIntentParams, this.$host, continuation);
    }

    public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
        return create(coroutineScope, continuation).invokeSuspend(Unit.INSTANCE);
    }

    public final Object invokeSuspend(Object obj) {
        SavedStateHandle savedStateHandle;
        boolean z;
        String returnUrl;
        DefaultReturnUrl defaultReturnUrl;
        String str;
        Object m258confirmIntent0E7RQCE;
        CoroutineContext coroutineContext;
        PaymentAuthenticatorRegistry paymentAuthenticatorRegistry;
        Provider provider;
        CoroutineContext coroutineContext2;
        String id;
        Map map;
        Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
        int i2 = this.label;
        if (i2 == 0) {
            ResultKt.throwOnFailure(obj);
            savedStateHandle = this.this$0.savedStateHandle;
            savedStateHandle.set(PaymentLauncherViewModel.KEY_HAS_STARTED, Boxing.boxBoolean(true));
            this.this$0.logReturnUrl(this.$confirmStripeIntentParams.getReturnUrl());
            z = this.this$0.isInstantApp;
            if (z) {
                returnUrl = this.$confirmStripeIntentParams.getReturnUrl();
            } else {
                returnUrl = this.$confirmStripeIntentParams.getReturnUrl();
                String str2 = returnUrl;
                if (str2 == null || StringsKt.isBlank(str2)) {
                    returnUrl = null;
                }
                if (returnUrl == null) {
                    defaultReturnUrl = this.this$0.defaultReturnUrl;
                    returnUrl = defaultReturnUrl.getValue();
                }
            }
            str = returnUrl;
            this.L$0 = str;
            this.label = 1;
            m258confirmIntent0E7RQCE = this.this$0.m258confirmIntent0E7RQCE(this.$confirmStripeIntentParams, str, (Continuation) this);
            if (m258confirmIntent0E7RQCE == coroutine_suspended) {
                return coroutine_suspended;
            }
        } else {
            if (i2 != 1) {
                if (i2 != 2 && i2 != 3 && i2 != 4) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                ResultKt.throwOnFailure(obj);
                return Unit.INSTANCE;
            }
            str = (String) this.L$0;
            ResultKt.throwOnFailure(obj);
            m258confirmIntent0E7RQCE = ((Result) obj).getValue();
        }
        PaymentLauncherViewModel paymentLauncherViewModel = this.this$0;
        AuthActivityStarterHost authActivityStarterHost = this.$host;
        Throwable m1550exceptionOrNullimpl = Result.m1550exceptionOrNullimpl(m258confirmIntent0E7RQCE);
        if (m1550exceptionOrNullimpl != null) {
            coroutineContext = paymentLauncherViewModel.uiContext;
            PaymentLauncherViewModel$confirmStripeIntent$1$2$1 paymentLauncherViewModel$confirmStripeIntent$1$2$1 = new PaymentLauncherViewModel$confirmStripeIntent$1$2$1(paymentLauncherViewModel, m1550exceptionOrNullimpl, null);
            this.L$0 = null;
            this.label = 4;
            if (BuildersKt.withContext(coroutineContext, paymentLauncherViewModel$confirmStripeIntent$1$2$1, this) == coroutine_suspended) {
                return coroutine_suspended;
            }
        } else {
            StripeIntent stripeIntent = (StripeIntent) m258confirmIntent0E7RQCE;
            StripeIntent.NextActionData nextActionData = stripeIntent.getNextActionData();
            if (nextActionData != null && (nextActionData instanceof StripeIntent.NextActionData.SdkData.Use3DS1) && (id = stripeIntent.getId()) != null) {
                map = paymentLauncherViewModel.threeDs1IntentReturnUrlMap;
                if (str == null) {
                    str = "";
                }
                map.put(id, str);
            }
            if (!stripeIntent.requiresAction()) {
                coroutineContext2 = paymentLauncherViewModel.uiContext;
                PaymentLauncherViewModel$confirmStripeIntent$1$1$2 paymentLauncherViewModel$confirmStripeIntent$1$1$2 = new PaymentLauncherViewModel$confirmStripeIntent$1$1$2(paymentLauncherViewModel, stripeIntent, null);
                this.L$0 = null;
                this.label = 2;
                if (BuildersKt.withContext(coroutineContext2, paymentLauncherViewModel$confirmStripeIntent$1$1$2, this) == coroutine_suspended) {
                    return coroutine_suspended;
                }
            } else {
                paymentAuthenticatorRegistry = paymentLauncherViewModel.authenticatorRegistry;
                PaymentAuthenticator authenticator = paymentAuthenticatorRegistry.getAuthenticator(stripeIntent);
                provider = paymentLauncherViewModel.apiRequestOptionsProvider;
                Object obj2 = provider.get();
                Intrinsics.checkNotNullExpressionValue(obj2, "apiRequestOptionsProvider.get()");
                this.L$0 = null;
                this.label = 3;
                if (authenticator.authenticate(authActivityStarterHost, stripeIntent, (ApiRequest.Options) obj2, this) == coroutine_suspended) {
                    return coroutine_suspended;
                }
            }
        }
        return Unit.INSTANCE;
    }
}