安卓app 调起微信支付时总是 sendReq failed for wechat app sign
安卓app调试微信拉起支付时总是报错 IWXAPI api = WXAPIFactory.createWXAPI(this, appId);
PayReq req = new PayReq();
req.appId = appId;
req.partnerId = MCH_ID;
req.prepayId = d.getPrepayId();
req.packageValue = "Sign=WXPay";
req.nonceStr = d.getNoncestr();
req.timeStamp = d.getTimestamp();
req.sign = d.getSign();
boolean b = api.sendReq(req);
if (b) {
XToastUtils.toast("已发送请求");
} else {
XToastUtils.toast("发送失败");
}
报错:
W/MicroMsg.SDK.WXMsgImplComm: validateAppSignatureForPackage ex com.tencent.mm
E/MicroMsg.SDK.WXApiImplV10: sendReq failed for wechat app signature check failed
是什么原因
appId是公众号的appid还是移动应用的appid