小程序调用支付报错:jsapi缺少参数: total_fee

这种情况通常是因为在调用的时候,package参数有问题导致;

wx.requestPayment中package参数必须是package:"prepay_id=wx21**************",不然,会出现调用支付JSAPI缺少appid/total_fee;

正常情况下:

//{"appid":"wx0411fa6a39d61297","noncestr":"3reA4pSqGBPPryEL","package":"Sign=WXPay","partnerid":"1230636401","prepayid":"wx20170406175858b261288c050041764688","timestamp":1491472738,"sign":"4A50B67D47E062A1F3B739D76C683D37"}
//{"appid":"wx05a63e391546d945","noncestr":"Uvxaj0yZeE5uw0Wd","package":"Sign=WXPay","partnerid":"1460680002","prepayid":"wx201704221807041af49e25c90779187614","timestamp":1492855550,"sign":"08FB66188544D438DF074F815EB585DF"}

如下出现问题:

 

技术分享图片

技术分享图片

小程序调用支付报错:jsapi缺少参数: total_fee

以上是小程序调用支付报错:jsapi缺少参数: total_fee的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>