导航菜单

页面标题

页面副标题

Minits v4.9.3.32 - WebViewPaymentActivity.java 源代码

正在查看: Minits v4.9.3.32 应用的 WebViewPaymentActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.redsys.tpvvinapplibrary.webviewPayment;

import android.graphics.Color;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ProgressBar;
import com.google.android.material.snackbar.Snackbar;
import com.redsys.tpvvinapplibrary.ErrorResponse;
import com.redsys.tpvvinapplibrary.R;
import com.redsys.tpvvinapplibrary.ResultResponse;
import com.redsys.tpvvinapplibrary.TPVV;
import com.redsys.tpvvinapplibrary.TPVVConfiguration;
import com.redsys.tpvvinapplibrary.TPVVConstants;
import com.redsys.tpvvinapplibrary.b.d;
import com.redsys.tpvvinapplibrary.p.c;
import com.redsys.tpvvinapplibrary.webviewPayment.TPVVWebViewClient;
import g.AbstractActivityC2092c;

public class WebViewPaymentActivity extends AbstractActivityC2092c implements com.redsys.tpvvinapplibrary.webviewPayment.a {

    public WebView f196do;

    public c f197for;

    public ProgressBar f198if;

    public class a implements View.OnClickListener {
        public a() {
        }

        @Override
        public final void onClick(View view) {
            WebViewPaymentActivity.this.onBackPressed();
        }
    }

    public final void m133do(TPVVWebViewClient.b bVar, String str, byte[] bArr) {
        this.f196do.getSettings().setJavaScriptEnabled(true);
        this.f196do.getSettings().setDomStorageEnabled(true);
        this.f196do.setScrollBarStyle(33554432);
        this.f196do.setWebViewClient(new TPVVWebViewClient(bVar, this));
        this.f196do.postUrl(str, bArr);
    }

    @Override
    public final void onBackPressed() {
        c cVar = this.f197for;
        ResultResponse resultResponse = cVar.f206goto;
        if (resultResponse != null) {
            try {
                TPVV.mCallback.paymentResultOK(resultResponse);
            } catch (Exception e8) {
                e8.getMessage();
            }
            ((WebViewPaymentActivity) cVar.f203do).finish();
        }
        ErrorResponse errorResponse = cVar.f204else;
        if (errorResponse != null) {
            try {
                TPVV.mCallback.paymentResultKO(errorResponse);
            } catch (Exception e9) {
                e9.getMessage();
            }
            ((WebViewPaymentActivity) cVar.f203do).finish();
        }
        if (cVar.f209this.booleanValue()) {
            try {
                TPVV.mCallback.paymentResultKO(new ErrorResponse(TPVVConstants.CODE_GENERIC_ERROR, "No se pudo realizar la operación: Error en datos enviados."));
            } catch (Exception e10) {
                e10.getMessage();
            }
            ((WebViewPaymentActivity) cVar.f203do).finish();
        }
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_web_view_payment);
        this.f196do = (WebView) findViewById(R.id.wv_webviewPayment);
        this.f198if = (ProgressBar) findViewById(R.id.pb_progressbar);
        c cVar = new c(this, new com.redsys.tpvvinapplibrary.p.a(), new com.redsys.tpvvinapplibrary.p.c(d.m8do(com.redsys.tpvvinapplibrary.d.c.m10do(this))), com.redsys.tpvvinapplibrary.b.m4do());
        this.f197for = cVar;
        String environment = TPVVConfiguration.getEnvironment();
        String str = environment == "0" ? "https://sis-d.redsys.es/sis/realizarPago" : "";
        if (environment == "1") {
            str = "https://sis-i.redsys.es:25443/sis/realizarPago";
        }
        if (environment == TPVVConstants.ENVIRONMENT_REAL) {
            str = "https://sis.redsys.es/sis/realizarPago";
        }
        if (environment == TPVVConstants.ENVIRONMENT_TEST) {
            str = "https://sis-t.redsys.es:25443/sis/realizarPago";
        }
        TPVVConstants.FLAG_OVERRIDE_URL_WEBVIEW = true;
        ((WebViewPaymentActivity) cVar.f203do).f198if.setVisibility(0);
        cVar.f208new.m5do(cVar.f205for, new c.a(), new b(cVar, str));
        if (TPVVConfiguration.getProgressBarColor() != null) {
            this.f198if.getIndeterminateDrawable().setColorFilter(Color.parseColor(TPVVConfiguration.getProgressBarColor()), PorterDuff.Mode.MULTIPLY);
        }
    }

    public final void m134do(String str, String str2, int i8) {
        Snackbar.l0(findViewById(android.R.id.content), str2, -2).o0(i8).n0(str, new a()).X();
    }
}