正在查看: Kahramaa v15.23.3 应用的 GooglePayUsersDetail.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kahramaa v15.23.3 应用的 GooglePayUsersDetail.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.qa.kahramaa.kahramaa.partialpayment.fragments;
import a7.i0;
import a7.j;
import a7.n;
import a7.q;
import aa.l0;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Base64;
import android.view.GestureDetector;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import androidx.appcompat.app.AlertController;
import androidx.appcompat.app.b;
import butterknife.BindView;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.api.internal.LifecycleCallback;
import com.qa.kahramaa.kahramaa.base.retrofit.WebServiceFactoryV2;
import com.qa.kahramaa.kahramaa.base.retrofit.q;
import com.qa.kahramaa.kahramaa.base.ui.views.AnyEditTextInputLayout;
import com.qa.kahramaa.kahramaa.base.ui.views.AnyEditTextView;
import com.qa.kahramaa.kahramaa.base.ui.views.AnyTextView;
import com.qa.kahramaa.kahramaa.certificate.fragments.ServiceConnectionPaymentSuccess;
import fd.f;
import fd.g;
import fd.h;
import fd.o;
import fd.p;
import i5.l;
import ib.s;
import java.io.StringReader;
import java.lang.ref.WeakReference;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import l5.m;
import ma.k;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import r6.o5;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import w6.x;
import w6.y;
public class GooglePayUsersDetail extends hb.a {
public static final int A0 = 0;
@BindView
public AnyTextView amountValue;
@BindView
public RelativeLayout area_layout_parent;
@BindView
public AnyEditTextView et_cusName;
@BindView
public AnyEditTextView et_email;
@BindView
public AnyEditTextView et_mob;
@BindView
public AnyEditTextInputLayout etl_cusName;
@BindView
public AnyEditTextInputLayout etl_email;
@BindView
public AnyEditTextInputLayout etl_mob;
@BindView
public FrameLayout googlePayButton;
public Animation f4813k0;
public Animation f4814l0;
public h f4815m0;
public String f4816n0;
public n f4817o0;
public String f4818p0;
public String f4819q0;
public String f4820r0;
public List<f> f4821s0;
public ArrayList f4822t0;
@BindView
public AnyTextView tv_btn_request;
@BindView
public LinearLayout view_line_layout;
public boolean f4825w0;
public vb.h f4827y0;
public String f4823u0 = "0.0.0.0";
public String f4824v0 = "";
public String f4826x0 = "";
public b f4828z0 = new b();
public class a extends e {
public a(bb.a aVar) {
super(aVar);
}
@Override
public final void a() {
h hVar = GooglePayUsersDetail.this.f4815m0;
if (hVar != null && hVar.a() != null && GooglePayUsersDetail.this.f4815m0.a().size() > 0) {
Iterator<h.a> it = GooglePayUsersDetail.this.f4815m0.a().iterator();
while (it.hasNext()) {
h.a next = it.next();
GooglePayUsersDetail.this.D0(next.a(), next.b());
}
}
GooglePayUsersDetail googlePayUsersDetail = GooglePayUsersDetail.this;
googlePayUsersDetail.area_layout_parent.startAnimation(googlePayUsersDetail.f4814l0);
GooglePayUsersDetail.this.area_layout_parent.setVisibility(8);
GooglePayUsersDetail.this.tv_btn_request.setVisibility(0);
}
}
public class b implements TextWatcher {
public b() {
}
@Override
public final void afterTextChanged(Editable editable) {
}
@Override
public final void beforeTextChanged(CharSequence charSequence, int i10, int i11, int i12) {
}
@Override
public final void onTextChanged(CharSequence charSequence, int i10, int i11, int i12) {
GooglePayUsersDetail googlePayUsersDetail = GooglePayUsersDetail.this;
int i13 = GooglePayUsersDetail.A0;
googlePayUsersDetail.z0();
}
}
public class c implements Callback<p> {
public c() {
}
@Override
public final void onFailure(Call<p> call, Throwable th) {
GooglePayUsersDetail googlePayUsersDetail = GooglePayUsersDetail.this;
int i10 = GooglePayUsersDetail.A0;
googlePayUsersDetail.t0();
GooglePayUsersDetail googlePayUsersDetail2 = GooglePayUsersDetail.this;
googlePayUsersDetail2.f4825w0 = true;
if (googlePayUsersDetail2.p0() == null || !GooglePayUsersDetail.this.C()) {
return;
}
new gb.b(GooglePayUsersDetail.this.p0()).a(false, GooglePayUsersDetail.this.w().getString(2131689707), "", GooglePayUsersDetail.this.f4818p0, "", true);
}
@Override
public final void onResponse(Call<p> call, Response<p> response) {
GooglePayUsersDetail googlePayUsersDetail = GooglePayUsersDetail.this;
int i10 = GooglePayUsersDetail.A0;
googlePayUsersDetail.t0();
GooglePayUsersDetail.this.f4825w0 = true;
try {
p body = response.body();
if (body.d().equalsIgnoreCase("0")) {
if (!GooglePayUsersDetail.this.f4826x0.equalsIgnoreCase("CF")) {
new gb.b(GooglePayUsersDetail.this.p0()).a(true, "", body.b().b(), GooglePayUsersDetail.this.f4818p0, body.b().a(), true);
return;
}
GooglePayUsersDetail.this.p0().w();
GooglePayUsersDetail.this.p0().w();
GooglePayUsersDetail.this.p0().w();
String a10 = Locale.getDefault().getDisplayLanguage().equalsIgnoreCase("English") ? GooglePayUsersDetail.this.f8208h0.m().a().a() : GooglePayUsersDetail.this.f8208h0.m().a().b();
bb.a p02 = GooglePayUsersDetail.this.p0();
String c7 = GooglePayUsersDetail.this.f8208h0.m().a().c();
String b10 = GooglePayUsersDetail.this.f8208h0.m().b();
GooglePayUsersDetail googlePayUsersDetail2 = GooglePayUsersDetail.this;
String str = googlePayUsersDetail2.f4819q0;
String a11 = ((g.a) googlePayUsersDetail2.f4822t0.get(0)).a();
GooglePayUsersDetail googlePayUsersDetail3 = GooglePayUsersDetail.this;
p02.t(ServiceConnectionPaymentSuccess.z0(c7, b10, str, a11, googlePayUsersDetail3.f4820r0, a10, googlePayUsersDetail3.f8208h0.m().a().d().booleanValue(), GooglePayUsersDetail.this.f4827y0.c(), true, GooglePayUsersDetail.this.f4827y0.a(), GooglePayUsersDetail.this.f4827y0.b(), true, body));
return;
}
if (body.d().equalsIgnoreCase("1")) {
new gb.b(GooglePayUsersDetail.this.p0()).a(false, GooglePayUsersDetail.this.w().getString(2131689707), "", "", "", true);
return;
}
if (body.d().equalsIgnoreCase("2")) {
new gb.b(GooglePayUsersDetail.this.p0()).a(false, GooglePayUsersDetail.this.w().getString(2131689707), "", "", "", false);
return;
}
if (body.d().equalsIgnoreCase("3")) {
if (GooglePayUsersDetail.this.f8208h0.g().equalsIgnoreCase("en")) {
new gb.b(GooglePayUsersDetail.this.p0()).a(false, body.c(), "", "", "", true);
return;
} else {
new gb.b(GooglePayUsersDetail.this.p0()).a(false, body.a(), "", "", "", true);
return;
}
}
if (!body.d().equalsIgnoreCase("4")) {
new gb.b(GooglePayUsersDetail.this.p0()).a(false, GooglePayUsersDetail.this.w().getString(2131689707), "", "", "", true);
} else if (GooglePayUsersDetail.this.f8208h0.g().equalsIgnoreCase("en")) {
new gb.b(GooglePayUsersDetail.this.p0()).a(false, body.c(), "", "", "", false);
} else {
new gb.b(GooglePayUsersDetail.this.p0()).a(false, body.a(), "", "", "", false);
}
} catch (Exception e10) {
e10.printStackTrace();
if (GooglePayUsersDetail.this.p0() == null || !GooglePayUsersDetail.this.C()) {
return;
}
new gb.b(GooglePayUsersDetail.this.p0()).a(false, GooglePayUsersDetail.this.w().getString(2131689707), "", "", "", true);
}
}
}
public class d implements Callback<p> {
@Override
public final void onFailure(Call<p> call, Throwable th) {
}
@Override
public final void onResponse(Call<p> call, Response<p> response) {
}
}
public class e implements View.OnTouchListener {
public final GestureDetector f4832n;
public final class a extends GestureDetector.SimpleOnGestureListener {
public a() {
}
@Override
public final boolean onDown(MotionEvent motionEvent) {
return true;
}
@Override
public final boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f10) {
try {
float y10 = motionEvent2.getY() - motionEvent.getY();
float x = motionEvent2.getX() - motionEvent.getX();
if (Math.abs(x) > Math.abs(y10)) {
if (Math.abs(x) <= 100.0f || Math.abs(f) <= 100.0f) {
return false;
}
if (x > 0.0f) {
e.this.getClass();
} else {
e.this.getClass();
}
} else {
if (Math.abs(y10) <= 100.0f || Math.abs(f10) <= 100.0f) {
return false;
}
if (y10 > 0.0f) {
e.this.a();
} else {
e.this.getClass();
}
}
return true;
} catch (Exception e10) {
e10.printStackTrace();
return false;
}
}
}
public e(bb.a aVar) {
this.f4832n = new GestureDetector(aVar, new a());
}
public void a() {
throw null;
}
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
return this.f4832n.onTouchEvent(motionEvent);
}
}
public final void A0() {
u0();
WebServiceFactoryV2.e(new com.qa.kahramaa.kahramaa.base.retrofit.c[0]).E1(new o(this.f4815m0.a().get(0).a(), this.f4815m0.a().get(0).b(), this.f4818p0, this.f4816n0, this.f4823u0, this.f4824v0, this.et_cusName.getText().toString(), this.f4820r0, this.f4819q0, this.et_mob.getText().toString(), this.et_email.getText().toString(), this.f4822t0, this.f8208h0.g(), this.f4826x0)).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p0(), new c()));
}
public final void B0(boolean z) {
if (z) {
this.tv_btn_request.setVisibility(0);
} else {
this.tv_btn_request.setVisibility(8);
}
}
public final void C0(String str) {
b.a aVar = new b.a(p0(), 2131755229);
String z = z(2131689721);
String z10 = z(2131689944);
AlertController.b bVar = aVar.f955a;
bVar.f939d = z10;
bVar.f = str;
aVar.f(z, new gd.c(this));
androidx.appcompat.app.b a10 = aVar.a();
a10.setCanceledOnTouchOutside(false);
a10.show();
}
public final void D0(String str, String str2) {
WebServiceFactoryV2.e(new com.qa.kahramaa.kahramaa.base.retrofit.c[0]).J0(new fd.b(str, str2, this.f8208h0.g(), this.et_cusName.getText().toString(), this.f4820r0, this.f4826x0)).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p0(), new d()));
}
@Override
public final void F(int i10, int i11, Intent intent) {
if (i10 != 991) {
return;
}
j jVar = null;
if (i11 != -1) {
if (i11 != 1) {
return;
}
int i12 = a7.b.f431c;
int i13 = (intent != null ? (Status) intent.getParcelableExtra("com.google.android.gms.common.api.AutoResolveHelper.status") : null).f2899n;
new gb.b(p0()).a(false, w().getString(2131690284), "", "", "", true);
return;
}
Parcelable.Creator<j> creator = j.CREATOR;
byte[] byteArrayExtra = intent.getByteArrayExtra("com.google.android.gms.wallet.PaymentData");
if (byteArrayExtra != null) {
m.i(creator);
Parcel obtain = Parcel.obtain();
obtain.unmarshall(byteArrayExtra, 0, byteArrayExtra.length);
obtain.setDataPosition(0);
jVar = creator.createFromParcel(obtain);
obtain.recycle();
}
String str = jVar.f478t;
if (str == null) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str).getJSONObject("paymentMethodData");
String string = jSONObject.getJSONObject("tokenizationData").getString("token");
jSONObject.getJSONObject("info");
this.f4816n0 = new String(Base64.encode(string.getBytes(), 2));
A0();
} catch (Exception unused) {
new gb.b(p0()).a(false, w().getString(2131690284), "", "", "", true);
}
}
@Override
public final View J(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
return layoutInflater.inflate(2131493028, (ViewGroup) null);
}
@Override
public final void K() {
h hVar = this.f4815m0;
if (hVar != null && hVar.a() != null && this.f4815m0.a().size() > 0) {
Iterator<h.a> it = this.f4815m0.a().iterator();
while (it.hasNext()) {
h.a next = it.next();
D0(next.a(), next.b());
}
}
this.R = true;
}
@Override
public final void S() {
this.R = true;
z0();
this.et_cusName.addTextChangedListener(this.f4828z0);
this.et_mob.addTextChangedListener(this.f4828z0);
this.et_email.addTextChangedListener(this.f4828z0);
this.view_line_layout.setOnTouchListener(new a(p0()));
}
@Override
public final void W(View view, Bundle bundle) {
JSONObject jSONObject;
x xVar;
List<f> list;
List<f> list2;
super.W(view, bundle);
int i10 = 0;
s0().setTitleBarBackgroundColor(0);
s0().e();
q0().c();
s0().d();
s0().setSubHeading(w().getString(2131689579));
s0().a();
s0().b();
if (this.f4825w0) {
p0().v(1);
}
eb.f fVar = new eb.f();
fVar.f5685a = new l0(9, this);
bb.a p02 = p0();
HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor();
httpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.NONE);
OkHttpClient.Builder addInterceptor = new OkHttpClient.Builder().addInterceptor(new eb.e()).addInterceptor(httpLoggingInterceptor);
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
OkHttpClient.Builder readTimeout = addInterceptor.connectTimeout(180000L, timeUnit).readTimeout(180000L, timeUnit);
k kVar = new k();
kVar.f10610k = 1;
((q) new Retrofit.Builder().baseUrl("https://api.ipify.org/").addConverterFactory(GsonConverterFactory.create(kVar.a())).client(readTimeout.build()).build().create(q.class)).C1().enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p02, new eb.d(fVar)));
this.f4818p0 = this.f1673t.getString("bill_amount");
this.f4819q0 = this.f1673t.getString("qid");
this.f4820r0 = this.f1673t.getString("cus_id");
this.f4826x0 = this.f1673t.getString("bill_type");
bb.a p03 = p0();
BigDecimal bigDecimal = gd.n.f8016a;
q.a.C0002a c0002a = new q.a.C0002a();
c0002a.f501a = 1;
q.a aVar = new q.a(c0002a);
h5.a<q.a> aVar2 = a7.q.f497a;
this.f4817o0 = new n(p03, aVar);
if (Build.VERSION.SDK_INT >= 24) {
try {
jSONObject = new JSONObject().put("apiVersion", 2).put("apiVersionMinor", 0);
jSONObject.put("allowedPaymentMethods", new JSONArray().put(gd.n.a()));
} catch (JSONException unused) {
jSONObject = null;
}
Optional ofNullable = Optional.ofNullable(jSONObject);
if (ofNullable.isPresent()) {
String jSONObject2 = ((JSONObject) ofNullable.get()).toString();
a7.f fVar2 = new a7.f();
if (jSONObject2 == null) {
throw new NullPointerException("isReadyToPayRequestJson cannot be null!");
}
fVar2.f453s = jSONObject2;
n nVar = this.f4817o0;
nVar.getClass();
l.a aVar3 = new l.a();
aVar3.f8478d = 23705;
aVar3.f8475a = new x4.g(4, fVar2);
y b10 = nVar.b(0, aVar3.a());
bb.a p04 = p0();
gd.d dVar = new gd.d(this);
b10.getClass();
w6.p pVar = new w6.p(w6.k.f14994a, dVar);
b10.f15022b.a(pVar);
i5.f b11 = LifecycleCallback.b(p04);
synchronized (b11) {
xVar = (x) b11.f(x.class, "TaskOnStopCallback");
if (xVar == null) {
xVar = new x(b11);
}
}
synchronized (xVar.f15020o) {
xVar.f15020o.add(new WeakReference(pVar));
}
b10.t();
}
} else {
B0(false);
}
this.googlePayButton.setOnClickListener(this);
this.tv_btn_request.setOnClickListener(this);
this.f4822t0 = new ArrayList();
String b12 = s.b(this.f8208h0.f8724a, "selected_item");
int i11 = x7.e.f15449a;
if (b12 == null || b12.isEmpty()) {
list = new ArrayList<>();
} else {
Type type = new ib.c().f15965n;
ma.j a10 = com.qa.kahramaa.kahramaa.base.retrofit.j.a();
a10.getClass();
list = (List) (b12 != null ? a10.b(new StringReader(b12), new ta.a(type)) : null);
}
this.f4821s0 = list;
if ((list == null || list.size() <= 1) && !((list2 = this.f4821s0) != null && list2.size() == 1 && this.f4818p0.equalsIgnoreCase(this.f4821s0.get(0).f6865c))) {
while (i10 < this.f4821s0.size()) {
this.f4822t0.add(new g.a(this.f4821s0.get(i10).f6863a, this.f4821s0.get(i10).f6864b, this.f4818p0, this.f4821s0.get(i10).f6866d, this.f4821s0.get(i10).f6867e, this.f4821s0.get(i10).f));
i10++;
}
} else {
while (i10 < this.f4821s0.size()) {
this.f4822t0.add(new g.a(this.f4821s0.get(i10).f6863a, this.f4821s0.get(i10).f6864b, this.f4821s0.get(i10).f6865c, this.f4821s0.get(i10).f6866d, this.f4821s0.get(i10).f6867e, this.f4821s0.get(i10).f));
i10++;
}
}
if (this.f8208h0.h() != null) {
this.et_cusName.setText(this.f8208h0.h().f6930a);
this.et_mob.setText(this.f8208h0.h().f6931b);
this.et_email.setText(this.f8208h0.h().f6932c);
} else if (this.f8208h0.k() != null) {
if (this.f8208h0.g().equalsIgnoreCase("en")) {
this.et_cusName.setText(this.f8208h0.k().f11801s.f());
} else {
this.et_cusName.setText(this.f8208h0.k().f11801s.e());
}
this.et_mob.setText(this.f8208h0.k().f11801s.d());
this.et_email.setText(this.f8208h0.k().f11801s.b());
}
try {
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
if (this.f8208h0.g().equalsIgnoreCase("ar")) {
if (!TextUtils.isEmpty(this.et_cusName.getText().toString())) {
this.etl_cusName.setLayoutParams(layoutParams);
}
if (!TextUtils.isEmpty(this.et_mob.getText().toString())) {
this.etl_mob.setLayoutParams(layoutParams);
}
if (!TextUtils.isEmpty(this.et_email.getText().toString())) {
this.etl_email.setLayoutParams(layoutParams);
}
}
} catch (Exception e10) {
e10.printStackTrace();
}
this.f4813k0 = AnimationUtils.loadAnimation(p0(), 2130772009);
this.f4814l0 = AnimationUtils.loadAnimation(p0(), 2130772005);
}
@Override
public final void onClick(View view) {
int id2 = view.getId();
if (id2 != 2131296844) {
if (id2 != 2131297760) {
return;
}
s.d(this.f8208h0.f8724a, "biling_info", com.qa.kahramaa.kahramaa.base.retrofit.j.a().g(new fd.q(this.et_cusName.getText().toString(), this.et_mob.getText().toString(), this.et_email.getText().toString())));
u0();
WebServiceFactoryV2.e(new com.qa.kahramaa.kahramaa.base.retrofit.c[0]).o0(new g(this.f4819q0, this.et_mob.getText().toString(), this.et_email.getText().toString(), this.f4820r0, this.et_cusName.getText().toString(), this.f8208h0.g(), this.f4822t0, this.f4823u0, this.f4818p0, this.f4826x0)).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p0(), new gd.b(this)));
return;
}
if (Build.VERSION.SDK_INT >= 24) {
try {
Optional ofNullable = Optional.ofNullable(gd.n.b(p0(), Math.round(Double.parseDouble(this.f4818p0) * gd.n.f8016a.longValue())));
if (ofNullable.isPresent()) {
String jSONObject = ((JSONObject) ofNullable.get()).toString();
a7.k kVar = new a7.k();
m.j(jSONObject, "paymentDataRequestJson cannot be null!");
kVar.f488w = jSONObject;
n nVar = this.f4817o0;
nVar.getClass();
l.a aVar = new l.a();
aVar.f8475a = new o5(4, kVar);
aVar.f8477c = new g5.d[]{i0.f471a};
aVar.f8476b = true;
aVar.f8478d = 23707;
a7.b.a(p0(), nVar.b(1, aVar.a()));
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
}
@Override
public final void w0() {
}
public final void y0(boolean z) {
if (z) {
if (this.tv_btn_request.isEnabled()) {
return;
}
this.tv_btn_request.setEnabled(true);
this.tv_btn_request.setBackgroundDrawable(p0().getResources().getDrawable(2131230871));
return;
}
if (this.tv_btn_request.isEnabled()) {
this.tv_btn_request.setEnabled(false);
this.tv_btn_request.setBackgroundDrawable(p0().getResources().getDrawable(2131230868));
}
}
public final void z0() {
y0(true);
if (android.support.v4.media.c.k(this.et_cusName, "")) {
y0(false);
}
if (!this.et_mob.d(this.etl_mob)) {
y0(false);
}
if (this.et_email.c(this.etl_email)) {
return;
}
y0(false);
}
}