正在查看: Clash Legends v0.0.1 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.payu.upisdk.util;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import com.onesignal.core.internal.config.InfluenceConfigModel;
import com.payu.otpassist.utils.Constants;
import com.payu.upisdk.BuildConfig;
import com.payu.upisdk.PaymentOption;
import com.payu.upisdk.Upi;
import com.payu.upisdk.bean.UpiConfig;
import com.payu.upisdk.callbacks.PayUUPICallback;
import io.card.payment.CreditCard;
import java.lang.reflect.Field;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.StringTokenizer;
import kotlinx.coroutines.scheduling.WorkQueueKt;
import org.json.JSONObject;
public class c {
public static String a(Context context, String str, String str2, String str3, String str4) {
String str5;
String str6 = "";
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("txnid", str4);
jSONObject.put("merchant_key", str3);
jSONObject.put("event_key", str);
jSONObject.put("event_value", URLEncoder.encode(str2, "UTF-8"));
jSONObject.put(Constants.PACKAGE_NAME, context.getPackageName());
try {
str5 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(System.currentTimeMillis()));
} catch (Exception e) {
str5 = "";
}
jSONObject.put("ts", str5);
if (!TextUtils.isEmpty(Upi.cbVersion)) {
jSONObject.put(UpiConstant.CB_VERSION_NAME, Upi.cbVersion);
}
jSONObject.put(UpiConstant.SDK_VERSION_NAME, BuildConfig.VERSION_NAME);
try {
PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
a.a("Version name " + packageInfo.versionName);
str6 = packageInfo.versionName;
} catch (PackageManager.NameNotFoundException e2) {
e2.printStackTrace();
}
jSONObject.put("application_version", str6);
return jSONObject.toString();
} catch (Exception e3) {
return "{}";
}
}
public PaymentOption b(String str) {
if (str == null) {
return null;
}
String a = a(str, "bankcode");
PaymentOption[] values = PaymentOption.values();
for (int i = 0; i < 9; i++) {
PaymentOption paymentOption = values[i];
if (paymentOption.getPaymentName().equalsIgnoreCase(a)) {
return paymentOption;
}
}
return null;
}
@Deprecated
public String a(String str, String str2) {
for (String str3 : str.split("&")) {
String[] split = str3.split("=");
if (split.length >= 2 && split[0].equalsIgnoreCase(str2)) {
return split[1];
}
}
return "";
}
public static HashMap<String, String> a(String str) {
String str2;
HashMap<String, String> hashMap = new HashMap<>();
if (str != null) {
StringTokenizer stringTokenizer = new StringTokenizer(str, "&");
while (stringTokenizer.hasMoreTokens()) {
String[] split = stringTokenizer.nextToken().split("=");
if (split != null && split.length > 0 && (str2 = split[0]) != null) {
hashMap.put(str2, split.length > 1 ? split[1] : "");
}
}
}
return hashMap;
}
public static boolean a(PaymentOption paymentOption) {
try {
c.class.getClassLoader().loadClass(paymentOption.getClassName());
return true;
} catch (ClassNotFoundException e) {
String str = "Please import " + paymentOption.getPackageName() + " to make Payment by " + paymentOption.toString();
synchronized (a.class) {
if (!Log.isLoggable("PAYU", 6)) {
return false;
}
Log.e("PAYU", str + "");
return false;
}
}
}
public static String a(Context context) {
if (context != null) {
try {
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
if (activeNetworkInfo.getType() == 1) {
return "WIFI";
}
if (activeNetworkInfo.getType() == 0) {
switch (activeNetworkInfo.getSubtype()) {
case 1:
return "GPRS";
case 2:
return "EDGE";
case 3:
case 5:
case 6:
case 8:
case 9:
case InfluenceConfigModel.DEFAULT_NOTIFICATION_LIMIT:
return "HSPA";
case 4:
return "CDMA";
case 7:
case 11:
return "2G";
case 12:
case 14:
case CreditCard.EXPIRY_MAX_FUTURE_YEARS:
return "3G";
case 13:
return "4G";
default:
return "?";
}
}
}
return "Not connected";
} catch (Exception e) {
}
}
return "?";
}
public final void a(String str, String str2, String str3) {
if (str2 != null) {
try {
if (str2.trim().equals("")) {
return;
}
Field declaredField = Class.forName(str).getDeclaredField(str3);
declaredField.setAccessible(true);
declaredField.set(null, str2);
declaredField.setAccessible(false);
} catch (Exception e) {
}
}
}
public static void a(Activity activity) {
try {
Bundle bundle = activity.getPackageManager().getApplicationInfo(activity.getPackageName(), WorkQueueKt.BUFFER_CAPACITY).metaData;
String str = bundle.getString(UpiConstant.PAYU_WEB_SERVICE_URL, UpiConstant.PRODUCTION_FETCH_DATA_URL) + UpiConstant.MERCHANT_POST_SERVICE_FORM;
String str2 = bundle.getString(UpiConstant.PAYU_POST_URL, "https://secure.payu.in") + UpiConstant._PAYMENT;
com.payu.upisdk.b bVar = com.payu.upisdk.b.SINGLETON;
UpiConfig upiConfig = bVar.c;
if (upiConfig != null) {
if (TextUtils.isEmpty(upiConfig.getPostUrl())) {
bVar.c.setPostUrl(str2);
}
bVar.c.setWebServiceUrl(str);
return;
}
UpiConfig upiConfig2 = new UpiConfig();
bVar.c = upiConfig2;
upiConfig2.setPostUrl(str2);
bVar.c.setWebServiceUrl(str);
PayUUPICallback payUUPICallback = bVar.f;
if (payUUPICallback != null) {
payUUPICallback.onUpiErrorReceived(1022, UpiConstant.PROVIDED_UPI_CONFIG_NULL + c.class.getSimpleName());
}
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
}
public static boolean a(String str, Context context) {
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.setPackage(str);
intent.setData(Uri.parse(UpiConstant.UPI_INTENT_DATA));
return context.getPackageManager().resolveActivity(intent, 65536) != null;
}
}