请求数据统一下单接口的参数:[{{"nonce_str":"HD20191213095858082506","out_trade_no":"HD20191213095858082506","appid":"appid","total_fee":"4000","sign":"62278AB2AE68A19211DB896E787FF3D4","trade_type":"APP","mch_id":"1555064671","body":"商城购物","notify_url":"http://test.url.com","spbill_create_ip":"ip"}}]
微信返回数据:[{{nonce_str=uSDseVLuL1W4k9S6, sign=BCB9C2C01B02C9604FB7C74BAE898B84, return_msg=OK, mch_id=mch_id, prepay_id=wx13095858379897e7a41acd311295680400, appid=appid, trade_type=APP, result_code=SUCCESS, return_code=SUCCESS}}]
返回给客户端的数据:{package=Sign=WXPay, appid=appid, sign=BCCFB62F7DBFBD8DDCF39693139C43E0, partnerid=partnerid, prepayid=wx13095858379897e7a41acd311295680400, noncestr=HD20191213095858082506, timestamp=1576202338}
前端实现的方法:
let temPrams = data.info
temPrams.timestamp = parseInt(data.info.timestamp)
plus.payment.request(
this.channel,
temPrams,
res => {
plus.nativeUI.alert('支付成功!', function() {
})
},
error => {
plus.nativeUI.alert('支付失败:' + error.code)
}
)
客户端错误截图:
期待各路大神的回复!
你好,微信支付相关问题麻烦在微信支付专区提问,我们有专门的人员处理
微信支付专区:https://developers.weixin.qq.com/community/pay
这里不是hbuild交流区,你去hbuild社区问问吧