导航菜单

页面标题

页面副标题

Rilo v2.0.21 - PaymentSheetViewModel$confirmPaymentSelection$1.java 源代码

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

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


package com.stripe.android.paymentsheet;

import com.stripe.android.model.ConfirmPaymentIntentParams;
import com.stripe.android.model.StripeIntent;
import com.stripe.android.payments.paymentlauncher.PaymentResult;
import com.stripe.android.paymentsheet.IntentConfirmationInterceptor;
import com.stripe.android.paymentsheet.PaymentSheet;
import com.stripe.android.paymentsheet.addresselement.AddressDetails;
import com.stripe.android.paymentsheet.addresselement.AddressDetailsKt;
import com.stripe.android.paymentsheet.model.PaymentSelection;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
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.paymentsheet.PaymentSheetViewModel$confirmPaymentSelection$1", f = "PaymentSheetViewModel.kt", i = {0}, l = {578}, m = "invokeSuspend", n = {"stripeIntent"}, s = {"L$0"})
final class PaymentSheetViewModel$confirmPaymentSelection$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
    final PaymentSelection $paymentSelection;
    Object L$0;
    int label;
    final PaymentSheetViewModel this$0;

    PaymentSheetViewModel$confirmPaymentSelection$1(PaymentSheetViewModel paymentSheetViewModel, PaymentSelection paymentSelection, Continuation<? super PaymentSheetViewModel$confirmPaymentSelection$1> continuation) {
        super(2, continuation);
        this.this$0 = paymentSheetViewModel;
        this.$paymentSelection = paymentSelection;
    }

    public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
        return new PaymentSheetViewModel$confirmPaymentSelection$1(this.this$0, this.$paymentSelection, continuation);
    }

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

    public final Object invokeSuspend(Object obj) {
        IntentConfirmationInterceptor intentConfirmationInterceptor;
        StripeIntent stripeIntent;
        Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
        int i2 = this.label;
        if (i2 == 0) {
            ResultKt.throwOnFailure(obj);
            Object value = this.this$0.getStripeIntent$paymentsheet_release().getValue();
            if (value != null) {
                StripeIntent stripeIntent2 = (StripeIntent) value;
                intentConfirmationInterceptor = this.this$0.intentConfirmationInterceptor;
                PaymentSheet.InitializationMode initializationMode$paymentsheet_release = this.this$0.getArgs().getInitializationMode$paymentsheet_release();
                PaymentSelection paymentSelection = this.$paymentSelection;
                AddressDetails shippingDetails = this.this$0.getArgs().getConfig$paymentsheet_release().getShippingDetails();
                ConfirmPaymentIntentParams.Shipping confirmPaymentIntentShipping = shippingDetails != null ? AddressDetailsKt.toConfirmPaymentIntentShipping(shippingDetails) : null;
                this.L$0 = stripeIntent2;
                this.label = 1;
                Object intercept = IntentConfirmationInterceptorKtxKt.intercept(intentConfirmationInterceptor, initializationMode$paymentsheet_release, paymentSelection, confirmPaymentIntentShipping, (Continuation) this);
                if (intercept == coroutine_suspended) {
                    return coroutine_suspended;
                }
                stripeIntent = stripeIntent2;
                obj = intercept;
            } else {
                throw new IllegalArgumentException("Required value was null.".toString());
            }
        } else {
            if (i2 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            stripeIntent = (StripeIntent) this.L$0;
            ResultKt.throwOnFailure(obj);
        }
        IntentConfirmationInterceptor.NextStep nextStep = (IntentConfirmationInterceptor.NextStep) obj;
        this.this$0.deferredIntentConfirmationType = nextStep.getDeferredIntentConfirmationType();
        if (nextStep instanceof IntentConfirmationInterceptor.NextStep.HandleNextAction) {
            this.this$0.handleNextAction(((IntentConfirmationInterceptor.NextStep.HandleNextAction) nextStep).getClientSecret(), stripeIntent);
        } else if (nextStep instanceof IntentConfirmationInterceptor.NextStep.Confirm) {
            this.this$0.confirmStripeIntent(((IntentConfirmationInterceptor.NextStep.Confirm) nextStep).getConfirmParams());
        } else if (nextStep instanceof IntentConfirmationInterceptor.NextStep.Fail) {
            this.this$0.onError(((IntentConfirmationInterceptor.NextStep.Fail) nextStep).getMessage());
        } else if (nextStep instanceof IntentConfirmationInterceptor.NextStep.Complete) {
            this.this$0.processPayment(stripeIntent, PaymentResult.Completed.INSTANCE);
        }
        return Unit.INSTANCE;
    }
}