正在查看: Biko v2.0.23 应用的 DefaultIntentConfirmationInterceptor.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Biko v2.0.23 应用的 DefaultIntentConfirmationInterceptor.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.paymentsheet;
import android.content.Context;
import com.stripe.android.ConfirmStripeIntentParamsFactory;
import com.stripe.android.core.networking.ApiRequest;
import com.stripe.android.model.ConfirmPaymentIntentParams;
import com.stripe.android.model.PaymentMethod;
import com.stripe.android.model.PaymentMethodCreateParams;
import com.stripe.android.model.PaymentMethodOptionsParams;
import com.stripe.android.networking.StripeRepository;
import com.stripe.android.paymentsheet.IntentConfirmationInterceptor;
import com.stripe.android.paymentsheet.PaymentSheet;
import javax.inject.Inject;
import javax.inject.Named;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\u0080\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0000\u0018\u00002\u00020\u0001BC\b\u0007\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\b\b\u0001\u0010\u0006\u001a\u00020\u0007\u0012\u000e\b\u0001\u0010\b\u001a\b\u0012\u0004\u0012\u00020\n0\t\u0012\u0010\b\u0001\u0010\u000b\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\n0\t¢\u0006\u0002\u0010\fJ*\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\n2\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u0007H\u0002J.\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\n2\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\u0006\u0010\u001c\u001a\u00020\u001d2\n\b\u0002\u0010\u001e\u001a\u0004\u0018\u00010\u001fH\u0002J*\u0010 \u001a\b\u0012\u0004\u0012\u00020\u001a0!2\u0006\u0010\"\u001a\u00020\u001dH\u0082@ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002ø\u0001\u0002¢\u0006\u0004\b#\u0010$J3\u0010%\u001a\u00020&2\u0006\u0010'\u001a\u00020(2\u0006\u0010\u0019\u001a\u00020\u001a2\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\u0006\u0010)\u001a\u00020\u0007H\u0082@ø\u0001\u0002¢\u0006\u0002\u0010*J3\u0010%\u001a\u00020&2\u0006\u0010'\u001a\u00020(2\u0006\u0010\u001c\u001a\u00020\u001d2\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\u0006\u0010)\u001a\u00020\u0007H\u0082@ø\u0001\u0002¢\u0006\u0002\u0010+J;\u0010,\u001a\u00020&2\u0006\u0010-\u001a\u00020.2\u0006\u0010'\u001a\u00020(2\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010/\u001a\u00020\u00072\b\u0010\u0017\u001a\u0004\u0018\u00010\u0018H\u0082@ø\u0001\u0002¢\u0006\u0002\u00100J3\u00101\u001a\u00020&2\u0006\u0010\u0016\u001a\u00020\n2\u0006\u0010'\u001a\u00020(2\u0006\u0010\u0019\u001a\u00020\u001a2\b\u0010\u0017\u001a\u0004\u0018\u00010\u0018H\u0082@ø\u0001\u0002¢\u0006\u0002\u00102J3\u00103\u001a\u00020&2\u0006\u00104\u001a\u0002052\u0006\u0010\u0019\u001a\u00020\u001a2\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\u0006\u0010)\u001a\u00020\u0007H\u0096@ø\u0001\u0002¢\u0006\u0002\u00106J=\u00103\u001a\u00020&2\u0006\u00104\u001a\u0002052\u0006\u0010\u001c\u001a\u00020\u001d2\b\u0010\u001e\u001a\u0004\u0018\u00010\u001f2\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\u0006\u0010)\u001a\u00020\u0007H\u0096@ø\u0001\u0002¢\u0006\u0002\u00107J*\u00108\u001a\b\u0012\u0004\u0012\u0002090!2\u0006\u0010\u0016\u001a\u00020\nH\u0082@ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002ø\u0001\u0002¢\u0006\u0004\b:\u0010;R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\r\u001a\u00020\n8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u000e\u0010\u000fR\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\b\u001a\b\u0012\u0004\u0012\u00020\n0\tX\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0010\u001a\u00020\u00118BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u0012\u0010\u0013R\u0016\u0010\u000b\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\n0\tX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000f\n\u0002\b!\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006<"}, d2 = {"Lcom/stripe/android/paymentsheet/DefaultIntentConfirmationInterceptor;", "Lcom/stripe/android/paymentsheet/IntentConfirmationInterceptor;", "context", "Landroid/content/Context;", "stripeRepository", "Lcom/stripe/android/networking/StripeRepository;", "isFlowController", "", "publishableKeyProvider", "Lkotlin/Function0;", "", "stripeAccountIdProvider", "(Landroid/content/Context;Lcom/stripe/android/networking/StripeRepository;ZLkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;)V", "genericErrorMessage", "getGenericErrorMessage", "()Ljava/lang/String;", "requestOptions", "Lcom/stripe/android/core/networking/ApiRequest$Options;", "getRequestOptions", "()Lcom/stripe/android/core/networking/ApiRequest$Options;", "createConfirmStep", "Lcom/stripe/android/paymentsheet/IntentConfirmationInterceptor$NextStep$Confirm;", "clientSecret", "shippingValues", "Lcom/stripe/android/model/ConfirmPaymentIntentParams$Shipping;", "paymentMethod", "Lcom/stripe/android/model/PaymentMethod;", "isDeferred", "paymentMethodCreateParams", "Lcom/stripe/android/model/PaymentMethodCreateParams;", "paymentMethodOptionsParams", "Lcom/stripe/android/model/PaymentMethodOptionsParams;", "createPaymentMethod", "Lkotlin/Result;", "params", "createPaymentMethod-gIAlu-s", "(Lcom/stripe/android/model/PaymentMethodCreateParams;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "handleDeferredIntent", "Lcom/stripe/android/paymentsheet/IntentConfirmationInterceptor$NextStep;", "intentConfiguration", "Lcom/stripe/android/paymentsheet/PaymentSheet$IntentConfiguration;", "customerRequestedSave", "(Lcom/stripe/android/paymentsheet/PaymentSheet$IntentConfiguration;Lcom/stripe/android/model/PaymentMethod;Lcom/stripe/android/model/ConfirmPaymentIntentParams$Shipping;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "(Lcom/stripe/android/paymentsheet/PaymentSheet$IntentConfiguration;Lcom/stripe/android/model/PaymentMethodCreateParams;Lcom/stripe/android/model/ConfirmPaymentIntentParams$Shipping;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "handleDeferredIntentCreationFromPaymentMethod", "createIntentCallback", "Lcom/stripe/android/paymentsheet/CreateIntentCallback;", "shouldSavePaymentMethod", "(Lcom/stripe/android/paymentsheet/CreateIntentCallback;Lcom/stripe/android/paymentsheet/PaymentSheet$IntentConfiguration;Lcom/stripe/android/model/PaymentMethod;ZLcom/stripe/android/model/ConfirmPaymentIntentParams$Shipping;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "handleDeferredIntentCreationSuccess", "(Ljava/lang/String;Lcom/stripe/android/paymentsheet/PaymentSheet$IntentConfiguration;Lcom/stripe/android/model/PaymentMethod;Lcom/stripe/android/model/ConfirmPaymentIntentParams$Shipping;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "intercept", "initializationMode", "Lcom/stripe/android/paymentsheet/PaymentSheet$InitializationMode;", "(Lcom/stripe/android/paymentsheet/PaymentSheet$InitializationMode;Lcom/stripe/android/model/PaymentMethod;Lcom/stripe/android/model/ConfirmPaymentIntentParams$Shipping;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "(Lcom/stripe/android/paymentsheet/PaymentSheet$InitializationMode;Lcom/stripe/android/model/PaymentMethodCreateParams;Lcom/stripe/android/model/PaymentMethodOptionsParams;Lcom/stripe/android/model/ConfirmPaymentIntentParams$Shipping;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "retrieveStripeIntent", "Lcom/stripe/android/model/StripeIntent;", "retrieveStripeIntent-gIAlu-s", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "paymentsheet_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class DefaultIntentConfirmationInterceptor implements IntentConfirmationInterceptor {
private final Context context;
private final boolean isFlowController;
private final Function0<String> publishableKeyProvider;
private final Function0<String> stripeAccountIdProvider;
private final StripeRepository stripeRepository;
@Inject
public DefaultIntentConfirmationInterceptor(Context context, StripeRepository stripeRepository, @Named("IS_FLOW_CONTROLLER") boolean z, @Named("publishableKey") Function0<String> function0, @Named("stripeAccountId") Function0<String> function02) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(stripeRepository, "stripeRepository");
Intrinsics.checkNotNullParameter(function0, "publishableKeyProvider");
Intrinsics.checkNotNullParameter(function02, "stripeAccountIdProvider");
this.context = context;
this.stripeRepository = stripeRepository;
this.isFlowController = z;
this.publishableKeyProvider = function0;
this.stripeAccountIdProvider = function02;
}
private final String getGenericErrorMessage() {
String string = this.context.getString(R.string.stripe_something_went_wrong);
Intrinsics.checkNotNullExpressionValue(string, "context.getString(R.stri…ipe_something_went_wrong)");
return string;
}
private final ApiRequest.Options getRequestOptions() {
return new ApiRequest.Options((String) this.publishableKeyProvider.invoke(), (String) this.stripeAccountIdProvider.invoke(), (String) null, 4, (DefaultConstructorMarker) null);
}
@Override
public Object intercept(PaymentSheet.InitializationMode initializationMode, PaymentMethodCreateParams paymentMethodCreateParams, PaymentMethodOptionsParams paymentMethodOptionsParams, ConfirmPaymentIntentParams.Shipping shipping, boolean z, Continuation<? super IntentConfirmationInterceptor.NextStep> continuation) {
if (initializationMode instanceof PaymentSheet.InitializationMode.DeferredIntent) {
return handleDeferredIntent(((PaymentSheet.InitializationMode.DeferredIntent) initializationMode).getIntentConfiguration(), paymentMethodCreateParams, shipping, z, continuation);
}
if (initializationMode instanceof PaymentSheet.InitializationMode.PaymentIntent) {
return createConfirmStep(((PaymentSheet.InitializationMode.PaymentIntent) initializationMode).getClientSecret(), shipping, paymentMethodCreateParams, paymentMethodOptionsParams);
}
if (initializationMode instanceof PaymentSheet.InitializationMode.SetupIntent) {
return createConfirmStep$default(this, ((PaymentSheet.InitializationMode.SetupIntent) initializationMode).getClientSecret(), shipping, paymentMethodCreateParams, null, 8, null);
}
throw new NoWhenBranchMatchedException();
}
@Override
public Object intercept(PaymentSheet.InitializationMode initializationMode, PaymentMethod paymentMethod, ConfirmPaymentIntentParams.Shipping shipping, boolean z, Continuation<? super IntentConfirmationInterceptor.NextStep> continuation) {
if (initializationMode instanceof PaymentSheet.InitializationMode.DeferredIntent) {
return handleDeferredIntent(((PaymentSheet.InitializationMode.DeferredIntent) initializationMode).getIntentConfiguration(), paymentMethod, shipping, z, continuation);
}
if (initializationMode instanceof PaymentSheet.InitializationMode.PaymentIntent) {
return createConfirmStep(((PaymentSheet.InitializationMode.PaymentIntent) initializationMode).getClientSecret(), shipping, paymentMethod, false);
}
if (initializationMode instanceof PaymentSheet.InitializationMode.SetupIntent) {
return createConfirmStep(((PaymentSheet.InitializationMode.SetupIntent) initializationMode).getClientSecret(), shipping, paymentMethod, false);
}
throw new NoWhenBranchMatchedException();
}
public final java.lang.Object handleDeferredIntent(com.stripe.android.paymentsheet.PaymentSheet.IntentConfiguration r32, com.stripe.android.model.PaymentMethodCreateParams r33, com.stripe.android.model.ConfirmPaymentIntentParams.Shipping r34, boolean r35, kotlin.coroutines.Continuation<? super com.stripe.android.paymentsheet.IntentConfirmationInterceptor.NextStep> r36) {
throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.paymentsheet.DefaultIntentConfirmationInterceptor.handleDeferredIntent(com.stripe.android.paymentsheet.PaymentSheet$IntentConfiguration, com.stripe.android.model.PaymentMethodCreateParams, com.stripe.android.model.ConfirmPaymentIntentParams$Shipping, boolean, kotlin.coroutines.Continuation):java.lang.Object");
}
public final Object handleDeferredIntent(PaymentSheet.IntentConfiguration intentConfiguration, PaymentMethod paymentMethod, ConfirmPaymentIntentParams.Shipping shipping, boolean z, Continuation<? super IntentConfirmationInterceptor.NextStep> continuation) {
CreateIntentCallback createIntentCallback = IntentConfirmationInterceptor.INSTANCE.getCreateIntentCallback();
if (createIntentCallback != null) {
return handleDeferredIntentCreationFromPaymentMethod(createIntentCallback, intentConfiguration, paymentMethod, z, shipping, continuation);
}
throw new IllegalStateException(("CreateIntentCallback must be implemented when using IntentConfiguration with PaymentSheet").toString());
}
public final java.lang.Object m269createPaymentMethodgIAlus(com.stripe.android.model.PaymentMethodCreateParams r5, kotlin.coroutines.Continuation<? super kotlin.Result<com.stripe.android.model.PaymentMethod>> r6) {
throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.paymentsheet.DefaultIntentConfirmationInterceptor.m269createPaymentMethodgIAlus(com.stripe.android.model.PaymentMethodCreateParams, kotlin.coroutines.Continuation):java.lang.Object");
}
public final java.lang.Object handleDeferredIntentCreationFromPaymentMethod(com.stripe.android.paymentsheet.CreateIntentCallback r6, com.stripe.android.paymentsheet.PaymentSheet.IntentConfiguration r7, com.stripe.android.model.PaymentMethod r8, boolean r9, com.stripe.android.model.ConfirmPaymentIntentParams.Shipping r10, kotlin.coroutines.Continuation<? super com.stripe.android.paymentsheet.IntentConfirmationInterceptor.NextStep> r11) {
throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.paymentsheet.DefaultIntentConfirmationInterceptor.handleDeferredIntentCreationFromPaymentMethod(com.stripe.android.paymentsheet.CreateIntentCallback, com.stripe.android.paymentsheet.PaymentSheet$IntentConfiguration, com.stripe.android.model.PaymentMethod, boolean, com.stripe.android.model.ConfirmPaymentIntentParams$Shipping, kotlin.coroutines.Continuation):java.lang.Object");
}
public final java.lang.Object handleDeferredIntentCreationSuccess(java.lang.String r5, com.stripe.android.paymentsheet.PaymentSheet.IntentConfiguration r6, com.stripe.android.model.PaymentMethod r7, com.stripe.android.model.ConfirmPaymentIntentParams.Shipping r8, kotlin.coroutines.Continuation<? super com.stripe.android.paymentsheet.IntentConfirmationInterceptor.NextStep> r9) {
throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.paymentsheet.DefaultIntentConfirmationInterceptor.handleDeferredIntentCreationSuccess(java.lang.String, com.stripe.android.paymentsheet.PaymentSheet$IntentConfiguration, com.stripe.android.model.PaymentMethod, com.stripe.android.model.ConfirmPaymentIntentParams$Shipping, kotlin.coroutines.Continuation):java.lang.Object");
}
public final java.lang.Object m270retrieveStripeIntentgIAlus(java.lang.String r9, kotlin.coroutines.Continuation<? super kotlin.Result<? extends com.stripe.android.model.StripeIntent>> r10) {
throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.paymentsheet.DefaultIntentConfirmationInterceptor.m270retrieveStripeIntentgIAlus(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
}
private final IntentConfirmationInterceptor.NextStep.Confirm createConfirmStep(String clientSecret, ConfirmPaymentIntentParams.Shipping shippingValues, PaymentMethod paymentMethod, boolean isDeferred) {
return new IntentConfirmationInterceptor.NextStep.Confirm(ConfirmStripeIntentParamsFactory.Companion.createFactory(clientSecret, shippingValues).create(paymentMethod), isDeferred);
}
static IntentConfirmationInterceptor.NextStep.Confirm createConfirmStep$default(DefaultIntentConfirmationInterceptor defaultIntentConfirmationInterceptor, String str, ConfirmPaymentIntentParams.Shipping shipping, PaymentMethodCreateParams paymentMethodCreateParams, PaymentMethodOptionsParams paymentMethodOptionsParams, int i2, Object obj) {
if ((i2 & 8) != 0) {
paymentMethodOptionsParams = null;
}
return defaultIntentConfirmationInterceptor.createConfirmStep(str, shipping, paymentMethodCreateParams, paymentMethodOptionsParams);
}
private final IntentConfirmationInterceptor.NextStep.Confirm createConfirmStep(String clientSecret, ConfirmPaymentIntentParams.Shipping shippingValues, PaymentMethodCreateParams paymentMethodCreateParams, PaymentMethodOptionsParams paymentMethodOptionsParams) {
return new IntentConfirmationInterceptor.NextStep.Confirm(ConfirmStripeIntentParamsFactory.Companion.createFactory(clientSecret, shippingValues).create(paymentMethodCreateParams, paymentMethodOptionsParams), false);
}
}