写了一个创建支付的云函数,调用的是 CloudPay.unifiedOrder(),小程序内调用是正常的,然后开启http访问,通过接口访问进来会报错,这个怎么解决呢
errMsg: unifiedOrder:fail missing wxCloudApiToken↵
Code: -1↵ScfRequestId: e25a75f8-2b06-11ec-aa1e-72719d3f4a74↵Error:↵Error: errCode: -501007 invalid parameters | errMsg: unifiedOrder:fail missing wxCloudApiToken↵ at callGeneralOpenAPI (/var/user/node_modules/wx-server-sdk/index.js:426:19)↵ at processTicksAndRejections (internal/process/task_queues.js:97:5)↵ at async callCloudPayAPI (/var/user/node_modules/wx-server-sdk/index.js:901:28)↵ at async Runtime.exports.main [as handler] (/var/user/index.js:12:17). For more information, please refer to https://docs.cloudbase.net/error-code/service.htm
解决不了,http调用没用户态,微信内访问才能用云调用
目测不能通过签权。