这个请求有错吗?为啥一致报401?
wx.request({
url: 'https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi',
method: 'POST',
header:{
Authorization:'WECHATPAY2-SHA256-RSA2048 mchid="商户号ID",nonce_str="fdgdgdgdgd",timestamp="1611041033",serial_no="商户号证书序列号",signature="使用apiclient_cert.pem加密的字符串(格式:HTTP请求方法\nURL\n请求时间戳\n请求随机串\n请求报文主体\n)"',
"Content-Type": "application/json",
},
data: {
appid: "wx7eaf5be3a32r3f45",
mchid: "1630408944",
description: "ggggggg",
out_trade_no: "123456789",
notify_url: "https://www.utimer.top",
amount: {
total: 1,
currency: "CNY"
},
payer: {
openid: "o1FyW5YCbFWXvOgnuzNnPNlgdddg"
}
},
success (res) {
console.log(res.data);
}
});