导航菜单

页面标题

页面副标题

OLX India v19.42.007 - PayUOtpAssist.java 源代码

正在查看: OLX India v19.42.007 应用的 PayUOtpAssist.java JAVA 源代码文件

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


package com.payu.otpassist;

import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import com.payu.otpassist.listeners.PayUOtpAssistCallback;
import com.payu.otpassist.utils.Constants;
import com.payu.otpassist.utils.c;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.Intrinsics;

@Metadata
public final class PayUOtpAssist {
    public static final PayUOtpAssist INSTANCE = new PayUOtpAssist();

    @JvmStatic
    public static final void open(Context context, PayUOtpAssistCallback payUOtpAssistCallback, PayUOtpAssistConfig payUOtpAssistConfig) {
        String j;
        String str;
        String postData = payUOtpAssistConfig.getPostData();
        if (postData == null || postData.length() == 0) {
            throw new Exception(Constants.POSTDATA_MISSING);
        }
        e0.b = payUOtpAssistCallback;
        boolean isProduction = payUOtpAssistConfig.isProduction();
        com.payu.otpassist.models.a aVar = com.payu.otpassist.models.a.SECURE;
        com.payu.otpassist.models.p pVar = com.payu.otpassist.models.p.PAYMENT_URL;
        if (isProduction) {
            j = Intrinsics.j("", c.a.a[aVar.ordinal()] == 1 ? Constants.PROD_BASE_SECURE_URL : Constants.PROD_BASE_INFO_URL);
        } else {
            int i = c.a.a[aVar.ordinal()];
            j = Intrinsics.j("", "https://test.payu.in/");
        }
        int ordinal = pVar.ordinal();
        if (ordinal == 0) {
            str = Constants.PAYMENT_URL_PATH;
        } else {
            if (ordinal != 1) {
                throw new NoWhenBranchMatchedException();
            }
            str = Constants.CHECK_SECURE_TXN_PATH;
        }
        payUOtpAssistConfig.setPaymentUrl(Intrinsics.j(j, str));
        e0.c = payUOtpAssistConfig;
        if (payUOtpAssistConfig.getMerchantLogo() == null) {
            ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128);
            payUOtpAssistConfig.setMerchantLogo(context.getPackageManager().getResourcesForApplication(applicationInfo).getDrawableForDensity(applicationInfo.icon, 640, null));
        }
        Intent intent = new Intent(context, (Class<?>) PayUOtpAssistActivity.class);
        intent.putExtra("post_data", payUOtpAssistConfig.getPostData());
        context.startActivity(intent);
    }

    public final Fragment openSeamless(Context context, PayUOtpAssistCallback payUOtpAssistCallback, PayUOtpAssistConfig payUOtpAssistConfig) {
        String j;
        String str;
        String postData = payUOtpAssistConfig.getPostData();
        if (postData == null || postData.length() == 0) {
            throw new Exception(Constants.POSTDATA_MISSING);
        }
        e0.b = payUOtpAssistCallback;
        boolean isProduction = payUOtpAssistConfig.isProduction();
        com.payu.otpassist.models.a aVar = com.payu.otpassist.models.a.SECURE;
        com.payu.otpassist.models.p pVar = com.payu.otpassist.models.p.PAYMENT_URL;
        if (isProduction) {
            j = Intrinsics.j("", c.a.a[aVar.ordinal()] == 1 ? Constants.PROD_BASE_SECURE_URL : Constants.PROD_BASE_INFO_URL);
        } else {
            int i = c.a.a[aVar.ordinal()];
            j = Intrinsics.j("", "https://test.payu.in/");
        }
        int ordinal = pVar.ordinal();
        if (ordinal == 0) {
            str = Constants.PAYMENT_URL_PATH;
        } else {
            if (ordinal != 1) {
                throw new NoWhenBranchMatchedException();
            }
            str = Constants.CHECK_SECURE_TXN_PATH;
        }
        payUOtpAssistConfig.setPaymentUrl(Intrinsics.j(j, str));
        e0.c = payUOtpAssistConfig;
        if (payUOtpAssistConfig.getMerchantLogo() == null) {
            ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128);
            payUOtpAssistConfig.setMerchantLogo(context.getPackageManager().getResourcesForApplication(applicationInfo).getDrawableForDensity(applicationInfo.icon, 640, null));
        }
        Bundle bundle = new Bundle();
        bundle.putString("post_data", payUOtpAssistConfig.getPostData());
        OtpAssistFragment.Companion.getClass();
        OtpAssistFragment otpAssistFragment = new OtpAssistFragment(null);
        otpAssistFragment.setArguments(bundle);
        return otpAssistFragment;
    }
}