正在查看: Crafto v9.3.3 应用的 PaymentSheetContract.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 PaymentSheetContract.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.paymentsheet;
import P2.L;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.view.Window;
import c0.u0;
import com.stripe.android.core.injection.InjectorKey;
import com.stripe.android.core.injection.InjectorKt;
import com.stripe.android.paymentsheet.PaymentSheet;
import com.stripe.android.paymentsheet.PaymentSheetResult;
import com.stripe.android.paymentsheet.model.ClientSecret;
import com.stripe.android.paymentsheet.model.PaymentIntentClientSecret;
import com.stripe.android.paymentsheet.model.SetupIntentClientSecret;
import com.stripe.android.view.ActivityStarter;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
@Metadata
public final class PaymentSheetContract extends j.a<Args, PaymentSheetResult> {
public static final int $stable = 0;
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
public static final String EXTRA_ARGS = "com.stripe.android.paymentsheet.PaymentSheetContract.extra_args";
@NotNull
private static final String EXTRA_RESULT = "com.stripe.android.paymentsheet.PaymentSheetContract.extra_result";
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public static void getEXTRA_ARGS$annotations() {
}
}
@Metadata
public static final class Result implements ActivityStarter.Result {
@NotNull
public static final Parcelable.Creator<Result> CREATOR = new Creator();
@NotNull
private final PaymentSheetResult paymentSheetResult;
@Metadata
public static final class Creator implements Parcelable.Creator<Result> {
@Override
@NotNull
public final Result createFromParcel(@NotNull Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
return new Result((PaymentSheetResult) parcel.readParcelable(Result.class.getClassLoader()));
}
@Override
@NotNull
public final Result[] newArray(int i) {
return new Result[i];
}
}
public Result(@NotNull PaymentSheetResult paymentSheetResult) {
Intrinsics.checkNotNullParameter(paymentSheetResult, "paymentSheetResult");
this.paymentSheetResult = paymentSheetResult;
}
public static Result copy$default(Result result, PaymentSheetResult paymentSheetResult, int i, Object obj) {
if ((i & 1) != 0) {
paymentSheetResult = result.paymentSheetResult;
}
return result.copy(paymentSheetResult);
}
@NotNull
public final PaymentSheetResult component1() {
return this.paymentSheetResult;
}
@NotNull
public final Result copy(@NotNull PaymentSheetResult paymentSheetResult) {
Intrinsics.checkNotNullParameter(paymentSheetResult, "paymentSheetResult");
return new Result(paymentSheetResult);
}
public int describeContents() {
return 0;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof Result) && Intrinsics.areEqual(this.paymentSheetResult, ((Result) obj).paymentSheetResult);
}
@NotNull
public final PaymentSheetResult getPaymentSheetResult() {
return this.paymentSheetResult;
}
public int hashCode() {
return this.paymentSheetResult.hashCode();
}
@NotNull
public Bundle toBundle() {
return Q1.c.a(new Pair[]{new Pair(PaymentSheetContract.EXTRA_RESULT, this)});
}
@NotNull
public String toString() {
return "Result(paymentSheetResult=" + this.paymentSheetResult + ')';
}
public void writeToParcel(@NotNull Parcel parcel, int i) {
Intrinsics.checkNotNullParameter(parcel, "out");
parcel.writeParcelable(this.paymentSheetResult, i);
}
}
@NotNull
public Intent createIntent(@NotNull Context context, @NotNull Args args) {
Window window;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(args, "input");
Integer num = null;
Activity activity = context instanceof Activity ? (Activity) context : null;
if (activity != null && (window = activity.getWindow()) != null) {
num = Integer.valueOf(window.getStatusBarColor());
}
Intent putExtra = new Intent(context, (Class<?>) PaymentSheetActivity.class).putExtra(EXTRA_ARGS, (Parcelable) Args.copy$default(args, null, null, num, null, 11, null));
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(context, PaymentS…rColor = statusBarColor))");
return putExtra;
}
@NotNull
public PaymentSheetResult m649parseResult(int i, Intent intent) {
Result result;
PaymentSheetResult paymentSheetResult = (intent == null || (result = (Result) intent.getParcelableExtra(EXTRA_RESULT)) == null) ? null : result.getPaymentSheetResult();
return paymentSheetResult == null ? new PaymentSheetResult.Failed(new IllegalArgumentException("Failed to retrieve a PaymentSheetResult.")) : paymentSheetResult;
}
@Metadata
public static final class Args implements ActivityStarter.Args {
@NotNull
private final ClientSecret clientSecret;
private final PaymentSheet.Configuration config;
@NotNull
private final String injectorKey;
private final Integer statusBarColor;
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
public static final Parcelable.Creator<Args> CREATOR = new Creator();
public static final int $stable = 8;
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static Args createPaymentIntentArgs$default(Companion companion, String str, PaymentSheet.Configuration configuration, int i, Object obj) {
if ((i & 2) != 0) {
configuration = null;
}
return companion.createPaymentIntentArgs(str, configuration);
}
public static Args createPaymentIntentArgsWithInjectorKey$paymentsheet_release$default(Companion companion, String str, PaymentSheet.Configuration configuration, String str2, int i, Object obj) {
if ((i & 2) != 0) {
configuration = null;
}
return companion.createPaymentIntentArgsWithInjectorKey$paymentsheet_release(str, configuration, str2);
}
public static Args createSetupIntentArgs$default(Companion companion, String str, PaymentSheet.Configuration configuration, int i, Object obj) {
if ((i & 2) != 0) {
configuration = null;
}
return companion.createSetupIntentArgs(str, configuration);
}
public static Args createSetupIntentArgsWithInjectorKey$paymentsheet_release$default(Companion companion, String str, PaymentSheet.Configuration configuration, String str2, int i, Object obj) {
if ((i & 2) != 0) {
configuration = null;
}
return companion.createSetupIntentArgsWithInjectorKey$paymentsheet_release(str, configuration, str2);
}
@NotNull
public final Args createPaymentIntentArgs(@NotNull String str, PaymentSheet.Configuration configuration) {
Intrinsics.checkNotNullParameter(str, "clientSecret");
return new Args(new PaymentIntentClientSecret(str), configuration, null, null, 12, null);
}
@NotNull
public final Args createPaymentIntentArgsWithInjectorKey$paymentsheet_release(@NotNull String str, PaymentSheet.Configuration configuration, @InjectorKey @NotNull String str2) {
Intrinsics.checkNotNullParameter(str, "clientSecret");
Intrinsics.checkNotNullParameter(str2, "injectorKey");
return new Args(new PaymentIntentClientSecret(str), configuration, null, str2, 4, null);
}
@NotNull
public final Args createSetupIntentArgs(@NotNull String str, PaymentSheet.Configuration configuration) {
Intrinsics.checkNotNullParameter(str, "clientSecret");
return new Args(new SetupIntentClientSecret(str), configuration, null, null, 12, null);
}
@NotNull
public final Args createSetupIntentArgsWithInjectorKey$paymentsheet_release(@NotNull String str, PaymentSheet.Configuration configuration, @InjectorKey @NotNull String str2) {
Intrinsics.checkNotNullParameter(str, "clientSecret");
Intrinsics.checkNotNullParameter(str2, "injectorKey");
return new Args(new SetupIntentClientSecret(str), configuration, null, str2, 4, null);
}
public final Args fromIntent$paymentsheet_release(@NotNull Intent intent) {
Intrinsics.checkNotNullParameter(intent, "intent");
return (Args) intent.getParcelableExtra(PaymentSheetContract.EXTRA_ARGS);
}
private Companion() {
}
}
@Metadata
public static final class Creator implements Parcelable.Creator<Args> {
@Override
@NotNull
public final Args createFromParcel(@NotNull Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
return new Args((ClientSecret) parcel.readParcelable(Args.class.getClassLoader()), parcel.readInt() == 0 ? null : PaymentSheet.Configuration.CREATOR.createFromParcel(parcel), parcel.readInt() != 0 ? Integer.valueOf(parcel.readInt()) : null, parcel.readString());
}
@Override
@NotNull
public final Args[] newArray(int i) {
return new Args[i];
}
}
public Args(@NotNull ClientSecret clientSecret, PaymentSheet.Configuration configuration, Integer num, @InjectorKey @NotNull String str) {
Intrinsics.checkNotNullParameter(clientSecret, "clientSecret");
Intrinsics.checkNotNullParameter(str, "injectorKey");
this.clientSecret = clientSecret;
this.config = configuration;
this.statusBarColor = num;
this.injectorKey = str;
}
public static Args copy$default(Args args, ClientSecret clientSecret, PaymentSheet.Configuration configuration, Integer num, String str, int i, Object obj) {
if ((i & 1) != 0) {
clientSecret = args.clientSecret;
}
if ((i & 2) != 0) {
configuration = args.config;
}
if ((i & 4) != 0) {
num = args.statusBarColor;
}
if ((i & 8) != 0) {
str = args.injectorKey;
}
return args.copy(clientSecret, configuration, num, str);
}
@NotNull
public final ClientSecret component1$paymentsheet_release() {
return this.clientSecret;
}
public final PaymentSheet.Configuration component2$paymentsheet_release() {
return this.config;
}
public final Integer component3$paymentsheet_release() {
return this.statusBarColor;
}
@NotNull
public final String component4$paymentsheet_release() {
return this.injectorKey;
}
@NotNull
public final Args copy(@NotNull ClientSecret clientSecret, PaymentSheet.Configuration configuration, Integer num, @InjectorKey @NotNull String str) {
Intrinsics.checkNotNullParameter(clientSecret, "clientSecret");
Intrinsics.checkNotNullParameter(str, "injectorKey");
return new Args(clientSecret, configuration, num, str);
}
public int describeContents() {
return 0;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Args)) {
return false;
}
Args args = (Args) obj;
return Intrinsics.areEqual(this.clientSecret, args.clientSecret) && Intrinsics.areEqual(this.config, args.config) && Intrinsics.areEqual(this.statusBarColor, args.statusBarColor) && Intrinsics.areEqual(this.injectorKey, args.injectorKey);
}
@NotNull
public final ClientSecret getClientSecret$paymentsheet_release() {
return this.clientSecret;
}
public final PaymentSheet.Configuration getConfig$paymentsheet_release() {
return this.config;
}
public final PaymentSheet.GooglePayConfiguration getGooglePayConfig() {
PaymentSheet.Configuration configuration = this.config;
if (configuration != null) {
return configuration.getGooglePay();
}
return null;
}
@NotNull
public final String getInjectorKey$paymentsheet_release() {
return this.injectorKey;
}
public final Integer getStatusBarColor$paymentsheet_release() {
return this.statusBarColor;
}
public int hashCode() {
int hashCode = this.clientSecret.hashCode() * 31;
PaymentSheet.Configuration configuration = this.config;
int hashCode2 = (hashCode + (configuration == null ? 0 : configuration.hashCode())) * 31;
Integer num = this.statusBarColor;
return this.injectorKey.hashCode() + ((hashCode2 + (num != null ? num.hashCode() : 0)) * 31);
}
@NotNull
public String toString() {
StringBuilder sb = new StringBuilder("Args(clientSecret=");
sb.append(this.clientSecret);
sb.append(", config=");
sb.append(this.config);
sb.append(", statusBarColor=");
sb.append(this.statusBarColor);
sb.append(", injectorKey=");
return u0.a(sb, this.injectorKey, ')');
}
public void writeToParcel(@NotNull Parcel parcel, int i) {
Intrinsics.checkNotNullParameter(parcel, "out");
parcel.writeParcelable(this.clientSecret, i);
PaymentSheet.Configuration configuration = this.config;
if (configuration == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
configuration.writeToParcel(parcel, i);
}
Integer num = this.statusBarColor;
if (num == null) {
parcel.writeInt(0);
} else {
L.a(parcel, 1, num);
}
parcel.writeString(this.injectorKey);
}
public Args(ClientSecret clientSecret, PaymentSheet.Configuration configuration, Integer num, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(clientSecret, configuration, (i & 4) != 0 ? null : num, (i & 8) != 0 ? InjectorKt.DUMMY_INJECTOR_KEY : str);
}
}
}