正在查看: Bhakti v5.4.0 应用的 CoinsPaymentActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Bhakti v5.4.0 应用的 CoinsPaymentActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.vlv.aravali.coins.ui.activities;
import B4.G1;
import Kp.V;
import Qn.AbstractC0210b;
import Vj.T1;
import Zn.C0896y0;
import Zn.b1;
import android.R;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.webkit.WebView;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.lifecycle.i0;
import androidx.lifecycle.q0;
import androidx.lifecycle.s0;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import ap.q1;
import bb.S;
import bj.C0910a;
import bj.EnumC0911b;
import bm.J0;
import cj.C1026J;
import cj.C1036U;
import cj.C1063x;
import com.android.billingclient.api.Purchase;
import com.razorpay.G;
import com.vlv.aravali.KukuFMApplication;
import com.vlv.aravali.coins.data.responses.CoinOrderResponse;
import com.vlv.aravali.coins.data.responses.CoinPaymentInfo;
import com.vlv.aravali.coins.data.responses.CoinPaymentMetaDataResponse;
import com.vlv.aravali.common.models.User;
import com.vlv.aravali.common.models.coins.Pack;
import com.vlv.aravali.payments.common.data.SubscriptionMeta;
import com.vlv.aravali.payments.legacy.data.PaymentVerificationResponse;
import com.vlv.aravali.payments.legacy.data.RazorPayNetBankingBank;
import com.vlv.aravali.views.activities.BaseActivity;
import com.vlv.aravali.views.widgets.UIComponentCardInputField;
import com.vlv.aravali.views.widgets.UIComponentToolbar;
import in.juspay.hyper.constants.LogLevel;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.J;
import kotlin.text.StringsKt;
import nl.C2198b;
import org.json.JSONException;
import org.json.JSONObject;
@Metadata
public final class CoinsPaymentActivity extends BaseActivity implements com.razorpay.B {
static final Gp.j[] $$delegatedProperties;
public static final int $stable;
public static final i Companion;
public static final String METHOD_CARD = "card";
public static final String METHOD_UPI = "upi";
public static final String PAYMENT_GATEWAY_GOOGLE_PLAY = "google_play_in_app";
public static final String PAYMENT_GATEWAY_RAZORPAY = "razorpay_v2";
public static final String PAYMENT_TYPE_CARD = "cards";
public static final String PAYMENT_TYPE_NET_BANKING = "net_banking";
public static final String PAYMENT_TYPE_UPI_COLLECT = "upi_collect";
public static final String PAYMENT_TYPE_UPI_INTENT = "upi_intent";
public static final String PAYMENT_TYPE_WALLET = "wallets";
private Kl.a billingClientLifecycle;
private Kl.c billingClientViewModel;
private boolean isTaskInProgress;
private Integer mPackCountryId;
private int mPackId;
private CoinPaymentInfo mPaymentInfo;
private SubscriptionMeta mSourceMeta;
private G razorpay;
private final Ri.a mBinding$delegate = new Ri.a(T1.class);
private final mp.m vm$delegate = new B4.v(J.a(C1036U.class), new D(this, 0), new e(1), new D(this, 1));
private ol.a appDisposable = new ol.a();
static {
Gp.j a = new kotlin.jvm.internal.A(CoinsPaymentActivity.class, "mBinding", "getMBinding()Lcom/vlv/aravali/databinding/CoinsPaymentActivityBinding;", 0);
J.a.getClass();
$$delegatedProperties = new Gp.j[]{a};
Companion = new i();
$stable = 8;
}
public final void createCoinOrder(Pack pack) {
if (pack == null || this.mPaymentInfo == null) {
return;
}
showLoadingView();
String str = Al.k.a;
Al.k.e("coin_payment_initiated", this.mSourceMeta, this.mPaymentInfo);
Ai.p pVar = KukuFMApplication.x;
Bi.k r = io.sentry.config.d.r(pVar, "fb_mobile_initiated_checkout");
Object id = pack.getId();
if (id == null) {
id = "";
}
r.c(id, "fb_content_id");
r.c(pack.getCurrencyCode(), "fb_currency");
Number sellingPrice = pack.getSellingPrice();
if (sellingPrice == null) {
sellingPrice = 0;
}
r.d = sellingPrice.doubleValue();
r.g(true);
Bundle bundle = new Bundle();
bundle.putString("item_id", String.valueOf(pack.getId()));
bundle.putString("item_name", String.valueOf(pack.getName()));
Bi.k l = pVar.B().d().l("begin_checkout");
Number sellingPrice2 = pack.getSellingPrice();
if (sellingPrice2 == null) {
sellingPrice2 = 0;
}
l.c(Double.valueOf(sellingPrice2.doubleValue()), "value");
String currencyCode = pack.getCurrencyCode();
l.c(currencyCode != null ? currencyCode : "", "currency");
l.b(new Bundle[]{bundle});
Number sellingPrice3 = pack.getSellingPrice();
if (sellingPrice3 == null) {
sellingPrice3 = 0;
}
l.d = sellingPrice3.doubleValue();
l.d();
C1036U vm2 = getVm();
CoinPaymentInfo coinPaymentInfo = this.mPaymentInfo;
Intrinsics.e(coinPaymentInfo);
vm2.getClass();
Intrinsics.checkNotNullParameter(pack, "pack");
Intrinsics.checkNotNullParameter(coinPaymentInfo, "paymentInfo");
Kp.p.w(i0.k(vm2), (CoroutineContext) null, (Kp.J) null, new C1026J(vm2, pack, coinPaymentInfo, null), 3);
}
public final Object getAppsWhichSupportUpi(pp.c<? super List<? extends com.razorpay.h>> cVar) {
pp.f fVar = new pp.f(qp.f.b(cVar));
com.razorpay.m.e(this, new q1(fVar, 9));
Object a = fVar.a();
if (a == qp.a.COROUTINE_SUSPENDED) {
Intrinsics.checkNotNullParameter(cVar, "frame");
}
return a;
}
private final JSONObject getFinalPayload() {
CoinOrderResponse coinOrderResponse;
String str;
CoinPaymentInfo.CardDetails cardDetails;
CoinPaymentInfo.CardDetails cardDetails2;
CoinPaymentInfo.CardDetails cardDetails3;
CoinPaymentInfo.CardDetails cardDetails4;
Pack pack;
CoinOrderResponse coinOrderResponse2;
Pack pack2;
CoinOrderResponse coinOrderResponse3;
Float amount;
CoinOrderResponse coinOrderResponse4;
Pack pack3;
Ai.p pVar = KukuFMApplication.x;
User t = io.sentry.config.d.t(pVar);
String d = Pk.j.d("premium_support_mail");
String d2 = Pk.j.d("premium_support_phone");
Integer num = null;
String email = t != null ? t.getEmail() : null;
String mobile = t != null ? t.getMobile() : null;
if ((email == null || StringsKt.H(email)) && (mobile == null || StringsKt.H(mobile))) {
yc.e a = pVar.B().e().a();
email = a != null ? a.b.e : null;
mobile = a != null ? a.b.f : null;
}
if (email != null && !StringsKt.H(email)) {
d = email;
}
if (mobile != null && !StringsKt.H(mobile)) {
d2 = mobile;
}
CoinPaymentInfo coinPaymentInfo = this.mPaymentInfo;
JSONObject jSONObject = new JSONObject(Ai.o.i("{currency: '", (coinPaymentInfo == null || (pack3 = coinPaymentInfo.getPack()) == null) ? null : pack3.getCurrencyCode(), "'}"));
CoinPaymentInfo coinPaymentInfo2 = this.mPaymentInfo;
jSONObject.put("order_id", (coinPaymentInfo2 == null || (coinOrderResponse4 = coinPaymentInfo2.getCoinOrderResponse()) == null) ? null : coinOrderResponse4.getTransactionOrderId());
CoinPaymentInfo coinPaymentInfo3 = this.mPaymentInfo;
jSONObject.put("amount", String.valueOf((coinPaymentInfo3 == null || (coinOrderResponse3 = coinPaymentInfo3.getCoinOrderResponse()) == null || (amount = coinOrderResponse3.getAmount()) == null) ? null : Integer.valueOf((int) amount.floatValue())));
jSONObject.put("contact", d2);
jSONObject.put("email", d);
CoinPaymentInfo coinPaymentInfo4 = this.mPaymentInfo;
if ((coinPaymentInfo4 == null || (pack2 = coinPaymentInfo4.getPack()) == null) ? false : Intrinsics.c(pack2.isRecurring(), Boolean.TRUE)) {
jSONObject.put("recurring", 1);
CoinPaymentInfo coinPaymentInfo5 = this.mPaymentInfo;
jSONObject.put("customer_id", (coinPaymentInfo5 == null || (coinOrderResponse2 = coinPaymentInfo5.getCoinOrderResponse()) == null) ? null : coinOrderResponse2.getCustomerId());
}
CoinPaymentInfo coinPaymentInfo6 = this.mPaymentInfo;
String type = coinPaymentInfo6 != null ? coinPaymentInfo6.getType() : null;
if (type != null) {
switch (type.hashCode()) {
case -2116042983:
if (type.equals(PAYMENT_TYPE_UPI_COLLECT)) {
jSONObject.put("method", METHOD_UPI);
jSONObject.put("_[flow]", "collect");
CoinPaymentInfo coinPaymentInfo7 = this.mPaymentInfo;
jSONObject.put("vpa", coinPaymentInfo7 != null ? coinPaymentInfo7.getUpiVpa() : null);
break;
}
break;
case 45710212:
if (type.equals(PAYMENT_TYPE_NET_BANKING)) {
jSONObject.put("method", "netbanking");
CoinPaymentInfo coinPaymentInfo8 = this.mPaymentInfo;
jSONObject.put("bank", coinPaymentInfo8 != null ? coinPaymentInfo8.getBankKey() : null);
break;
}
break;
case 94431075:
if (type.equals(PAYMENT_TYPE_CARD)) {
CoinPaymentInfo coinPaymentInfo9 = this.mPaymentInfo;
if (coinPaymentInfo9 == null || (cardDetails4 = coinPaymentInfo9.getCardDetails()) == null || (str = cardDetails4.getValidity()) == null) {
str = "";
}
char charAt = str.charAt(0);
char charAt2 = str.charAt(1);
StringBuilder sb = new StringBuilder();
sb.append(charAt);
sb.append(charAt2);
String sb2 = sb.toString();
char charAt3 = str.charAt(3);
char charAt4 = str.charAt(4);
StringBuilder sb3 = new StringBuilder();
sb3.append(charAt3);
sb3.append(charAt4);
String sb4 = sb3.toString();
jSONObject.put("method", METHOD_CARD);
CoinPaymentInfo coinPaymentInfo10 = this.mPaymentInfo;
jSONObject.put("card[name]", (coinPaymentInfo10 == null || (cardDetails3 = coinPaymentInfo10.getCardDetails()) == null) ? null : cardDetails3.getName());
CoinPaymentInfo coinPaymentInfo11 = this.mPaymentInfo;
jSONObject.put("card[number]", (coinPaymentInfo11 == null || (cardDetails2 = coinPaymentInfo11.getCardDetails()) == null) ? null : cardDetails2.getNumber());
jSONObject.put("card[expiry_month]", sb2);
jSONObject.put("card[expiry_year]", sb4);
CoinPaymentInfo coinPaymentInfo12 = this.mPaymentInfo;
jSONObject.put("card[cvv]", (coinPaymentInfo12 == null || (cardDetails = coinPaymentInfo12.getCardDetails()) == null) ? null : cardDetails.getCvv());
break;
}
break;
case 1118841754:
if (type.equals(PAYMENT_TYPE_WALLET)) {
jSONObject.put("method", "wallet");
CoinPaymentInfo coinPaymentInfo13 = this.mPaymentInfo;
jSONObject.put("wallet", coinPaymentInfo13 != null ? coinPaymentInfo13.getWalletName() : null);
break;
}
break;
case 2042486477:
if (type.equals(PAYMENT_TYPE_UPI_INTENT)) {
CoinPaymentInfo coinPaymentInfo14 = this.mPaymentInfo;
jSONObject.put("upi_app_package_name", coinPaymentInfo14 != null ? coinPaymentInfo14.getUpiAppPackageName() : null);
jSONObject.put("display_logo", true);
CoinPaymentInfo coinPaymentInfo15 = this.mPaymentInfo;
jSONObject.put("description", (coinPaymentInfo15 == null || (pack = coinPaymentInfo15.getPack()) == null) ? null : pack.getName());
jSONObject.put("method", METHOD_UPI);
jSONObject.put("_[flow]", "intent");
break;
}
break;
}
}
JSONObject jSONObject2 = new JSONObject();
User t2 = io.sentry.config.d.t(pVar);
jSONObject2.put("profile_id_app", String.valueOf(t2 != null ? t2.getId() : null));
CoinPaymentInfo coinPaymentInfo16 = this.mPaymentInfo;
if (coinPaymentInfo16 != null && (coinOrderResponse = coinPaymentInfo16.getCoinOrderResponse()) != null) {
num = coinOrderResponse.getKukuOrderId();
}
jSONObject2.put("kuku_coin_order_id_app", String.valueOf(num));
jSONObject.put("notes", jSONObject2);
return jSONObject;
}
public final T1 getMBinding() {
return this.mBinding$delegate.a(this, $$delegatedProperties[0]);
}
public final C1036U getVm() {
return (C1036U) this.vm$delegate.getValue();
}
public final void hideErrorView() {
T1 mBinding = getMBinding();
mBinding.l0.setVisibility(0);
mBinding.i0.setVisibility(8);
mBinding.X.setVisibility(8);
}
public final void hideLoadingView() {
T1 mBinding = getMBinding();
mBinding.l0.setVisibility(8);
mBinding.i0.setVisibility(0);
mBinding.X.setVisibility(8);
this.isTaskInProgress = false;
}
private final void initCallBacks() {
new H8.b(this, new G1(getVm().k, new q(this, null), 5), new k(2, null));
ol.a aVar = this.appDisposable;
Qo.b subscribe = nl.a.a(C2198b.class).subscribe(new Qk.b(new h(this, 2), 22), new Qk.b(new J0(26), 23));
Intrinsics.checkNotNullExpressionValue(subscribe, "subscribe(...)");
aVar.a(subscribe);
}
public static final Unit initCallBacks$lambda$4(CoinsPaymentActivity coinsPaymentActivity, C2198b c2198b) {
int i = j.a[c2198b.a.ordinal()];
if (i == 1) {
Kp.p.w(i0.i(coinsPaymentActivity), (CoroutineContext) null, (Kp.J) null, new r(coinsPaymentActivity, null), 3);
} else if (i == 2) {
Object[] objArr = c2198b.b;
if (objArr.length == 2 && (objArr[0] instanceof Integer) && (objArr[1] instanceof String)) {
Kp.p.w(i0.i(coinsPaymentActivity), (CoroutineContext) null, (Kp.J) null, new s(c2198b, coinsPaymentActivity, null), 3);
}
}
return Unit.a;
}
public static final Unit initCallBacks$lambda$6(Throwable th) {
th.printStackTrace();
return Unit.a;
}
private final void initGooglePlayBilling(String str) {
Qn.e.j = str;
KukuFMApplication application = getApplication();
Intrinsics.f(application, "null cannot be cast to non-null type com.vlv.aravali.KukuFMApplication");
Kl.a c = Kl.a.i.c(application);
this.billingClientLifecycle = c;
Intrinsics.checkNotNullParameter("inAppProduct", "<set-?>");
c.f = "inAppProduct";
Intrinsics.checkNotNullParameter(this, "owner");
s0 viewModelStore = getViewModelStore();
Intrinsics.checkNotNullParameter(this, "owner");
q0 defaultViewModelProviderFactory = getDefaultViewModelProviderFactory();
Intrinsics.checkNotNullParameter(this, "owner");
T2.c defaultViewModelCreationExtras = getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullParameter(viewModelStore, "store");
Intrinsics.checkNotNullParameter(defaultViewModelProviderFactory, "factory");
Intrinsics.checkNotNullParameter(defaultViewModelCreationExtras, "defaultCreationExtras");
pd.a aVar = new pd.a(viewModelStore, defaultViewModelProviderFactory, defaultViewModelCreationExtras);
Intrinsics.checkNotNullParameter(Kl.c.class, "modelClass");
kotlin.jvm.internal.i o = androidx.datastore.preferences.protobuf.o.o(Kl.c.class, "<this>", Kl.c.class, "modelClass", "modelClass");
String x = android.support.v4.media.session.h.x(o);
if (x == null) {
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
}
this.billingClientViewModel = aVar.S(o, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(x));
initGooglePlayBillingObservers();
}
private final void initGooglePlayBillingObservers() {
Kl.a aVar = this.billingClientLifecycle;
if (aVar == null) {
Intrinsics.m("billingClientLifecycle");
throw null;
}
aVar.b.e(this, new Gj.g(9, new h(this, 0)));
Kl.c cVar = this.billingClientViewModel;
if (cVar == null) {
Intrinsics.m("billingClientViewModel");
throw null;
}
cVar.c.e(this, new Gj.g(9, new h(this, 1)));
}
public static final Unit initGooglePlayBillingObservers$lambda$53(CoinsPaymentActivity coinsPaymentActivity, List list) {
if (list != null) {
androidx.datastore.preferences.protobuf.o.r(KukuFMApplication.x, "google_playstore_purchase_updated");
coinsPaymentActivity.registerPurchases(list);
} else {
String string = coinsPaymentActivity.getString(2132018564);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
coinsPaymentActivity.showToast(string, 0);
coinsPaymentActivity.hideLoadingView();
}
return Unit.a;
}
public static final Unit initGooglePlayBillingObservers$lambda$54(CoinsPaymentActivity coinsPaymentActivity, com.android.billingclient.api.e eVar) {
Intrinsics.checkNotNullParameter(eVar, "it");
Kl.a aVar = coinsPaymentActivity.billingClientLifecycle;
if (aVar == null) {
Intrinsics.m("billingClientLifecycle");
throw null;
}
if (aVar.b(coinsPaymentActivity, eVar) == 0) {
xq.d.a.a("Successfully launched", new Object[0]);
}
return Unit.a;
}
private final void initRazorpaySDK(String str) {
if (str == null) {
showErrorView();
return;
}
String str2 = Al.k.a;
Intrinsics.checkNotNullParameter(str, "<set-?>");
Al.k.a = str;
G g = new G(this, str);
this.razorpay = g;
g.v(getMBinding().k0);
}
public final void onCoinOrderSuccess(Pack pack, CoinOrderResponse coinOrderResponse) {
CoinPaymentInfo coinPaymentInfo = this.mPaymentInfo;
if (coinPaymentInfo != null) {
coinPaymentInfo.setCoinOrderResponse(coinOrderResponse);
coinPaymentInfo.setPack(pack);
CoinPaymentInfo coinPaymentInfo2 = this.mPaymentInfo;
if (Intrinsics.c(coinPaymentInfo2 != null ? coinPaymentInfo2.getGateway() : null, PAYMENT_GATEWAY_RAZORPAY)) {
startRazorpayPayment();
} else {
startGooglePlayPayment();
}
}
}
public final void onPaymentFailure() {
Kp.p.w(i0.i(this), (CoroutineContext) null, (Kp.J) null, new t(this, null), 3);
}
public final void onVerifyPaymentSuccess(PaymentVerificationResponse paymentVerificationResponse) {
Kp.p.w(i0.i(this), (CoroutineContext) null, (Kp.J) null, new u(this, paymentVerificationResponse, null), 3);
}
private final void registerPurchases(List<? extends Purchase> list) {
String str;
Iterator<? extends Purchase> it;
CoinOrderResponse coinOrderResponse;
Pack pack;
CoinsPaymentActivity coinsPaymentActivity = this;
Iterator<? extends Purchase> it2 = list.iterator();
while (it2.hasNext()) {
Purchase next = it2.next();
String b = next.b();
if (b != null) {
int c = next.c();
if (c == 1) {
String str2 = Qn.e.j;
CoinPaymentInfo coinPaymentInfo = coinsPaymentActivity.mPaymentInfo;
if (Intrinsics.c(str2, (coinPaymentInfo == null || (pack = coinPaymentInfo.getPack()) == null) ? null : pack.getGoogleProductId())) {
showLoadingView();
C1036U vm2 = getVm();
JSONObject jSONObject = next.c;
String optString = jSONObject.optString("packageName");
Intrinsics.checkNotNullExpressionValue(optString, "getPackageName(...)");
Object obj = next.f().get(0);
Intrinsics.checkNotNullExpressionValue(obj, "get(...)");
String str3 = (String) obj;
long optLong = jSONObject.optLong("purchaseTime");
int c2 = next.c();
String d = next.d();
Intrinsics.checkNotNullExpressionValue(d, "getPurchaseToken(...)");
com.android.billingclient.api.a a = next.a();
String str4 = a != null ? a.b : null;
com.android.billingclient.api.a a2 = next.a();
String str5 = a2 != null ? a2.c : null;
int optInt = jSONObject.optInt("quantity", 1);
boolean optBoolean = jSONObject.optBoolean("autoRenewing");
boolean e = next.e();
CoinPaymentInfo coinPaymentInfo2 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo2 == null || (coinOrderResponse = coinPaymentInfo2.getCoinOrderResponse()) == null || (str = coinOrderResponse.getKukuPaymentId()) == null) {
str = "";
}
String str6 = str;
SubscriptionMeta subscriptionMeta = coinsPaymentActivity.mSourceMeta;
Integer showId = subscriptionMeta != null ? subscriptionMeta.getShowId() : null;
SubscriptionMeta subscriptionMeta2 = coinsPaymentActivity.mSourceMeta;
it = it2;
vm2.q(b, optString, str3, optLong, c2, d, str4, str5, optInt, optBoolean, e, str6, showId, subscriptionMeta2 != null ? subscriptionMeta2.getSource() : null);
AbstractC0210b.v(KukuFMApplication.x, "google_playstore_purchase_state", "state", "PURCHASED");
coinsPaymentActivity = this;
it2 = it;
}
} else if (c != 2) {
xq.d.a.a("Purchase State: UN_SPECIFIED", new Object[0]);
AbstractC0210b.v(KukuFMApplication.x, "google_playstore_purchase_state", "state", "UN_SPECIFIED");
} else {
xq.d.a.a("Purchase State: PENDING", new Object[0]);
coinsPaymentActivity.showToast("Payment is Pending", 0);
AbstractC0210b.v(KukuFMApplication.x, "google_playstore_purchase_state", "state", "PENDING");
}
it = it2;
coinsPaymentActivity = this;
it2 = it;
} else {
coinsPaymentActivity = this;
}
}
}
public final void setUpCardPayment(Pack pack) {
String str;
Dialog dialog = new Dialog(this);
View inflate = LayoutInflater.from(this).inflate(2131558503, (ViewGroup) null, false);
dialog.setContentView(inflate);
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawableResource(R.color.transparent);
}
Window window2 = dialog.getWindow();
if (window2 != null) {
window2.setGravity(80);
}
Window window3 = dialog.getWindow();
if (window3 != null) {
window3.setLayout(-1, -2);
}
Window window4 = dialog.getWindow();
if (window4 != null) {
window4.setSoftInputMode(5);
}
AppCompatImageView findViewById = inflate != null ? inflate.findViewById(2131362212) : null;
if (findViewById != null) {
findViewById.setOnClickListener(new ViewOnClickListenerC1147a(dialog, 0));
}
UIComponentCardInputField uIComponentCardInputField = inflate != null ? (UIComponentCardInputField) inflate.findViewById(2131362320) : null;
if (uIComponentCardInputField != null) {
uIComponentCardInputField.setFilter(22);
}
if (uIComponentCardInputField != null) {
uIComponentCardInputField.setInputType(3);
}
UIComponentCardInputField uIComponentCardInputField2 = inflate != null ? (UIComponentCardInputField) inflate.findViewById(2131365469) : null;
if (uIComponentCardInputField2 != null) {
uIComponentCardInputField2.setMaxLength(5);
}
if (uIComponentCardInputField2 != null) {
uIComponentCardInputField2.setInputType(2);
}
UIComponentCardInputField uIComponentCardInputField3 = inflate != null ? (UIComponentCardInputField) inflate.findViewById(2131362736) : null;
if (uIComponentCardInputField3 != null) {
uIComponentCardInputField3.setMaxLength(4);
}
if (uIComponentCardInputField3 != null) {
uIComponentCardInputField3.setInputType(2);
}
AppCompatTextView findViewById2 = inflate != null ? inflate.findViewById(2131364159) : null;
if (findViewById2 != null) {
StringBuilder sb = new StringBuilder();
if (pack == null || (str = pack.getCurrencyCode()) == null) {
str = "";
}
sb.append(str);
sb.append(" " + new DecimalFormat("0.####").format(pack != null ? pack.getSellingPrice() : null));
findViewById2.setText(sb);
}
UIComponentCardInputField uIComponentCardInputField4 = inflate != null ? (UIComponentCardInputField) inflate.findViewById(2131363932) : null;
ConstraintLayout findViewById3 = inflate != null ? inflate.findViewById(2131364648) : null;
if (uIComponentCardInputField != null) {
uIComponentCardInputField.setTextChangeListener(new uo.a(this, uIComponentCardInputField, uIComponentCardInputField3, 22));
}
if (uIComponentCardInputField3 != null) {
uIComponentCardInputField3.setTextChangeListener(new S(uIComponentCardInputField3, 5));
}
if (uIComponentCardInputField2 != null) {
uIComponentCardInputField2.setTextChangeListener(new v(uIComponentCardInputField2, 0));
}
if (uIComponentCardInputField4 != null) {
uIComponentCardInputField4.setTextChangeListener(new C0896y0(uIComponentCardInputField4, 8));
}
if (findViewById3 != null) {
findViewById3.setOnClickListener(new ViewOnClickListenerC1148b(uIComponentCardInputField, uIComponentCardInputField3, uIComponentCardInputField2, uIComponentCardInputField4, this, dialog, pack));
}
if (uIComponentCardInputField != null && !uIComponentCardInputField.hasFocus()) {
uIComponentCardInputField.requestFocus();
}
int i = 0;
dialog.setOnDismissListener(new DialogInterfaceOnDismissListenerC1149c(this, i));
dialog.setOnCancelListener(new DialogInterfaceOnCancelListenerC1150d(this, i));
dialog.show();
}
public static final void setUpCardPayment$lambda$21(com.vlv.aravali.views.widgets.UIComponentCardInputField r16, com.vlv.aravali.views.widgets.UIComponentCardInputField r17, com.vlv.aravali.views.widgets.UIComponentCardInputField r18, com.vlv.aravali.views.widgets.UIComponentCardInputField r19, com.vlv.aravali.coins.ui.activities.CoinsPaymentActivity r20, android.app.Dialog r21, com.vlv.aravali.common.models.coins.Pack r22, android.view.View r23) {
throw new UnsupportedOperationException("Method not decompiled: com.vlv.aravali.coins.ui.activities.CoinsPaymentActivity.setUpCardPayment$lambda$21(com.vlv.aravali.views.widgets.UIComponentCardInputField, com.vlv.aravali.views.widgets.UIComponentCardInputField, com.vlv.aravali.views.widgets.UIComponentCardInputField, com.vlv.aravali.views.widgets.UIComponentCardInputField, com.vlv.aravali.coins.ui.activities.CoinsPaymentActivity, android.app.Dialog, com.vlv.aravali.common.models.coins.Pack, android.view.View):void");
}
public static final void setUpCardPayment$lambda$22(CoinsPaymentActivity coinsPaymentActivity, DialogInterface dialogInterface) {
ArrayList arrayList = Qn.e.a;
Qn.e.F(coinsPaymentActivity);
}
public static final void setUpCardPayment$lambda$23(CoinsPaymentActivity coinsPaymentActivity, DialogInterface dialogInterface) {
ArrayList arrayList = Qn.e.a;
Qn.e.F(coinsPaymentActivity);
}
public final void setUpNetBanking(Pack pack, String str) {
Object obj;
try {
JSONObject jSONObject = new JSONObject(str).getJSONObject("netbanking");
ArrayList arrayList = new ArrayList();
Iterator<String> keys = jSONObject.keys();
Intrinsics.checkNotNullExpressionValue(keys, "keys(...)");
while (keys.hasNext()) {
String next = keys.next();
try {
String string = jSONObject.getString(next);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
arrayList.add(new RazorPayNetBankingBank(next, string));
} catch (JSONException e) {
xq.b bVar = xq.d.a;
bVar.m("Reading Banks List");
bVar.d(e.getLocalizedMessage(), new Object[0]);
}
}
if (arrayList.isEmpty()) {
toggleNetBankingVisibility(false);
return;
}
ArrayList arrayList2 = new ArrayList();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
RazorPayNetBankingBank razorPayNetBankingBank = (RazorPayNetBankingBank) it.next();
if (Intrinsics.c(razorPayNetBankingBank.getKey(), "ICIC") || Intrinsics.c(razorPayNetBankingBank.getKey(), "HDFC") || Intrinsics.c(razorPayNetBankingBank.getKey(), "KKBK") || Intrinsics.c(razorPayNetBankingBank.getKey(), "SBIN") || Intrinsics.c(razorPayNetBankingBank.getKey(), "YESB") || Intrinsics.c(razorPayNetBankingBank.getKey(), "UTIB")) {
arrayList2.add(razorPayNetBankingBank);
}
}
Iterator it2 = arrayList2.iterator();
while (true) {
if (!it2.hasNext()) {
obj = null;
break;
} else {
obj = it2.next();
if (Intrinsics.c(((RazorPayNetBankingBank) obj).getKey(), "SBIN")) {
break;
}
}
}
RazorPayNetBankingBank razorPayNetBankingBank2 = (RazorPayNetBankingBank) obj;
if (razorPayNetBankingBank2 != null) {
arrayList2.remove(razorPayNetBankingBank2);
arrayList2.add(0, razorPayNetBankingBank2);
}
Iterator it3 = arrayList2.iterator();
while (it3.hasNext()) {
arrayList.remove((RazorPayNetBankingBank) it3.next());
}
arrayList2.addAll(arrayList);
G g = this.razorpay;
if (g == null) {
Intrinsics.m("razorpay");
throw null;
}
Fl.m mVar = new Fl.m(this, g, arrayList2, 0, new f(this, pack, 0));
RecyclerView recyclerView = getMBinding().m0;
recyclerView.setVisibility(0);
recyclerView.setLayoutManager(new LinearLayoutManager(0, false));
if (recyclerView.getItemDecorationCount() == 0) {
Resources resources = recyclerView.getResources();
Intrinsics.checkNotNullExpressionValue(resources, "getResources(...)");
recyclerView.i(new Fl.i(0, resources));
}
recyclerView.setAdapter(mVar);
} catch (Exception e2) {
xq.b bVar2 = xq.d.a;
bVar2.m("Parsing Result");
bVar2.d(e2.getLocalizedMessage(), new Object[0]);
toggleNetBankingVisibility(false);
}
}
public static final Unit setUpNetBanking$lambda$18(CoinsPaymentActivity coinsPaymentActivity, Pack pack, RazorPayNetBankingBank razorPayNetBankingBank) {
Intrinsics.checkNotNullParameter(razorPayNetBankingBank, "it");
String str = null;
CoinPaymentInfo coinPaymentInfo = new CoinPaymentInfo(coinsPaymentActivity.mSourceMeta, null, null, null, null, null, null, null, null, null, null, pack, str, str, str, null, 63486, null);
coinsPaymentActivity.mPaymentInfo = coinPaymentInfo;
coinPaymentInfo.setTitle(razorPayNetBankingBank.getName());
CoinPaymentInfo coinPaymentInfo2 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo2 != null) {
coinPaymentInfo2.setType(PAYMENT_TYPE_NET_BANKING);
}
CoinPaymentInfo coinPaymentInfo3 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo3 != null) {
coinPaymentInfo3.setGateway(PAYMENT_GATEWAY_RAZORPAY);
}
CoinPaymentInfo coinPaymentInfo4 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo4 != null) {
coinPaymentInfo4.setBankKey(razorPayNetBankingBank.getKey());
}
coinsPaymentActivity.createCoinOrder(pack);
return Unit.a;
}
public final void setupRecurringViews(CoinPaymentMetaDataResponse coinPaymentMetaDataResponse) {
Pack.Subscription subscription;
Pack.Subscription subscription2;
Pack.Subscription subscription3;
T1 mBinding = getMBinding();
String str = Al.k.a;
SubscriptionMeta subscriptionMeta = this.mSourceMeta;
Al.k.e("coin_payment_screen_viewed", subscriptionMeta, new CoinPaymentInfo(subscriptionMeta, null, null, null, null, null, null, null, null, null, null, coinPaymentMetaDataResponse.getRecurringPack(), 0 == true ? 1 : 0, null, null, null, 63486, null));
Pack recurringPack = coinPaymentMetaDataResponse.getRecurringPack();
if (recurringPack != null) {
recurringPack.setRecurring(Boolean.TRUE);
}
SubscriptionMeta subscriptionMeta2 = this.mSourceMeta;
if (C0910a.g(subscriptionMeta2 != null ? subscriptionMeta2.getSource() : null)) {
mBinding.Y.setVisibility(8);
AppCompatTextView appCompatTextView = mBinding.t0;
appCompatTextView.setVisibility(0);
SubscriptionMeta subscriptionMeta3 = this.mSourceMeta;
appCompatTextView.setText(subscriptionMeta3 != null ? subscriptionMeta3.getTitle() : null);
Pack recurringPack2 = coinPaymentMetaDataResponse.getRecurringPack();
String currencySymbol = recurringPack2 != null ? recurringPack2.getCurrencySymbol() : null;
Pack recurringPack3 = coinPaymentMetaDataResponse.getRecurringPack();
mBinding.z0.setText(C0910a.b(currencySymbol, recurringPack3 != null ? recurringPack3.getSellingPrice() : null, ""));
} else {
mBinding.t0.setVisibility(8);
mBinding.M.setVisibility(8);
mBinding.Q.setVisibility(0);
StringBuilder sb = new StringBuilder();
sb.append("You chose : ");
Pack recurringPack4 = coinPaymentMetaDataResponse.getRecurringPack();
sb.append((recurringPack4 == null || (subscription3 = recurringPack4.getSubscription()) == null) ? null : subscription3.getName());
mBinding.x0.setText(sb);
ArrayList arrayList = Qn.e.a;
mBinding.B0.setText(Qn.e.C());
StringBuilder sb2 = new StringBuilder();
sb2.append("To ");
Pack recurringPack5 = coinPaymentMetaDataResponse.getRecurringPack();
sb2.append((recurringPack5 == null || (subscription2 = recurringPack5.getSubscription()) == null) ? null : subscription2.getExpiryDate());
mBinding.u0.setText(sb2);
StringBuilder sb3 = new StringBuilder();
Pack recurringPack6 = coinPaymentMetaDataResponse.getRecurringPack();
sb3.append(recurringPack6 != null ? recurringPack6.getNumberOfCoins() : null);
sb3.append(" Coins");
mBinding.C0.setText(sb3);
StringBuilder sb4 = new StringBuilder();
sb4.append("+");
Pack recurringPack7 = coinPaymentMetaDataResponse.getRecurringPack();
sb4.append(recurringPack7 != null ? recurringPack7.getFreeCoins() : null);
sb4.append(" Coins Free");
mBinding.A0.setText(sb4);
Pack recurringPack8 = coinPaymentMetaDataResponse.getRecurringPack();
mBinding.y0.setText(recurringPack8 != null ? C0910a.c(recurringPack8) : null);
Pack recurringPack9 = coinPaymentMetaDataResponse.getRecurringPack();
mBinding.q0.setText((recurringPack9 == null || (subscription = recurringPack9.getSubscription()) == null) ? null : subscription.getFrequencyMessage());
}
initRazorpaySDK(coinPaymentMetaDataResponse.getRazorpayKey());
G g = this.razorpay;
if (g == null) {
Intrinsics.m("razorpay");
throw null;
}
g.h(new H8.b(coinPaymentMetaDataResponse, this, mBinding, 22));
Pack recurringPack10 = coinPaymentMetaDataResponse.getRecurringPack();
initGooglePlayBilling(recurringPack10 != null ? recurringPack10.getGoogleProductId() : null);
mBinding.L.setOnClickListener(new g(this, coinPaymentMetaDataResponse, 1));
}
public static final void setupRecurringViews$lambda$13$lambda$12(CoinsPaymentActivity coinsPaymentActivity, CoinPaymentMetaDataResponse coinPaymentMetaDataResponse, View view) {
String str = null;
CoinPaymentInfo coinPaymentInfo = new CoinPaymentInfo(coinsPaymentActivity.mSourceMeta, null, null, null, null, null, null, null, null, null, null, coinPaymentMetaDataResponse.getRecurringPack(), null, str, str, null, 63486, null);
coinsPaymentActivity.mPaymentInfo = coinPaymentInfo;
coinPaymentInfo.setTitle("Google play");
CoinPaymentInfo coinPaymentInfo2 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo2 != null) {
coinPaymentInfo2.setGateway("google_play_in_app");
}
CoinPaymentInfo coinPaymentInfo3 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo3 != null) {
coinPaymentInfo3.setType("google_play_in_app");
}
coinsPaymentActivity.createCoinOrder(coinPaymentMetaDataResponse.getRecurringPack());
}
public final void setupUpiCollect(Pack pack) {
androidx.lifecycle.B i = i0.i(this);
Sp.f fVar = V.a;
Kp.p.w(i, Qp.m.a, (Kp.J) null, new z(this, pack, null), 2);
}
public final void setupUpiIntent(Pack pack) {
Kp.p.w(i0.i(this), (CoroutineContext) null, (Kp.J) null, new C(this, pack, null), 3);
}
public final void setupViews(CoinPaymentMetaDataResponse coinPaymentMetaDataResponse) {
Integer freeCoins;
Integer numberOfCoins;
T1 mBinding = getMBinding();
String str = Al.k.a;
SubscriptionMeta subscriptionMeta = this.mSourceMeta;
Al.k.e("coin_payment_screen_viewed", subscriptionMeta, new CoinPaymentInfo(subscriptionMeta, null, null, null, null, null, null, null, null, null, 0 == true ? 1 : 0, coinPaymentMetaDataResponse.getPack(), null, null, null, null, 63486, null));
Pack pack = coinPaymentMetaDataResponse.getPack();
if (pack != null) {
pack.setRecurring(Boolean.FALSE);
}
SubscriptionMeta subscriptionMeta2 = this.mSourceMeta;
if (C0910a.g(subscriptionMeta2 != null ? subscriptionMeta2.getSource() : null)) {
mBinding.Y.setVisibility(8);
AppCompatTextView appCompatTextView = mBinding.t0;
appCompatTextView.setVisibility(0);
SubscriptionMeta subscriptionMeta3 = this.mSourceMeta;
appCompatTextView.setText(subscriptionMeta3 != null ? subscriptionMeta3.getTitle() : null);
} else {
mBinding.Y.setVisibility(0);
mBinding.t0.setVisibility(8);
mBinding.M.setVisibility(0);
mBinding.Q.setVisibility(8);
StringBuilder sb = new StringBuilder();
Pack pack2 = coinPaymentMetaDataResponse.getPack();
sb.append((pack2 == null || (numberOfCoins = pack2.getNumberOfCoins()) == null) ? 0 : numberOfCoins.intValue());
sb.append(" Coins");
mBinding.s0.setText(sb);
Pack pack3 = coinPaymentMetaDataResponse.getPack();
if (pack3 != null && (freeCoins = pack3.getFreeCoins()) != null) {
mBinding.v0.setText(Ai.o.v(freeCoins.intValue(), "+", " Free Coins"));
}
}
AppCompatTextView appCompatTextView2 = mBinding.z0;
Pack pack4 = coinPaymentMetaDataResponse.getPack();
String currencySymbol = pack4 != null ? pack4.getCurrencySymbol() : null;
Pack pack5 = coinPaymentMetaDataResponse.getPack();
appCompatTextView2.setText(C0910a.b(currencySymbol, pack5 != null ? pack5.getSellingPrice() : null, ""));
initRazorpaySDK(coinPaymentMetaDataResponse.getRazorpayKey());
G g = this.razorpay;
if (g == null) {
Intrinsics.m("razorpay");
throw null;
}
g.h(new t4.V(coinPaymentMetaDataResponse, this, mBinding, 24));
Pack pack6 = coinPaymentMetaDataResponse.getPack();
initGooglePlayBilling(pack6 != null ? pack6.getGoogleProductId() : null);
mBinding.L.setOnClickListener(new g(this, coinPaymentMetaDataResponse, 0));
}
public static final void setupViews$lambda$10$lambda$9(CoinsPaymentActivity coinsPaymentActivity, CoinPaymentMetaDataResponse coinPaymentMetaDataResponse, View view) {
String str = null;
CoinPaymentInfo coinPaymentInfo = new CoinPaymentInfo(coinsPaymentActivity.mSourceMeta, null, null, null, null, null, null, null, null, null, null, coinPaymentMetaDataResponse.getPack(), null, str, str, null, 63486, null);
coinsPaymentActivity.mPaymentInfo = coinPaymentInfo;
coinPaymentInfo.setTitle("Google play");
CoinPaymentInfo coinPaymentInfo2 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo2 != null) {
coinPaymentInfo2.setGateway("google_play_in_app");
}
CoinPaymentInfo coinPaymentInfo3 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo3 != null) {
coinPaymentInfo3.setType("google_play_in_app");
}
coinsPaymentActivity.createCoinOrder(coinPaymentMetaDataResponse.getPack());
}
public final void setupWallet(Pack pack, String str) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
Object obj5;
try {
JSONObject jSONObject = new JSONObject(str).getJSONObject("wallet");
ArrayList arrayList = new ArrayList();
Iterator<String> keys = jSONObject.keys();
Intrinsics.checkNotNullExpressionValue(keys, "keys(...)");
while (keys.hasNext()) {
String next = keys.next();
try {
if (jSONObject.getBoolean(next)) {
arrayList.add(next);
}
} catch (JSONException e) {
xq.b bVar = xq.d.a;
bVar.m("Reading Wallets List");
bVar.d(e.getLocalizedMessage(), new Object[0]);
}
}
ArrayList arrayList2 = new ArrayList();
Iterator it = arrayList.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
} else {
obj = it.next();
if (Intrinsics.c((String) obj, "phonepe")) {
break;
}
}
}
String str2 = (String) obj;
if (str2 != null) {
arrayList.remove(str2);
arrayList2.add(str2);
}
Iterator it2 = arrayList.iterator();
while (true) {
if (!it2.hasNext()) {
obj2 = null;
break;
} else {
obj2 = it2.next();
if (Intrinsics.c((String) obj2, "amazonpay")) {
break;
}
}
}
String str3 = (String) obj2;
if (str3 != null) {
arrayList.remove(str3);
arrayList2.add(str3);
}
Iterator it3 = arrayList.iterator();
while (true) {
if (!it3.hasNext()) {
obj3 = null;
break;
} else {
obj3 = it3.next();
if (Intrinsics.c((String) obj3, "mobikwik")) {
break;
}
}
}
String str4 = (String) obj3;
if (str4 != null) {
arrayList.remove(str4);
arrayList2.add(str4);
}
Iterator it4 = arrayList.iterator();
while (true) {
if (!it4.hasNext()) {
obj4 = null;
break;
} else {
obj4 = it4.next();
if (Intrinsics.c((String) obj4, "mobikwik")) {
break;
}
}
}
String str5 = (String) obj4;
if (str5 != null) {
arrayList.remove(str5);
arrayList2.add(str5);
}
Iterator it5 = arrayList.iterator();
while (true) {
if (!it5.hasNext()) {
obj5 = null;
break;
} else {
obj5 = it5.next();
if (Intrinsics.c((String) obj5, "airtelmoney")) {
break;
}
}
}
String str6 = (String) obj5;
if (str6 != null) {
arrayList.remove(str6);
arrayList2.add(str6);
}
arrayList2.addAll(arrayList);
G g = this.razorpay;
if (g == null) {
Intrinsics.m("razorpay");
throw null;
}
b1 b1Var = new b1(this, g, arrayList2, null, new f(this, pack, 1));
RecyclerView recyclerView = getMBinding().o0;
recyclerView.setVisibility(0);
if (recyclerView.getItemDecorationCount() == 0) {
Resources resources = recyclerView.getResources();
Intrinsics.checkNotNullExpressionValue(resources, "getResources(...)");
recyclerView.i(new Fl.i(5, resources));
}
recyclerView.setAdapter(b1Var);
} catch (Exception e2) {
xq.b bVar2 = xq.d.a;
bVar2.m("Parsing Result");
bVar2.d(e2.getLocalizedMessage(), new Object[0]);
toggleWalletVisibility(false);
}
}
public static final Unit setupWallet$lambda$34(CoinsPaymentActivity coinsPaymentActivity, Pack pack, String str) {
Intrinsics.checkNotNullParameter(str, "it");
String str2 = null;
CoinPaymentInfo coinPaymentInfo = new CoinPaymentInfo(coinsPaymentActivity.mSourceMeta, null, null, null, null, null, null, null, null, null, null, pack, str2, str2, null, null, 63486, null);
coinsPaymentActivity.mPaymentInfo = coinPaymentInfo;
coinPaymentInfo.setTitle(str);
CoinPaymentInfo coinPaymentInfo2 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo2 != null) {
coinPaymentInfo2.setType(PAYMENT_TYPE_WALLET);
}
CoinPaymentInfo coinPaymentInfo3 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo3 != null) {
coinPaymentInfo3.setGateway(PAYMENT_GATEWAY_RAZORPAY);
}
CoinPaymentInfo coinPaymentInfo4 = coinsPaymentActivity.mPaymentInfo;
if (coinPaymentInfo4 != null) {
coinPaymentInfo4.setWalletName(str);
}
coinsPaymentActivity.createCoinOrder(pack);
return Unit.a;
}
public final void showErrorView() {
this.isTaskInProgress = false;
T1 mBinding = getMBinding();
mBinding.l0.setVisibility(8);
mBinding.i0.setVisibility(8);
mBinding.X.setVisibility(0);
}
private final void showLoadingView() {
T1 mBinding = getMBinding();
mBinding.l0.setVisibility(0);
mBinding.i0.setVisibility(8);
mBinding.X.setVisibility(8);
this.isTaskInProgress = true;
}
private final void startGooglePlayPayment() {
Pack pack;
CoinOrderResponse coinOrderResponse;
CoinPaymentInfo coinPaymentInfo = this.mPaymentInfo;
if (coinPaymentInfo == null || (pack = coinPaymentInfo.getPack()) == null) {
return;
}
Kl.c cVar = this.billingClientViewModel;
Integer num = null;
if (cVar == null) {
Intrinsics.m("billingClientViewModel");
throw null;
}
String valueOf = String.valueOf(pack.getGoogleProductId());
Kl.a aVar = this.billingClientLifecycle;
if (aVar == null) {
Intrinsics.m("billingClientLifecycle");
throw null;
}
String str = aVar.f;
EnumC0911b enumC0911b = EnumC0911b.COIN;
CoinPaymentInfo coinPaymentInfo2 = this.mPaymentInfo;
if (coinPaymentInfo2 != null && (coinOrderResponse = coinPaymentInfo2.getCoinOrderResponse()) != null) {
num = coinOrderResponse.getKukuOrderId();
}
String valueOf2 = String.valueOf(num);
Intrinsics.checkNotNullParameter(valueOf, "productId");
Intrinsics.checkNotNullParameter(str, "productType");
cVar.e(valueOf, str, null, enumC0911b, valueOf2);
}
private final void startRazorpayPayment() {
JSONObject finalPayload = getFinalPayload();
if (this.razorpay != null) {
com.razorpay.m.z(finalPayload, new I5.c(22, this, finalPayload));
} else {
Intrinsics.m("razorpay");
throw null;
}
}
public final void toggleCardsVisibility(boolean z) {
T1 mBinding = getMBinding();
if (z) {
mBinding.r0.setVisibility(0);
mBinding.Z.setVisibility(0);
} else {
mBinding.r0.setVisibility(8);
mBinding.Z.setVisibility(8);
}
}
public final void toggleNetBankingVisibility(boolean z) {
T1 mBinding = getMBinding();
if (z) {
mBinding.w0.setVisibility(0);
mBinding.m0.setVisibility(0);
} else {
mBinding.w0.setVisibility(8);
mBinding.m0.setVisibility(8);
}
}
public final void toggleUpiCollectVisibility(boolean z) {
T1 mBinding = getMBinding();
if (z) {
mBinding.j0.setVisibility(0);
} else {
mBinding.j0.setVisibility(8);
}
}
public final void toggleUpiIntentVisibility(boolean z) {
T1 mBinding = getMBinding();
if (z) {
mBinding.D0.setVisibility(0);
mBinding.n0.setVisibility(0);
} else {
mBinding.D0.setVisibility(8);
mBinding.n0.setVisibility(8);
}
}
public final void toggleWalletVisibility(boolean z) {
T1 mBinding = getMBinding();
if (z) {
mBinding.E0.setVisibility(0);
mBinding.o0.setVisibility(0);
} else {
mBinding.E0.setVisibility(8);
mBinding.o0.setVisibility(8);
}
}
public static final q0 vm_delegate$lambda$1() {
return new ol.i(J.a(C1036U.class), new e(0));
}
public static final C1036U vm_delegate$lambda$1$lambda$0() {
return new C1036U(new C1063x());
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
G g = this.razorpay;
if (g != null) {
if (g != null) {
g.p(i, i2, intent);
} else {
Intrinsics.m("razorpay");
throw null;
}
}
}
public void onBackPressed() {
G g;
if (this.isTaskInProgress) {
showToast("Please wait, can't go back at this stage.", 0);
return;
}
WebView webView = getMBinding().k0;
Intrinsics.checkNotNullExpressionValue(webView, "paymentsWebView");
if (webView.getVisibility() != 0 || (g = this.razorpay) == null) {
super/*androidx.activity.ComponentActivity*/.onBackPressed();
} else if (g != null) {
g.q();
} else {
Intrinsics.m("razorpay");
throw null;
}
}
@Override
public void onCreate(Bundle bundle) {
SubscriptionMeta subscriptionMeta;
super.onCreate(bundle);
setTheme(2132083173);
getWindow().setStatusBarColor(getColor(2131100579));
this.mPackId = getIntent().getIntExtra("coin_pack_id", 0);
this.mPackCountryId = Integer.valueOf(getIntent().getIntExtra("coin_pack_country_id", 0));
if (getIntent().hasExtra("subscription_meta")) {
int i = Build.VERSION.SDK_INT;
if (i >= 33) {
subscriptionMeta = (SubscriptionMeta) Cc.e.l(getIntent());
} else if (i >= 33) {
subscriptionMeta = (SubscriptionMeta) Cc.e.l(getIntent());
} else {
Serializable serializableExtra = getIntent().getSerializableExtra("subscription_meta");
subscriptionMeta = serializableExtra instanceof SubscriptionMeta ? (SubscriptionMeta) serializableExtra : null;
}
this.mSourceMeta = subscriptionMeta;
}
if (this.mPackId == 0) {
finish();
}
T1 mBinding = getMBinding();
getVm();
mBinding.getClass();
String string = getString(2132018282);
UIComponentToolbar uIComponentToolbar = mBinding.p0;
uIComponentToolbar.setTitle(string);
uIComponentToolbar.setNavigationOnClickListener(new Gj.a(this, 25));
initCallBacks();
if (this.mPackId != 0) {
showLoadingView();
getVm().m(this.mPackId, this.mPackCountryId);
}
}
@Override
public void onDestroy() {
super.onDestroy();
ArrayList arrayList = Qn.e.a;
Qn.e.j = null;
Qn.e.b = null;
this.appDisposable.b();
}
public void onPaymentError(int i, String str, com.razorpay.z zVar) {
String str2;
String str3;
CoinOrderResponse coinOrderResponse;
String transactionOrderId;
CoinOrderResponse coinOrderResponse2;
CoinOrderResponse coinOrderResponse3;
String kukuPaymentId;
String gateway;
showLoadingView();
getMBinding().k0.setVisibility(8);
if (str != null) {
String string = new JSONObject(str).getJSONObject(LogLevel.ERROR).getString("description");
showToast("Payment failed : " + string, 0);
CoinPaymentInfo coinPaymentInfo = this.mPaymentInfo;
if (coinPaymentInfo != null) {
coinPaymentInfo.setErrorMessage(string);
}
String str4 = Al.k.a;
Al.k.e("coin_transaction_failed", this.mSourceMeta, this.mPaymentInfo);
xq.d.a.k("onPaymentError 1", new Object[0]);
}
xq.d.a.k("onPaymentError 2", new Object[0]);
C1036U vm2 = getVm();
CoinPaymentInfo coinPaymentInfo2 = this.mPaymentInfo;
String str5 = (coinPaymentInfo2 == null || (gateway = coinPaymentInfo2.getGateway()) == null) ? "" : gateway;
CoinPaymentInfo coinPaymentInfo3 = this.mPaymentInfo;
String str6 = (coinPaymentInfo3 == null || (coinOrderResponse3 = coinPaymentInfo3.getCoinOrderResponse()) == null || (kukuPaymentId = coinOrderResponse3.getKukuPaymentId()) == null) ? "" : kukuPaymentId;
CoinPaymentInfo coinPaymentInfo4 = this.mPaymentInfo;
String valueOf = String.valueOf((coinPaymentInfo4 == null || (coinOrderResponse2 = coinPaymentInfo4.getCoinOrderResponse()) == null) ? null : coinOrderResponse2.getKukuOrderId());
CoinPaymentInfo coinPaymentInfo5 = this.mPaymentInfo;
String str7 = (coinPaymentInfo5 == null || (coinOrderResponse = coinPaymentInfo5.getCoinOrderResponse()) == null || (transactionOrderId = coinOrderResponse.getTransactionOrderId()) == null) ? "" : transactionOrderId;
String str8 = (zVar == null || (str3 = zVar.a) == null) ? "" : str3;
String str9 = (zVar == null || (str2 = zVar.c) == null) ? "" : str2;
SubscriptionMeta subscriptionMeta = this.mSourceMeta;
vm2.r(str5, str6, valueOf, str7, str8, str9, false, subscriptionMeta != null ? subscriptionMeta.getShowId() : null);
}
public void onPaymentSuccess(java.lang.String r11, com.razorpay.z r12) {
throw new UnsupportedOperationException("Method not decompiled: com.vlv.aravali.coins.ui.activities.CoinsPaymentActivity.onPaymentSuccess(java.lang.String, com.razorpay.z):void");
}
}