收藏
回答

特约商户进StatusCode: 400, ReasonPhrase: 'Bad Request'?

调用接口:https://api.mch.weixin.qq.com/v3/certificates

请求信息:{Method: GET, RequestUri: 'https://api.mch.weixin.qq.com/v3/certificates', Version: 1.1, Content: <null>, Headers:{  Authorization: WECHATPAY2-SHA256-RSA2048 mchid="1520812001",nonce_str="ncmy4ymj.t0b",timestamp="1604154531",serial_no="7E035D22E9BDA25D6AB8A952C9B2918DE8E4B28F",signature="BvhzYN/gRnyM2lthJHiQuAzocX0IGTErzt7de9Gl8FXwXvf5RVpBSPNBSTVdT8LVYkvYEP6Cj10vq7oTsiNllVBIlGGedbl47/iyU7nTzQ0iYvololyojcITzLcciRkq/KVuo6yu6ZNVP5t4R2WgX5dr6wg2RQOuIRSTkfBvWS5wSte7ruyvgR+nReAatrn/QHJ0pE0S5BynypleQCgBoQ65GPQ1lpumeDehCYqCEiTT8UuYQ0IbJ5MMMHFnj/m1sye6E4M4/deHuFfmWDDLP4GgldVHF5y6kLoFKRVu5QllrSJahAqc2lJeGweZyIPl9k1TJt34qWte4gAtlINm8g=="}}

返回信息:Id = 5, Status = RanToCompletion, Method = "{null}", Result = "StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:\r\n{\r\n  Connection: keep-alive\r\n  Keep-Alive: timeout=8\r\n  X-Content-Type-Options: nosniff\r\n  Request-ID: 08CFE8F5FC0510E703189DC4C24820E72628FCBE05-270924291\r\n  Cache-Control: must-revalidate, no-cache\r\n  Date: Sat, 31 Oct 2020 14:27:27 GMT\r\n  Server: nginx\r\n  Content-Length: 71\r\n  Content-Language: zh-CN\r\n  Content-Type: application/json; charset=utf-8\r\n}"

使用POSTMAN可以通,但程序死活通不了。

我用的代码就是文档中的代码:https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/qian-ming-sheng-cheng (拉到最下面的.Net代码)。


回答关注问题邀请回答
收藏
登录 后发表内容
问题标签