收到结果如下:
不知道这个两个是什么参数???或者我缺什么步骤?
传到云函数的值:
let xml = {
"appid": appid,
"out_batch_no": nonce_str,
"batch_name": desc,
"batch_remark": desc,
"total_amount": amount,
"total_num": 1,
"transfer_detail_list": [
{
"out_detail_no": nonce_str,
"transfer_amount": amount,
"transfer_remark": desc,
"openid": yonghu_openid,
}
]
}
云函数:
exports.main = async (event, context) => {
console.log('event', event)
let xm = JSON.stringify(event.xml)
return await rp({
url: event.url,
method: 'POST',
body: xm,
}).then(res => {
return res
}).catch(err => {
return err
})
}
返回结果:
error: "{"code":"INVALID_REQUEST","message":"Http头缺少Accept或User-Agent"}",
解决了,谢谢