|
贴过来x5中外卖案例中的微信支付代码,调用weixin.v3插件,打包上去后出现下面的问题
,出现支付失败的提示,下面是我的代码 require("cordova!com.justep.cordova.plugin.weixin.v3");
Model.prototype.payOrderByWeixin = function(payDtd, orderID) {
if (!navigator.weixin) {
return;
}
var notifyUrl = location.origin;
var traceID = justep.UUID.createUUID();
var traceNo = justep.UUID.createUUID();
var weixin = navigator.weixin;
weixin.generatePrepayId({
"body" : "新希望",
"feeType" : "1",
"notifyUrl" : notifyUrl,
"totalFee" : "1",
"traceId" : traceID,
"tradeNo" : traceNo
}, function(prepayId) {
weixin.sendPayReq(prepayId, function(message) {
var responseCode = parseInt(message);
alert("成功")
}, function(message) {
justep.Util.hint("微信支付失败!");
});
}, function(message) {
justep.Util.hint("微信支付失败!");
});
// this.comp("paidanPopOver").show();
};
打包的时候在插件中填写了微信需要的四个ID,可还是出不来,请问是什么问题
|
|