收藏
回答

微信支付沙箱测试问题 调用 wx.requestPayment 报JSPAI缺少参数:total_f

微信小程序 JSAPI支付 沙箱 调用 wx.requestPayment 报JSPAI缺少参数:total_fee

后台统一下单已经成功

后台返回数据:

{"timeStamp":"1639993659","package":"prepay_id=wx20211220174417215893","paySign":"DFB92331B5A6D8F9A9FB3435896B96E8","appId":"wx****e909de65****","signType":"MD5","nonceStr":"USgfiEhXv0OPCgnL5ThPMtjMhu2GwbG6"}

wx.requestPayment方法内的参数定义如下:

payargs={timeStamp: "1639993460", package: "prepay_id=wx20211220174417215893", paySign: "DFB92331B5A6D8F9A9FB3435896B96E8", appId: "wx****e909de65****", signType: "MD5", nonceStr: "USgfiEhXv0OPCgnL5ThPMtjMhu2GwbG6"}


wx.requestPayment(

          {

          "timeStamp":payargs.timeStamp,

          "nonceStr": payargs.nonceStr,

          "package": payargs.package,

          "signType": payargs.signType,

          "paySign": payargs.paySign,


          "success":function(res){

    },

回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容