|
v3.4 ,支付,提示{"errMsg":"getUserInfo:fail","resultStr":"\"no code\""}
是/UI2/system/api/native/base.js中提示。
已修改了config.json文件,并返回配置成功的打印:output {"errMsg":"configk"}
{
"debug" : true,
"wxAppId" : "xxxx",
"wxJSApiUrl" : "/baas/weixin/weixin/jsapi",
"wxUserInfoUrl" : "/baas/weixin/weixin/userinfo",
"uploadActionUrl" : "$UI/system/service/doc/common/simpleFileStore.j"
}
Model.prototype.buyBtnClick = function(event){
var wxPay = require('$UI/system/api/native/wxPay');
var tradeNo = justep.UUID.createUUID();
var notifyUrl = location.origin + "/baas/weixin/weixin/notify";
wxPay.pay({
body : "系统",
mchId : "xxxxxx",
notifyUrl : notifyUrl,
outTradeNo : tradeNo,
totalFee : "1",
success : function(e) {
alert(JSON.stringify(e));
},
cancel : function(e) {
alert(JSON.stringify(e));
},
fail : function(e) {
alert(JSON.stringify(e));
}
});
1、尝试:参考文章:http://doc.wex5.com/pay-mp-step-by-step
2、检查微信配置。
网友提供:
需要通过 https://open.weixin.qq.com/connect/oauth2 跳过去才能支付。参考那篇文章的常见问题。
不知道什么意思?怎么改代码?
我在index.w页可以得到openid,支付页是另外一页pay.w,由opendialog打开。
|
|