<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
请求参数:
{"appid" : "wxad494b4cfb695596","mchid" : "1679325002","description" : "金石电子物联网流量服务购买","out_trade_no" : "171859079873000010","notify_url" : " https://fujsdz.com/wxGate", "amount" : {"total" : 1000,"currency" : "CNY"},"payer" : {"openid" : "ouHCx0r1hUL8vzmH6ER_kOc1gPi8"}}
去后台重新生成证书即可
打印返回的body内容,有具体错误信息
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
String bodyAsString = EntityUtils.toString(response.getEntity());
System.out.println(bodyAsString);