这是我的请求参数:
{
"combine_appid": "wx3b56d***eb6ba47c",
"combine_mchid": "14***24672",
"combine_out_trade_no": "WXCOMBINE1596528777326",
"combine_payer_info": {
"openid": "o7hp206PcK9J***X76aPPCS5x4"
},
"notify_url": "http://*****.com.cn/pay/combinPay/notifyUrl",
"scene_info": {
"device_id": "1111111",
"payer_client_ip": "49.73.***.207"
},
"sub_orders": [
{
"amount": {
"currency": "CNY",
"total_amount": 4
},
"attach": "附加信息",
"description": "合单支付",
"mchid": "14884**672",
"out_trade_no": "WXCOMBINE1596528777326-1",
"settle_info": {
"profit_sharing": true,
"subsidy_amount": 1
},
"sub_mchid": "1489***082"
}
],
"time_expire": "2020-08-04T16:42:57+08:00",
"time_start": "2020-08-04T16:12:57+08:00"
}
这是官方的示例参数:
{
"combine_out_trade_no": "1217752501201407033233368018",
"combine_mchid": "1230000109",
"combine_appid": "wxd678efh567hg6787",
"scene_info": {
"device_id": "POS1:1",
"payer_client_ip": "14.17.22.32"
},
"sub_orders": [
{
"mchid": "1230000109",
"attach": "深圳分店",
"amount": {
"total_amount": 10,
"currency": "CNY"
},
"out_trade_no": "20150806125346",
"sub_mchid": "1900000109",
"description": "腾讯充值中心-QQ会员充值"
}
],
"combine_payer_info": {
"openid": "oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"
},
"time_start": "2018-06-08T10:34:56+08:00",
"time_expire": "2018-06-08T10:34:56+08:00",
"notify_url": "https://yourapp.com/notify",
}
参数比对过了,没有问题,但是我请求就返回下面信息,就算出错了,那也要告诉我哪里错误。
返回错误信息:
HttpResponseProxy{HTTP/1.1 400 Bad Request [Server: nginx, Date: Tue, 04 Aug 2020 08:12:57 GMT, Content-Type: application/json; charset=utf-8, Content-Length: 71, Connection: keep-alive, Keep-Alive: timeout=8, Cache-Control: no-cache, must-revalidate, X-Content-Type-Options: nosniff, Request-ID: kinag6, Content-Language: zh-CN] ResponseEntityProxy{[Content-Type: application/json; charset=utf-8,Content-Length: 71,Chunked: false]}}
Http头缺少Accept或User-Agent,麻烦核实请求是否有问题。参考https://wechatpay-api.gitbook.io/wechatpay-api-v3/ren-zheng/qian-ming-he-zheng-sh
验证签名工具:
链接:https://pan.baidu.com/s/1ixOAnYyZVW13dFr0jWVpvw
提取码:wujv
用工具进行排查签名
检查一下参数都正确吗