我的小程序商城尝试调用云函数cloudpay.unifiedOrder()进行微信支付,我输入参数如下,返回的结果并没有错误信息,但开发工具里并没有跳出扫码支付界面,真机也没有发生任何实际支付。请问这是为什么?返回代码在下面
"body" : "XXX",
"outTradeNo" : "20150806125346",
"spbillCreateIp" : "127.0.0.1",
"subMchId" : "XXXXXX",
"totalFee" : 100,
"envId": "XXX-XXX",
"functionName": "payback",
"nonceStr" : "5K8264ILTKCH16CQ2502SI8ZNMTM67VS",
"tradeType" : "JSAPI"
--------------------------------------------
errMsg: "cloud.callFunction:ok"
requestID: "a60bd67a-b8b5-11xxxxxxxxxxxxxxx"
result:
appid: "wxd2d16axxxxxxxxx"
errCode: 0
errMsg: "cloudPay.unifiedOrder:ok"
mchId: "1800xxxxxx"
nonceStr: "aK7Wo90oOLPnw6UI"
payment:
appId: "wx1afxxxxxxxx"
nonceStr: "aK7Wo90oOLPnw6UI"
package: "prepay_id=wx28043451441857dc87bxxxxxxxxxxxx"
paySign: "FF558C87A702083D70E4009A282991CA"
signType: "MD5"
timeStamp: "1593290091"
__proto__: Object
prepayId: "wx28043451441857dc87bxxxxxxxxxxxxx"
resultCode: "SUCCESS"
returnCode: "SUCCESS"
returnMsg: "OK"
sign: "270C3BBE6B5A19A135E744EA1D722423"
subAppid: "wx1af3fxxxxxxxx"
subMchId: "1xxxxxxxx"
tradeType: "JSAPI"
调用wx.requestPayment了吗
cloudpay.unifiedOrder() 这个api只是返回支付的数据,还需要小程序端调用wx.requestPayment
认真看看文档
若认为该回答有用,给回答者点个[ 有用 ],让答案帮助更多的人
cloudpay.unifiedOrder().then(res=>{console.log(res)}).then(res=>{console.log(res)})看看后面执行的是啥结果