|
发表于 2016-12-20 22:45:57
|
显示全部楼层
本帖最后由 大苏-3区 于 2016-12-20 22:49 编辑
我也遇到类似问题。
问题描述:
在android手机上进行支付都正常(无论中间是否取消支付),在iphone上发起单次支付执行也正常,但是iphone在执行下面操作的时候报错:
1。发起支付流程
2。在输入支付密码界面,点击左上角的关闭按钮退出,系统跳转到业务页面
3。再次发起支付,出现问题 “ 调用支付jsapi缺少参数 appid”
代码如下:
var _body = this.getContext().getRequestParameter("body");
var _tradeNo = this.getContext().getRequestParameter("tradeNo");
var _totalFee = this.getContext().getRequestParameter("totalFee");
var _userId = this.getContext().getRequestParameter("userid");
var notifyUrl = location.origin + "/baas/weixin/weixin/notify";
var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx**********1&redirect_uri=http%3a%2f%2f*****.com%2f**********%2findex.html&"
+ "response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
//alert("begin pay: " + _body + "|" + _tradeNo + "|" + _totalFee);
wxPay.pay({
body : _body,
mchId : "**********",
notifyUrl : notifyUrl,
outTradeNo : _tradeNo,
totalFee : _totalFee,
success : function(e) {
//alert(JSON.stringify(e))
justep.Baas.sendRequest({
"url" : "/*****/**********",
"action" : "PayFee",
"async" : false,
"params" : {userid:_userId, fee:_totalFee},
"success" : function(data) {
if(data.result == "ok"){
//alert("支付成功");
}
}
});
window.location.href = url;
},
cancel : function(e) {
//alert(JSON.stringify(e))
//alert("支付取消");
window.location.href = url;
},
fail : function(e) {
//alert(JSON.stringify(e))
//alert("支付失败");
window.location.href = url;
}
});
};
|
|