正在查看: Kaspi.kz v5.85.1 应用的 OpenUrlAction.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kaspi.kz v5.85.1 应用的 OpenUrlAction.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.iap.android.mppclient.mpm.action;
import android.os.Bundle;
import android.text.TextUtils;
import com.iap.android.mppclient.container.ACContainer;
import com.iap.android.mppclient.container.WebContainer;
import com.iap.android.mppclient.container.model.ContainerParams;
import com.iap.android.mppclient.container.provider.ContainerUaProvider;
import com.iap.android.mppclient.mpm.callback.IActionCallback;
import com.iap.android.mppclient.mpm.model.AcDecodeConfig;
import com.iap.android.mppclient.mpm.plugin.GetAuthCodePlugin;
import com.iap.android.mppclient.mpm.plugin.PageEventPlugin;
import com.iap.android.mppclient.mpm.plugin.TradePayPlugin;
import com.iap.android.mppclient.mpm.provider.UAProvider;
import com.iap.android.mppclient.mpm.request.OpenUrlRequest;
import com.iap.android.mppclient.mpm.response.OpenUrlResponse;
public class OpenUrlAction extends BaseAction<OpenUrlRequest, OpenUrlResponse> {
@Override
public void handleAction(OpenUrlRequest openUrlRequest, IActionCallback<OpenUrlResponse> iActionCallback) {
AcDecodeConfig parseConfig;
UAProvider.mockUserAgent(openUrlRequest.userAgent);
String str = openUrlRequest.openUrl;
String str2 = openUrlRequest.acDecodeConfig;
OpenUrlResponse openUrlResponse = new OpenUrlResponse();
if (TextUtils.isEmpty(str)) {
openUrlResponse.resultCode = "1001";
openUrlResponse.resultMessage = "PARAM_ILLEGAL: mpm launch url is illegal";
} else {
try {
if (str.startsWith("http://") && !TextUtils.isEmpty(str2) && (parseConfig = AcDecodeConfig.parseConfig(str2)) != null && parseConfig.forceHttps.booleanValue()) {
str = str.replaceFirst("http://", "https://");
}
ContainerParams containerParams = new ContainerParams(str);
Bundle bundle = new Bundle();
containerParams.containerBundle = bundle;
bundle.putString("bizScenario", "ACCode");
containerParams.containerBundle.putString("AcBizProcessorKey", openUrlRequest.bizKey);
containerParams.containerBundle.putBoolean("preInjectJSBridge", true);
containerParams.containerBundle.putBoolean("enableLocalCache", true);
containerParams.containerBundle.putString("acDecodeConfig", str2);
containerParams.containerBundle.putString("h5ErrorPageURL", "https://render.alipay.com/p/yuyan/180020010001253580/exception_system_error.html");
WebContainer.INSTANCE.setContainer(ACContainer.INSTANCE, "MPPAlipayPlusClient");
WebContainer.getInstance("MPPAlipayPlusClient").setProvider(ContainerUaProvider.class.getName(), new UAProvider());
WebContainer.getInstance("MPPAlipayPlusClient").registerPlugin(new PageEventPlugin());
WebContainer.getInstance("MPPAlipayPlusClient").registerJSAPIPlugin(new TradePayPlugin());
WebContainer.getInstance("MPPAlipayPlusClient").registerJSAPIPlugin(new GetAuthCodePlugin());
WebContainer.getInstance("MPPAlipayPlusClient").startContainer(openUrlRequest.context, containerParams, openUrlRequest.listener);
openUrlResponse.isSuccess = true;
} catch (Throwable th) {
th.printStackTrace();
openUrlResponse.resultCode = "1003";
openUrlResponse.resultMessage = "SYSTEM_ERROR:open mpm launch url failed";
}
}
iActionCallback.onResult(openUrlResponse);
}
}