游戏配置:货币单位1:10
调用方法:wx.requestMidasPayment({
mode: "game",
env: 1,
offerId: "1450030327",
currencyType: "CNY",
platform: "android",
buyQuantity: 10,
zoneId: "1",
success: (res) => {
console.log("==============支付成功=====")
console.log(res)
}, // 接口调用成功的回调函数
fail: (res) => {
console.log("==============支付失败=====")
console.log(res)
}, // 接口调用失败的回调函数
complete: () => { },
});
返回结果:
检查一下参数,必需是文档中给出的整数才行:
https://developers.weixin.qq.com/minigame/dev/api/midas-payment/wx.requestMidasPayment.html
已设置商户号,沙箱环境😂