正在查看: Kickcash v16.1 应用的 CFDropSeamlessActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kickcash v16.1 应用的 CFDropSeamlessActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.cashfree.pg.ui.hidden.seamless;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.os.Build;
import android.os.Bundle;
import android.widget.ProgressBar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import com.cashfree.pg.core.api.CFCorePaymentGatewayService;
import com.cashfree.pg.core.api.CFTheme;
import com.cashfree.pg.core.api.base.CFPayment;
import com.cashfree.pg.core.api.exception.CFException;
import com.cashfree.pg.core.api.ui.PaymentInitiationData;
import com.cashfree.pg.core.api.utils.CFErrorResponse;
import com.cashfree.pg.core.api.utils.CFUPIApp;
import com.cashfree.pg.core.api.utils.CFUPIUtil;
import com.cashfree.pg.core.api.utils.CFUtil;
import com.cashfree.pg.core.api.utils.ThreadUtil;
import com.cashfree.pg.core.hidden.network.response.models.ConfigResponse;
import com.cashfree.pg.core.hidden.network.response.models.config.MerchantInfo;
import com.cashfree.pg.core.hidden.network.response.models.config.OrderDetails;
import com.cashfree.pg.core.hidden.utils.CFPaymentModes;
import com.cashfree.pg.ui.R;
import com.cashfree.pg.ui.api.CFDropCheckoutPayment;
import com.cashfree.pg.ui.hidden.seamless.CFDropSeamlessActivity;
import com.microsoft.clarity.a6.b;
import com.microsoft.clarity.b6.d;
import com.microsoft.clarity.b6.e;
import com.microsoft.clarity.o6.j;
import com.microsoft.clarity.q6.b;
import com.microsoft.clarity.x5.c;
import java.util.ArrayList;
import java.util.List;
public class CFDropSeamlessActivity extends b implements j.c, b.c, b.d {
private ArrayList<CFUPIApp> E0;
private j F0;
private CoordinatorLayout G0;
private OrderDetails J0;
private MerchantInfo K0;
private CFTheme L0;
private List<String> M0;
private List<String> N0;
private com.microsoft.clarity.q6.b Y;
private boolean Z = false;
private boolean H0 = true;
private final com.microsoft.clarity.n6.a I0 = new a();
private void c0(CFUPIUtil.UPIAppsCallback uPIAppsCallback) {
CFUPIUtil.getInstalledUPIApps(this, uPIAppsCallback);
}
public void d0(CFErrorResponse cFErrorResponse) {
n0(cFErrorResponse);
}
private void f0() {
com.google.android.material.bottomsheet.a aVar = this.F0;
if (aVar == null || !aVar.isShowing()) {
return;
}
this.F0.dismiss();
}
public void g0() {
this.G0.setVisibility(8);
}
public void h0(CFPayment cFPayment) {
try {
q0();
CFCorePaymentGatewayService.getInstance().doPayment(this, cFPayment);
} catch (CFException e) {
e.printStackTrace();
}
}
public static void i0(String str, CFErrorResponse cFErrorResponse) {
d.e().publishEvent(new d.b(e.onFailure, str, cFErrorResponse));
}
public static void j0(String str) {
d.e().publishEvent(new d.b(e.onVerify, str, null));
}
public void k0() {
this.G0.setVisibility(0);
}
public void l0(DialogInterface dialogInterface) {
n0(CFUtil.getResponseFromError(CFUtil.getCancelledResponse()));
}
public boolean lambda$onCreate$0() {
return c.a(getApplicationContext());
}
public void m0(ArrayList arrayList) {
this.E0 = arrayList;
ThreadUtil.runOnUIThread(new Runnable() {
@Override
public final void run() {
CFDropSeamlessActivity.this.r0();
}
});
}
private void n0(final CFErrorResponse cFErrorResponse) {
finish();
if (this.Z) {
return;
}
this.Z = true;
final String h = this.Y.h();
if (h != null) {
ThreadUtil.runOnUIThread(new Runnable() {
@Override
public final void run() {
CFDropSeamlessActivity.i0(h, cFErrorResponse);
}
});
}
}
public void o0(final String str) {
finish();
if (this.Z) {
return;
}
this.Z = true;
if (str != null) {
ThreadUtil.runOnUIThread(new Runnable() {
@Override
public final void run() {
CFDropSeamlessActivity.j0(str);
}
});
}
}
private void p0() {
((ProgressBar) findViewById(R.id.progress_bar)).getIndeterminateDrawable().setColorFilter(Color.parseColor(this.L0.getNavigationBarBackgroundColor()), PorterDuff.Mode.MULTIPLY);
}
public void r0() {
if (isDestroyed()) {
return;
}
e0();
f0();
?? jVar = new j(this, this.E0, this.M0, this.N0, this.J0, this.K0, this.L0, this);
this.F0 = jVar;
jVar.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
CFDropSeamlessActivity.this.l0(dialogInterface);
}
});
this.F0.show();
}
private void s0() {
if (this.E0 == null) {
c0(new CFUPIUtil.UPIAppsCallback() {
@Override
public final void onUPIAppsFetched(ArrayList arrayList) {
CFDropSeamlessActivity.this.m0(arrayList);
}
});
} else {
r0();
}
}
@Override
protected com.microsoft.clarity.q6.a Q() {
return this.Y;
}
@Override
public void a(PaymentInitiationData paymentInitiationData) {
this.Y.f(paymentInitiationData);
}
public void e0() {
runOnUiThread(new Runnable() {
@Override
public final void run() {
CFDropSeamlessActivity.this.g0();
}
});
}
@Override
public void f(CFErrorResponse cFErrorResponse) {
n0(cFErrorResponse);
}
@Override
public void l(final CFPayment cFPayment) {
ThreadUtil.runOnUIThread(new Runnable() {
@Override
public final void run() {
CFDropSeamlessActivity.this.h0(cFPayment);
}
});
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_cf_ui_modal);
CFCorePaymentGatewayService.getInstance().setCheckoutCallback(this.I0);
CFCorePaymentGatewayService.getInstance().setQRCallback(this.I0);
this.G0 = (CoordinatorLayout) findViewById(R.id.cf_loader);
this.Y = new com.microsoft.clarity.q6.b(new com.microsoft.clarity.x5.b() {
@Override
public final boolean isNetworkConnected() {
boolean lambda$onCreate$0;
lambda$onCreate$0 = CFDropSeamlessActivity.this.lambda$onCreate$0();
return lambda$onCreate$0;
}
}, this, this);
if (Build.VERSION.SDK_INT != 26) {
setRequestedOrientation(1);
}
this.L0 = this.Y.k();
p0();
q0();
this.Y.g();
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
}
@Override
protected void onResume() {
super.onResume();
if (this.H0) {
this.H0 = false;
} else {
this.Y.i();
}
}
public void q0() {
runOnUiThread(new Runnable() {
@Override
public final void run() {
CFDropSeamlessActivity.this.k0();
}
});
}
@Override
public void x(ConfigResponse configResponse, List<CFPaymentModes> list, CFDropCheckoutPayment cFDropCheckoutPayment) {
this.J0 = configResponse.getOrderDetails();
this.K0 = configResponse.getMerchantInfo();
this.M0 = configResponse.getFeatureConfig().getPaymentModeConfig().getUpiPriorityApps();
this.N0 = configResponse.getFeatureConfig().getPaymentModeConfig().getUpiBlacklistedApps();
if (list.contains(CFPaymentModes.UPI)) {
s0();
} else {
n0(CFUtil.getResponseFromError(CFUtil.getFailedResponse("UPI is not enabled for this order.")));
}
}
class a extends com.microsoft.clarity.n6.a {
a() {
}
public void b(CFErrorResponse cFErrorResponse) {
CFDropSeamlessActivity.this.e0();
CFDropSeamlessActivity.this.d0(cFErrorResponse);
}
@Override
public void onPaymentFailure(final CFErrorResponse cFErrorResponse, String str) {
ThreadUtil.runOnUIThread(new Runnable() {
@Override
public final void run() {
CFDropSeamlessActivity.a.this.b(cFErrorResponse);
}
});
}
@Override
public void onPaymentVerify(String str) {
CFDropSeamlessActivity.this.e0();
CFDropSeamlessActivity.this.o0(str);
}
@Override
public void onQRFetched(String str) {
}
}
}