a.smali
.class public final Ldp/a;
.super Ljava/lang/Object;
.source "GooglePayUtil.kt"
# static fields
.field public static final a:Ldp/a;
# direct methods
.method public static constructor <clinit>()V
.registers 1
new-instance v0, Ldp/a;
invoke-direct {v0}, Ldp/a;-><init>()V
sput-object v0, Ldp/a;->a:Ldp/a;
return-void
.end method
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final a(ILandroid/app/Activity;)Lcom/google/android/gms/wallet/PaymentsClient;
.registers 4
new-instance v0, Lcom/google/android/gms/wallet/Wallet$WalletOptions$Builder;
invoke-direct {v0}, Lcom/google/android/gms/wallet/Wallet$WalletOptions$Builder;-><init>()V
invoke-virtual {v0, p1}, Lcom/google/android/gms/wallet/Wallet$WalletOptions$Builder;->setEnvironment(I)Lcom/google/android/gms/wallet/Wallet$WalletOptions$Builder;
move-result-object p1
invoke-virtual {p1}, Lcom/google/android/gms/wallet/Wallet$WalletOptions$Builder;->build()Lcom/google/android/gms/wallet/Wallet$WalletOptions;
move-result-object p1
invoke-static {p2, p1}, Lcom/google/android/gms/wallet/Wallet;->getPaymentsClient(Landroid/app/Activity;Lcom/google/android/gms/wallet/Wallet$WalletOptions;)Lcom/google/android/gms/wallet/PaymentsClient;
move-result-object p1
const-string p2, "Wallet.getPaymentsClient(activity, walletOptions)"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object p1
.end method
.method public final a(ILandroid/content/Intent;)Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;
.registers 4
const/4 v0, -0x1
if-eq p1, v0, :cond_2d
if-eqz p1, :cond_26
const/4 v0, 0x1
if-ne p1, v0, :cond_1e
invoke-static {p2}, Lcom/google/android/gms/wallet/AutoResolveHelper;->getStatusFromIntent(Landroid/content/Intent;)Lcom/google/android/gms/common/api/Status;
move-result-object p1
if-eqz p1, :cond_17
sget-object p2, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;->Companion:Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;
invoke-virtual {p2, p1}, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;->error(Lcom/google/android/gms/common/api/Status;)Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;
move-result-object p1
if-eqz p1, :cond_17
goto :goto_44
:cond_17
sget-object p1, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;->Companion:Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;
invoke-virtual {p1}, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;->statusNull()Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;
move-result-object p1
goto :goto_44
:cond_1e
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Result code is neither Activity.RESULT_OK nor Activity.RESULT_CANCELED or AutoResolveHelper.RESULT_ERROR."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_26
sget-object p1, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;->Companion:Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;
invoke-virtual {p1}, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;->cancelled()Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;
move-result-object p1
goto :goto_44
:cond_2d
if-eqz p2, :cond_3e
invoke-static {p2}, Lcom/google/android/gms/wallet/PaymentData;->getFromIntent(Landroid/content/Intent;)Lcom/google/android/gms/wallet/PaymentData;
move-result-object p1
if-eqz p1, :cond_3e
sget-object p2, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;->Companion:Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;
invoke-virtual {p2, p1}, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;->success(Lcom/google/android/gms/wallet/PaymentData;)Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;
move-result-object p1
if-eqz p1, :cond_3e
goto :goto_44
:cond_3e
sget-object p1, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;->Companion:Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;
invoke-virtual {p1}, Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse$Companion;->dataNull()Lcom/shopee/web/sdk/bridge/protocol/googlepay/GooglePayRequestPaymentResponse;
move-result-object p1
:goto_44
return-object p1
.end method