正在查看: Biko v2.0.23 应用的 DefaultFlowController$confirmPaymentSelection$1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Biko v2.0.23 应用的 DefaultFlowController$confirmPaymentSelection$1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.paymentsheet.flowcontroller;
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.IntentConfirmationInterceptorKtxKt;
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 com.stripe.android.paymentsheet.state.PaymentSheetState;
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 kotlin.jvm.internal.Intrinsics;
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.flowcontroller.DefaultFlowController$confirmPaymentSelection$1", f = "DefaultFlowController.kt", i = {0}, l = {348}, m = "invokeSuspend", n = {"stripeIntent"}, s = {"L$0"})
final class DefaultFlowController$confirmPaymentSelection$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final PaymentSelection $paymentSelection;
final PaymentSheetState.Full $state;
Object L$0;
int label;
final DefaultFlowController this$0;
DefaultFlowController$confirmPaymentSelection$1(PaymentSheetState.Full full, DefaultFlowController defaultFlowController, PaymentSelection paymentSelection, Continuation<? super DefaultFlowController$confirmPaymentSelection$1> continuation) {
super(2, continuation);
this.$state = full;
this.this$0 = defaultFlowController;
this.$paymentSelection = paymentSelection;
}
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new DefaultFlowController$confirmPaymentSelection$1(this.$state, 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;
PaymentSheet.InitializationMode initializationMode;
StripeIntent stripeIntent;
FlowControllerViewModel flowControllerViewModel;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i2 = this.label;
if (i2 == 0) {
ResultKt.throwOnFailure(obj);
StripeIntent stripeIntent2 = this.$state.getStripeIntent();
if (stripeIntent2 != null) {
intentConfirmationInterceptor = this.this$0.intentConfirmationInterceptor;
initializationMode = this.this$0.getInitializationMode();
Intrinsics.checkNotNull(initializationMode);
PaymentSelection paymentSelection = this.$paymentSelection;
AddressDetails shippingDetails = this.$state.getConfig().getShippingDetails();
ConfirmPaymentIntentParams.Shipping confirmPaymentIntentShipping = shippingDetails != null ? AddressDetailsKt.toConfirmPaymentIntentShipping(shippingDetails) : null;
this.L$0 = stripeIntent2;
this.label = 1;
Object intercept = IntentConfirmationInterceptorKtxKt.intercept(intentConfirmationInterceptor, initializationMode, 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;
flowControllerViewModel = this.this$0.viewModel;
flowControllerViewModel.setDeferredIntentConfirmationType(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.onPaymentResult$paymentsheet_release(new PaymentResult.Failed(((IntentConfirmationInterceptor.NextStep.Fail) nextStep).getCause()));
} else if (nextStep instanceof IntentConfirmationInterceptor.NextStep.Complete) {
this.this$0.onPaymentResult$paymentsheet_release(PaymentResult.Completed.INSTANCE);
}
return Unit.INSTANCE;
}
}