626 lines
19 KiB
Java
626 lines
19 KiB
Java
package com.scb.phone.view.fragment.parntner.nsip;
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.Button;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.BaseActivity;
|
|
import com.scb.phone.view.activity.HomeActivity;
|
|
import com.scb.phone.view.activity.partner.nsip.NsipPartnerPaymentReviewActivity;
|
|
import com.scb.phone.view.custom.common.AmountEditText;
|
|
import com.scb.phone.view.custom.common.NoteEditText;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment;
|
|
import o.AbstractC13482fbE;
|
|
import o.AbstractC14961gcz;
|
|
import o.C1171Xc;
|
|
import o.C12891fKc;
|
|
import o.C14957gcv;
|
|
import o.C15863jI;
|
|
import o.C17437wka;
|
|
import o.C6113cJ;
|
|
import o.C7210cjw;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC13393fZL;
|
|
import o.InterfaceC14890gbN;
|
|
import o.InterfaceC9477dkV;
|
|
import o.Mcb;
|
|
import o.TI;
|
|
import o.TJ;
|
|
import o.WW;
|
|
import o.ZI;
|
|
import o.fZZ;
|
|
import o.nMh;
|
|
import o.tPH;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class NsipPaymentInputFragment extends Hilt_NsipPaymentInputFragment implements InterfaceC9477dkV.RVV, AccountSourceSelectFragment.Sts, NoteEditText.IeS {
|
|
public static final LWm c = new LWm(0);
|
|
|
|
@BindView
|
|
public Button btnReview;
|
|
private String d = "";
|
|
|
|
@BindView
|
|
public AmountEditText edtAmount;
|
|
|
|
@BindView
|
|
public NoteEditText edtNote;
|
|
private TI g;
|
|
|
|
@BindView
|
|
public ImageView ivMerchantLogo;
|
|
private final InterfaceC13393fZL j;
|
|
|
|
@BindView
|
|
public LinearLayout layoutRef2;
|
|
|
|
@BindView
|
|
public LinearLayout layoutRef3;
|
|
|
|
@BindView
|
|
public LinearLayout llRemainingLimit;
|
|
|
|
@InterfaceC13391fZD
|
|
public C7210cjw presenter;
|
|
|
|
@BindView
|
|
public TextView tvAmountError;
|
|
|
|
@BindView
|
|
public TextView tvLabelRemainingLimit;
|
|
|
|
@BindView
|
|
public TextView tvMerchantAccountNo;
|
|
|
|
@BindView
|
|
public TextView tvMerchantName;
|
|
|
|
@BindView
|
|
public TextView tvRef1Label;
|
|
|
|
@BindView
|
|
public TextView tvRef1Value;
|
|
|
|
@BindView
|
|
public TextView tvRef2Label;
|
|
|
|
@BindView
|
|
public TextView tvRef2Value;
|
|
|
|
@BindView
|
|
public TextView tvRef3Label;
|
|
|
|
@BindView
|
|
public TextView tvRef3Value;
|
|
|
|
@BindView
|
|
public TextView tvRemainingLimitError;
|
|
|
|
@BindView
|
|
public TextView tvRemainingLimitValue;
|
|
|
|
public NsipPaymentInputFragment() {
|
|
HBt hBt = HBt.a;
|
|
C14957gcv.e(hBt, "");
|
|
this.j = new fZZ(hBt);
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class LWm {
|
|
private LWm() {
|
|
}
|
|
|
|
public /* synthetic */ LWm(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
return layoutInflater.inflate(R.layout.2131559791, viewGroup, false);
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onViewCreated(View view, Bundle bundle) {
|
|
String string;
|
|
C14957gcv.e(view, "");
|
|
super.onViewCreated(view, bundle);
|
|
((BaseFragment) this).a = ButterKnife.c(this, view);
|
|
C7210cjw c7210cjw = this.presenter;
|
|
if (c7210cjw == null) {
|
|
C14957gcv.a("");
|
|
c7210cjw = null;
|
|
}
|
|
c7210cjw.e((C7210cjw) this);
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
this.g = (TI) arguments.getParcelable("KEY_NSIP_PARTNER_PAYMENT_DISPLAY");
|
|
C14957gcv.e("KEY_DEEPLINK_ID", "");
|
|
if (arguments == null) {
|
|
string = "";
|
|
} else {
|
|
string = arguments.getString("KEY_DEEPLINK_ID", "");
|
|
C14957gcv.c((Object) string, "");
|
|
}
|
|
this.d = string;
|
|
}
|
|
NoteEditText noteEditText = this.edtNote;
|
|
if (noteEditText == null) {
|
|
C14957gcv.a("");
|
|
noteEditText = null;
|
|
}
|
|
noteEditText.setOnNoteInputListener(this, "^(?=\\S)[0-9a-zA-Z\\u0E00-\\u0E3E\\u0E40-\\u0E7F _*'\"#&*()@\\-]+$", false);
|
|
final TI ti = this.g;
|
|
if (ti != null) {
|
|
C7210cjw c7210cjw2 = this.presenter;
|
|
if (c7210cjw2 == null) {
|
|
C14957gcv.a("");
|
|
c7210cjw2 = null;
|
|
}
|
|
C14957gcv.e(ti, "");
|
|
c7210cjw2.e = ti;
|
|
c7210cjw2.a = ti.j;
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.cjD
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9477dkV.RVV) obj).v();
|
|
}
|
|
};
|
|
if (c7210cjw2.f != 0) {
|
|
ieS.e(c7210cjw2.f);
|
|
}
|
|
C15863jI c15863jI = c7210cjw2.b;
|
|
C7210cjw.RVV rvv = new C7210cjw.RVV(c7210cjw2);
|
|
C7210cjw.Sts sts = new C7210cjw.Sts(c7210cjw2);
|
|
C14957gcv.e(rvv, "");
|
|
C14957gcv.e(sts, "");
|
|
C14957gcv.e("TRANSFER", "");
|
|
C14957gcv.e("SCB", "");
|
|
c15863jI.b(c15863jI.d, rvv, sts, new Mcb.RVV("TRANSFER", "SCB"));
|
|
ZI.IeS ieS2 = new ZI.IeS(ti) { // from class: o.cjL
|
|
private TI c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C7210cjw.a(this.c, (InterfaceC9477dkV.RVV) obj);
|
|
}
|
|
|
|
{
|
|
this.c = ti;
|
|
}
|
|
};
|
|
if (c7210cjw2.f != 0) {
|
|
ieS2.e(c7210cjw2.f);
|
|
}
|
|
}
|
|
Bundle arguments2 = getArguments();
|
|
((C17437wka) this.j.e()).e(arguments2 != null ? arguments2.getString("NSIP_TRACKER_FROM", C17437wka.b.d) : null);
|
|
C17437wka c17437wka = (C17437wka) this.j.e();
|
|
String str = C17437wka.e.d;
|
|
if (getActivity() != null) {
|
|
c17437wka.c(((BaseActivity) getActivity()).scbAnalytics, str);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void a(C1171Xc c1171Xc) {
|
|
C14957gcv.e(c1171Xc, "");
|
|
AbstractC13482fbE a = getChildFragmentManager().a();
|
|
a.b(R.id.fragment_account_source_select, AccountSourceSelectFragment.b(c1171Xc), null, 2);
|
|
a.b();
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
|
|
public final void a(WW ww) {
|
|
C14957gcv.e(ww, "");
|
|
C7210cjw c7210cjw = this.presenter;
|
|
if (c7210cjw == null) {
|
|
C14957gcv.a("");
|
|
c7210cjw = null;
|
|
}
|
|
c7210cjw.a(ww);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void d(TI ti) {
|
|
C14957gcv.e(ti, "");
|
|
Context context = getContext();
|
|
TextView textView = null;
|
|
if (context != null) {
|
|
Drawable drawable = nMh.getDrawable(context, R.drawable.ic_biller_default);
|
|
ImageView imageView = this.ivMerchantLogo;
|
|
if (imageView == null) {
|
|
C14957gcv.a("");
|
|
imageView = null;
|
|
}
|
|
C12891fKc.azl_(context, drawable, imageView, ti.f.b, getResources().getDimensionPixelOffset(R.dimen.f15272131165291), nMh.getColor(context, R.color.f3092131099816));
|
|
}
|
|
TextView textView2 = this.tvMerchantName;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setText(ti.f.a);
|
|
TextView textView3 = this.tvMerchantAccountNo;
|
|
if (textView3 == null) {
|
|
C14957gcv.a("");
|
|
textView3 = null;
|
|
}
|
|
textView3.setText(ti.d);
|
|
TextView textView4 = this.tvRef1Label;
|
|
if (textView4 == null) {
|
|
C14957gcv.a("");
|
|
textView4 = null;
|
|
}
|
|
textView4.setText(ti.h);
|
|
TextView textView5 = this.tvRef1Value;
|
|
if (textView5 == null) {
|
|
C14957gcv.a("");
|
|
textView5 = null;
|
|
}
|
|
textView5.setText(ti.i);
|
|
TextView textView6 = this.tvRef2Label;
|
|
if (textView6 == null) {
|
|
C14957gcv.a("");
|
|
textView6 = null;
|
|
}
|
|
textView6.setText(ti.m);
|
|
TextView textView7 = this.tvRef2Value;
|
|
if (textView7 == null) {
|
|
C14957gcv.a("");
|
|
textView7 = null;
|
|
}
|
|
textView7.setText(ti.f8372o);
|
|
TextView textView8 = this.tvRef3Label;
|
|
if (textView8 == null) {
|
|
C14957gcv.a("");
|
|
textView8 = null;
|
|
}
|
|
textView8.setText(ti.l);
|
|
TextView textView9 = this.tvRef3Value;
|
|
if (textView9 != null) {
|
|
textView = textView9;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView.setText(ti.n);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void d() {
|
|
LinearLayout linearLayout = this.layoutRef2;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void a() {
|
|
LinearLayout linearLayout = this.layoutRef3;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void c(String str) {
|
|
C14957gcv.e(str, "");
|
|
AmountEditText amountEditText = this.edtAmount;
|
|
if (amountEditText == null) {
|
|
C14957gcv.a("");
|
|
amountEditText = null;
|
|
}
|
|
amountEditText.setText(str);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void a(String str) {
|
|
C14957gcv.e(str, "");
|
|
LinearLayout linearLayout = this.llRemainingLimit;
|
|
TextView textView = null;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(0);
|
|
TextView textView2 = this.tvLabelRemainingLimit;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setVisibility(0);
|
|
TextView textView3 = this.tvRemainingLimitValue;
|
|
if (textView3 == null) {
|
|
C14957gcv.a("");
|
|
textView3 = null;
|
|
}
|
|
textView3.setVisibility(0);
|
|
TextView textView4 = this.tvRemainingLimitValue;
|
|
if (textView4 == null) {
|
|
C14957gcv.a("");
|
|
textView4 = null;
|
|
}
|
|
textView4.setText(str);
|
|
TextView textView5 = this.tvRemainingLimitError;
|
|
if (textView5 != null) {
|
|
textView = textView5;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void f() {
|
|
LinearLayout linearLayout = this.llRemainingLimit;
|
|
Button button = null;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(0);
|
|
TextView textView = this.tvRemainingLimitError;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(getString(R.string.nsip_limit_not_available));
|
|
TextView textView2 = this.tvRemainingLimitError;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setVisibility(0);
|
|
TextView textView3 = this.tvAmountError;
|
|
if (textView3 == null) {
|
|
C14957gcv.a("");
|
|
textView3 = null;
|
|
}
|
|
textView3.setVisibility(8);
|
|
Button button2 = this.btnReview;
|
|
if (button2 != null) {
|
|
button = button2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
button.setEnabled(true);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void i() {
|
|
TextView textView = this.tvAmountError;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(getString(R.string.nsip_insufficient_balance_error));
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void j() {
|
|
TextView textView = this.tvAmountError;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(getString(R.string.nsip_amount_exceed_limit_error));
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void g() {
|
|
AmountEditText amountEditText = this.edtAmount;
|
|
TextView textView = null;
|
|
if (amountEditText == null) {
|
|
C14957gcv.a("");
|
|
amountEditText = null;
|
|
}
|
|
amountEditText.setInvalidAmount(true);
|
|
TextView textView2 = this.tvAmountError;
|
|
if (textView2 != null) {
|
|
textView = textView2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView.setVisibility(0);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void c() {
|
|
AmountEditText amountEditText = this.edtAmount;
|
|
TextView textView = null;
|
|
if (amountEditText == null) {
|
|
C14957gcv.a("");
|
|
amountEditText = null;
|
|
}
|
|
amountEditText.setInvalidAmount(false);
|
|
TextView textView2 = this.tvAmountError;
|
|
if (textView2 != null) {
|
|
textView = textView2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void b() {
|
|
Button button = this.btnReview;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setEnabled(true);
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void e() {
|
|
Button button = this.btnReview;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setEnabled(false);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.NoteEditText.IeS
|
|
public final void d(boolean z) {
|
|
C7210cjw c7210cjw = this.presenter;
|
|
NoteEditText noteEditText = null;
|
|
if (c7210cjw == null) {
|
|
C14957gcv.a("");
|
|
c7210cjw = null;
|
|
}
|
|
NoteEditText noteEditText2 = this.edtNote;
|
|
if (noteEditText2 != null) {
|
|
noteEditText = noteEditText2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
String obj = noteEditText.mNoteEditText.getText().toString();
|
|
C14957gcv.c((Object) obj, "");
|
|
C14957gcv.e(obj, "");
|
|
boolean z2 = obj.length() == 0 || z;
|
|
boolean c2 = c7210cjw.c(c7210cjw.a, c7210cjw.c);
|
|
boolean e = c7210cjw.e(c7210cjw.a, c7210cjw.d);
|
|
if (!z2 || c2 || e) {
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.cjy
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj2) {
|
|
((InterfaceC9477dkV.RVV) obj2).e();
|
|
}
|
|
};
|
|
if (c7210cjw.f != 0) {
|
|
ieS.e(c7210cjw.f);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.cjt
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj2) {
|
|
((InterfaceC9477dkV.RVV) obj2).b();
|
|
}
|
|
};
|
|
if (c7210cjw.f != 0) {
|
|
ieS2.e(c7210cjw.f);
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public final void onClickBtnReview() {
|
|
final C7210cjw c7210cjw = this.presenter;
|
|
TI ti = null;
|
|
if (c7210cjw == null) {
|
|
C14957gcv.a("");
|
|
c7210cjw = null;
|
|
}
|
|
NoteEditText noteEditText = this.edtNote;
|
|
if (noteEditText == null) {
|
|
C14957gcv.a("");
|
|
noteEditText = null;
|
|
}
|
|
String obj = noteEditText.mNoteEditText.getText().toString();
|
|
C14957gcv.c((Object) obj, "");
|
|
String str = this.d;
|
|
C14957gcv.e(obj, "");
|
|
C14957gcv.e(str, "");
|
|
if (obj.length() == 0) {
|
|
obj = null;
|
|
}
|
|
ZI.IeS ieS = new ZI.IeS(c7210cjw) { // from class: o.cjH
|
|
private C7210cjw c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj2) {
|
|
C7210cjw.d(this.c);
|
|
}
|
|
|
|
{
|
|
this.c = c7210cjw;
|
|
}
|
|
};
|
|
if (c7210cjw.f != 0) {
|
|
ieS.e(c7210cjw.f);
|
|
}
|
|
C15863jI c15863jI = c7210cjw.b;
|
|
C7210cjw.HBt hBt = new C7210cjw.HBt(c7210cjw, obj);
|
|
C7210cjw.LWm lWm = new C7210cjw.LWm(c7210cjw);
|
|
TI ti2 = c7210cjw.e;
|
|
if (ti2 == null) {
|
|
C14957gcv.a("");
|
|
} else {
|
|
ti = ti2;
|
|
}
|
|
C6113cJ c6113cJ = new C6113cJ(ti.a, obj, str);
|
|
C14957gcv.e(hBt, "");
|
|
C14957gcv.e(lWm, "");
|
|
C14957gcv.e(c6113cJ, "");
|
|
c15863jI.b(c15863jI.e, hBt, lWm, new tPH.IeS(c6113cJ));
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void h() {
|
|
startActivity((Intent) HomeActivity.e(new Object[]{getContext()}, -1290522472, 1290522474, (int) System.currentTimeMillis()));
|
|
}
|
|
|
|
@Override // o.InterfaceC9477dkV.RVV
|
|
public final void d(TJ tj) {
|
|
C14957gcv.e(tj, "");
|
|
Context context = getContext();
|
|
if (context != null) {
|
|
NsipPartnerPaymentReviewActivity.LWm lWm = NsipPartnerPaymentReviewActivity.b;
|
|
C14957gcv.e(context, "");
|
|
C14957gcv.e(tj, "");
|
|
Intent intent = new Intent(context, (Class<?>) NsipPartnerPaymentReviewActivity.class);
|
|
intent.putExtra("EXTRA_NSIP_VERIFICATION", tj);
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
intent.putExtras(arguments);
|
|
}
|
|
context.startActivity(intent);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onDestroy() {
|
|
super.onDestroy();
|
|
C7210cjw c7210cjw = this.presenter;
|
|
if (c7210cjw == null) {
|
|
C14957gcv.a("");
|
|
c7210cjw = null;
|
|
}
|
|
c7210cjw.w_();
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
static final class HBt extends AbstractC14961gcz implements InterfaceC14890gbN<C17437wka> {
|
|
public static final HBt a = new HBt();
|
|
|
|
@Override // o.InterfaceC14890gbN
|
|
public final /* synthetic */ C17437wka invoke() {
|
|
return new C17437wka();
|
|
}
|
|
|
|
HBt() {
|
|
super(0);
|
|
}
|
|
}
|
|
}
|