|

楼主 |
发表于 2017-10-30 20:09:12
|
显示全部楼层
mchId :这个参数是商户号,只能写死,定单号,我修改一下,动态生成,也是一样的,没有反应
代码如下
//付款按钮
Model.prototype.button1Click = function(event){
var url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa3f8d5cf9014130b';
url = url +'&redirect_uri=http://www.51weixinlife.com/x5/UI2/v_5643_nol_zh_CNs_d_m/kuaimai/wxpay/pub/pay1.w';
url = url +'&response_type=code&scope=snsapi_userinfo&state=STATE';
url = url + '#wechat_redirect';
window.location.href = url ;
};
//页面加载时
Model.prototype.modelLoad = function(event){
var ordeid = justep.UUID.createUUID();
var notifyUrl = location.origin + "/baas/weixin/weixin/notify";
wxPay.pay({
body : "六九汇官网商品",
mchId : "1418701902",
notifyUrl : notifyUrl,
outTradeNo : ordeid,
totalFee : 100,
success : function(e) {
//付款成功了
alert("支付成功");
},
cancel : function(e) {
alert(JSON.stringify(e));
},
fail : function(e) {
alert(JSON.stringify(e));
}
});
};
这个页面是当前的支付页面,想要实现单页支付功能,或者重定向到另外一个页面去也行,但也还是没有反应,也没有出错信息 |
|