服务商功能 接入商户进件接口提示"message”:"Http头Authorization值格式错误
[图片] 部分代码: String auth = " WECHATPAY2-SHA256-RSA2048 mchid=\""+merchantId+"\",nonce_str=\""+ nonce +"\",signature=\"" +sign + "\",timestamp=\"" +String.valueOf(timestamp) + "\",serial_no=\"" + getSerialNumber() + "\"";
//String auth = PayKit.getAuthorization(merchantId,getSerialNumber(),nonce,String.valueOf(timestamp),sign,"WECHATPAY2-SHA256-RSA2048");
/*String auth = "WECHATPAY2-SHA256-RSA2048 "
+ "mchid=\""+merchantId+"\",timestamp=\""+ timestamp +"\",nonce_str=\"" +nonce + "\",serial_no=\"" + getSerialNumber() + "\",signature=\"" + sign + "\"";*/
System.out.println("======================");
System.out.println(auth);
System.out.println("======================");
String url = "https://api.mch.weixin.qq.com/v3/applyment4sub/applyment/";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost(url);
String res = "";
try {
StringEntity strEntity = new StringEntity(body, "utf-8");
strEntity.setContentEncoding("UTF-8");
strEntity.setContentType("application/json");
//下面几个Header必须设置
httppost.addHeader("Authorization", auth);
httppost.addHeader("Content-Type", "application/json");
httppost.addHeader("Accept", "application/json");
//这里的User-Agent根据自己的实际情况来
// httppost.addHeader("User-Agent", "WeChatPay-IJPay-HttpClient/4.5 (Windows 10/10.0) Java/1.8.0_221");
//微信平台证书序列号
httppost.addHeader("Wechatpay-Serial", getPlatSerialNumber());
=================================== b不知道哪里出了问题了,弄了好久,Authorization应该怎么填?还是应该怎么处理