正在查看: 微商客 v2.1.2 应用的 WXPayEntryActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 微商客 v2.1.2 应用的 WXPayEntryActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.jianzhen.wsk.wxapi;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import com.gyf.immersionbar.ImmersionBar;
import com.jianzhen.wsk.BaseActivity;
import com.jianzhen.wsk.ui.VipActivity;
import com.jianzhen.wsk.ui.VipBuySuccessActivity;
import com.jianzhen.wsk.utils.WeChatLoginAndPayUtils;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler {
private static final String TAG = "WXEntryActivity";
private ProgressDialog mProgressDialog;
public void onReq(BaseReq baseReq) {
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
ImmersionBar.with(this).statusBarDarkFont(true).init();
WXAPIFactory.createWXAPI(this, WeChatLoginAndPayUtils.APP_ID).handleIntent(getIntent(), this);
}
public void onResp(BaseResp baseResp) {
if (baseResp.getType() == 5) {
int i = baseResp.errCode;
if (i == -1) {
BaseActivity.showCenterToast("支付失败!");
finish();
} else {
if (i == 0) {
BaseActivity.showCenterToast("支付成功!");
startActivity(new Intent(this, (Class<?>) VipBuySuccessActivity.class));
finish();
VipActivity.vipActivity.finish();
return;
}
BaseActivity.showCenterToast("支付取消!");
finish();
}
}
}
}