{'code': 'SIGN_ERROR', 'detail': {'detail': {'issue': 'sign not match'}, 'field': 'signature', 'location': 'authorization', 'sign_information': {'method': 'POST', 'sign_message_length': 310, 'truncated_sign_message': 'POST\n/v3/pay/transactions/jsapi\n1687761072\n123adsddf\n{"mchid"\n', 'url': '/v3/pay/transactions/jsapi'}}
data = {
"mchid": "",
"out_trade_no": "",
"appid": "",
"description": "123",
"notify_url": "",
"amount": {
"total": 7,
"currency": "CNY"
},
"payer": {
"openid": "oGI-b6FZwx25YFt-aMx3myunYC3s"
}
}
message = f'{http_method}\n{canonical_url}\n{timestamp}\n{nonce_str}\n{body}\n'
是body的格式问题吗?应该是什么格式啊
我觉得你还是用sdk吧https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay6_0.shtml