PayReq request = new PayReq();
request.appId = payObject.getString("appid");
request.partnerId = payObject.getString("partnerid");
request.prepayId= payObject.getString("prepayid");
request.packageValue = payObject.getString("package");
request.nonceStr= payObject.getString("noncestr");
request.timeStamp= payObject.getString("timestamp");
request.sign= payObject.getString("sign");
MyIWXAPI.getInstance().sendReq(request);
支付调用代码
@Override
public void onResp(BaseResp resp) {
int result = 0;
Log.e("blx", "resp" + resp.errCode);
}
@Override
public void onReq(BaseReq req) {
Log.e("blx", "req" + req.getType());
}
WXEntryActivity页面中的onReq,onResp方法均为走log日志
以及项目中WXEntryActivity的位置