- 证书和回调报文解密报错?
使用官方证书和回调报文解密示例,解析微信平台证书报文报java.lang.IllegalArgumentException: Illegal base64 character 22 //创建json解析器 JsonParser parse = new JsonParser(); JsonObject json = (JsonObject) parse.parse(pcs); //json字符串解析,获取result节点 JsonObject encryptCertificate = json.get("encrypt_certificate").getAsJsonObject(); //获取节点的数值 String associatedData = encryptCertificate.get("associated_data").toString(); String ciphertext = encryptCertificate.get("ciphertext").toString(); String wxnonce = encryptCertificate.get("nonce").toString(); 这是解析获取到的报文数据,在return new String(cipher.doFinal(Base64.getDecoder().decode(ciphertext)), "utf-8");报java.lang.IllegalArgumentException: Illegal base64 character 22 请问这是什么原因啊
2022-11-25 - 证书和回调报文解密?
使用官网的示例方法对获取到的微信平台证书报文进行解密,在decryptToString方法中,使用new String(cipher.doFinal(Base64.getDecoder().decode(ciphertext)), "utf-8"); 报错java.lang.IllegalArgumentException: Illegal base64 character 22,说有非法字符 我获取的报文是这么解析的 //创建json解析器 JsonParser parse = new JsonParser(); JsonObject json = (JsonObject) parse.parse(pcs); //json字符串解析,获取result节点 JsonObject encryptCertificate = json.get("encrypt_certificate").getAsJsonObject(); //获取节点的数值 String associatedData = encryptCertificate.get("associated_data").toString(); String ciphertext = encryptCertificate.get("ciphertext").toString(); String wxnonce = encryptCertificate.get("nonce").toString(); 请问为什么解析不了呢
2022-11-25 - GET 获取平台证书列表?,
通过商户平台的私钥证书序列号生成签名,拼接请求头参数,http get 请求报400错误是为啥啊,有大佬能看一下嘛 ERROR com.wechat.pay.contrib.apache.httpclient.SignatureExec - 应答的状态码不为200-299。status code[400] request headers[[Authorization: WECHATPAY2-SHA256-RSA2048 mchid="163407xxx9",nonce_str="2CAB54F6A1EzzzD7F28B6E841F396",timestamp="1669255871",serial_no="3FCAD31E03CzzzCDEB0D03DEDAE198CC68F52FE",signature="SSxz245W/GHtTOGTig/1NBX2nZnJEnP6ogbke2xIv+UF1XAs0Gk77cgbeOu2Z9/JJAZ+MsNtrkQDW2fad1ecoZo53vZ+dLxRkBkGxp2D2OjaRvyW3q81Qs53/00L028zzzakFaW6UDOGHjMUcuMuaVI2taJi9SJDARqmMq9v6yEVjE25HDFdTjCgWVFC6YxUyGI69jdmvWX58CYUiB9qSvdRaQnT5+smQGxrjbstwSgmy7vVJQ1SD4Tzl4RuWg6w7OTPdKgH0Zi6NrQFBGAaTMnyy2yZxx3Ey6YobkvyrgK8Ow5b5rY0QaC7VCqvXPRgFItn+DqW3RVdVjJxgUQ==", Accept: application/json, User-Agent: https://zh.wikipedia.org/wiki/User_agent, Authorization: WECHATPAY2-SHA256-RSA2048 mchid="1634072xxx",nonce_str="FWresVHFaEo3WdTqG2dz034ZblOC71Ne",timestamp="1669256035",serial_no="3Fxxxxxx31ExxB0D03DEDAE198CC68F52FE",signature="pOLRB0IMPvrf3N/igMVfKTPNtnk6P4Knlf1Yh7pTsdCmtY8RV5T7Rk0Ud6+Zkc6gzEYTKPp+iNZK5C3iH8+iu2fbUxAKFGDSCeYnS7BzfOcckEHf2eBMsbA0O/97F+bE7B6zzzz4KY+Z0dRRpU4kQchEfZSj0TdhY6Lc1E1cMy3jOzxn+qYpQzSVNifG01xFBrjgQMZghY21K+HfWP2TwVbzh9qdOX8SsHXY4f2X1McaI6X3y9c9ykRIE8kZQlD7Yn6bHQPITrQpK76U1O45JnScphdaKhVntbPNi/uzC+zzzz==", Host: api.mch.weixin.qq.com, Connection: Keep-Alive, Accept-Encoding: gzip,deflate]] [http-nio-28088-exec-1] ERROR org.jeecg.modules.hhywechatpay.util.WechatPayRequest - 微信支付请求失败,响应码 = 400,返回结果 = <html> <head><title>400 Bad Request</title></head> <body bgcolor="white"> <center><h1>400 Bad Request</h1></center> <hr><center>nginx</center> </body> </html>
2022-11-24 - 微信分账添加分帐方报平台私钥解密失败?
先调用之前在商户平台上生成的公钥文件对敏感信息name进行了加密,然后通过api获取到serial_no后,加入请求头,但是请求添加分账人的接口后,报平台私钥解密失败
2022-11-23 - 微信分账报平台证书序列号Wechatpay-Serial错误
微信分账报平台证书序列号Wechatpay-Serial错误,请问这个平台证书序列号是要换格式吗,我直接再商户平台中取出来的
2022-11-22