签名都是复制的 https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/qian-ming-sheng-cheng 最下方的demo。
请求header也添加了
httpPost.addHeader("content-type", "application/json");
httpPost.addHeader("Authorization", "WECHATPAY2-SHA256-RSA2048"+" "+ sign);
httpPost.addHeader("Accept", "application/json");
请求的参数是自己模拟的,但是请求的返回码一直是400 BadRequest
麻烦提供一下完整的参数,以及单号。方便定位问题。
{"nonce_str":"D7eqtbyJWgkQ0GkV","combine_appid":"**","sub_orders":[{"amount":{"total_amount":"10","currency":"CNY"},"mchid":"**","out_trade_no":"8810120032614000001yj","profit_sharing":true,"description":"0323测试","attach":"小杨测试","sub_mchid":"8810120032614000001yj"}],"time_start":"2020-03-26T14:25:35","combine_out_trade_no":"8810120032614000001","limit_pay":"no_debit","time_end":"2020-03-26T15:25:35+0800","notify_url":"**/wxsftpay/wxsftAppPayNotify","combine_mchid":"**"}
•
签名:Ut7Vawop/NvQ5jWuKLYUOggDSvtbUE7RWZJRsLy4DC7pAaGlTxRuKz4OJv/ycXX1JUbtzvdXOVivWXKh6ry/GI1RmG/IAuLspW1XztE1FXkdlTJVJyneVsqeEo3JiKFDYV/OKddYh98iTz6ZlSsDkkoUikkjghqyJ4lNjCNkTmBcNjVXIuKnbWVgs+AAA257Z1vPut9y41AgRo8LXqFY9i2EiuxEOOU6F+frWXGfVe3AH5t7oE4vW95PnOfvhseXoYkhLIbgNx5bWwGMdFZ6VG4NbezGBB1WQ8Y2hXOpDgF191Ivq9bTuYmbnlAb34s36KhyZ0L+7bKhpjygLbQ3cg==