小游戏支付的时候调用wx.requestMidasPayment一直返回-15004,微信支付调用不起来
米大师 appid:1450024476
https://developers.weixin.qq.com/minigame/dev/api/midas-payment/wx.requestMidasPayment.html
console.log("[SDK]调起米大师支付");
wx.requestMidasPayment({
mode: 'game',
env: data.env,
offerId: data.offerId,
currencyType: data.currencyType,
platform: data.platform,
buyQuantity: data.buyQuantity,
zoneId: data.zoneId,
success: function (res) {
if(res.errMsg == 'requestMidasPayment:ok'){
self.gameGoPay(data);
}
},
fail: function (res) {
console.log("[SDK]"+stringify(res));
if(res.errMsg.indexOf('用户取消') !== -1){
callbacks['pay'] && callbacks['pay'](2, {errMsg: "用户取消支付"});
}else{
callbacks['pay'] && callbacks['pay'](1, {errMsg: "支付失败:" + res.errMsg});
}
},
complete: function (res) {
console.log("[SDK]"+stringify(res));
}
});
你好,请参考此贴回复:米大师支付测试返回15004,已关联商户号? - 微信开放社区 https://developers.weixin.qq.com/community/minigame/doc/0008e873ee09b030f50a9576a5b000