收藏
回答

小程序下单,首次请求下单prepay_id返回成功,后面几次都返回400 Bad Request?

首次下单请求头Authorization: WECHATPAY2-SHA256-RSA2048 mchid="1572014878",nonce_str="v2m5iuR8IQ6UnhWomYHeyvXwRPMfyZEl",timestamp="1712738053",serial_no="6D742FD03E7C450D77864A45B6A6B45A531484FB",signature="1jXxfzzAPbruf0ucgtesE5e2qip2rACxNpqmk/uEVIUx6+Susai3LIc8JkQ1w6XF5uXAwFam40TGNq579/aPlt1mPXvK7cXf60Ri/S/K4aTQMbc6kglWTEqzoGJsOr47aG44ACvCeK8SoAWA4lhaIQ15/2aS1/1MBoMoMXMC/y8ECYsOF3uO7qlwNLqctU2Zl8omkkmuVRT6n8QccCX8w6VyVoy293NI0hT/SqVi+IqJa0vifQcHSJ0xczn10WYZvZntrVjykGKRvYKxAX9DBkN96t9tkE+GauM+kOeWMTKypBLJAE1152dpXsZ9ilHLXY+XmK/pgYNwHcGwyUzhjw==" 返回成功,result = {"prepay_id":"wx1016345501300111d6ae05c06ccf790000"}。

后面多个同样格式的请求头Authorization: WECHATPAY2-SHA256-RSA2048 mchid="1572014878",nonce_str="efActmGZ9wbW82AKEmllJeCeb7M3Bs3p",timestamp="1712738185",serial_no="6D742FD03E7C450D77864A45B6A6B45A531484FB",signature="LdMPXicifz0ySxNGfG/vV38Jw/V84EIQoUu5e3YjUkEfyjpVBBpWU9/tSU4aKCRzwXdCl7kLk0SNQlXutkN9b0LSCYM39+YiLW+FGaqlcB8gBXCKhQS3DWFdYSHDxnt2DXI16k8W5uFwdP/YzY0Gdgo9ERDLGP47F+RZ5gWxZHKQUlK2jEgBtuAKoPD/0nRX9euheDgTLe7Pq6YruVqk6VxHsdeyHRIb4INIxFP5us9N4tICjc5zJsxcYHyUEIs1V5+ue4TnnlVIPt1L3HKx5zJxMxRxrZt7pljqirni+lpdFRsKp1PiIQwzVfF4ONW4CfAp/CAxoRRxI2RXLwrTwA==",则一直报错

<html>

<head><title>400 Bad Request</title></head>

<body bgcolor="white">

<center><h1>400 Bad Request</h1></center>

<hr><center>nginx</center>

</body>

</html>

<!-- a padding to disable MSIE and Chrome friendly error page -->

<!-- a padding to disable MSIE and Chrome friendly error page -->

<!-- a padding to disable MSIE and Chrome friendly error page -->




最后一次编辑于  04-11
回答关注问题邀请回答
收藏

2 个回答

  • Memory
    Memory
    04-11

    打印一下返回body的日志就会有具体错误信息

    04-11
    有用
    回复
  • 北望沣渭
    北望沣渭
    发表于移动端
    04-11
    400是参数错误,API有返回原因,log打印看接口返回的json就晓得了
    04-11
    有用
    回复
登录 后发表内容