RSAAutoCertificateConfig.Builder() .merchantId(mchId) .privateKeyFromPath(privateKeyFromPath) .merchantSerialNumber(mchSerialNumber) .apiV3Key(apiV3Key) .build()
httpResponseBody[{"code":"SYSTEM_ERROR","message":"系统繁忙,请稍后重试"}] HttpRequest[{"http_method":"GET","url":"https://api.mch.weixin.qq.com/v3/certificates?algorithm_type=RSA","uri":"https://api.mch.weixin.qq.com/v3/certificates?algorithm_type=RSA","headers":{"headers":{"Authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"XXXXXX\",nonce_str=\"DFDFDFASFDSF\",timestamp=\"545245\",serial_no=\"XXXXXXXXXX\",signature=\"OJXmwqt+XroX10PDxxKTeFyG+QhyTS9glNvEFCDhVKgYgglRVatce4W0mraDFUnHD8+lzIrVUztA0vK+fIXFfbengsNRn9ULpR1U5aLcJvcfixtCzcfUqu6aR9To3khte7/o15ySRAZ4c1iCbbSF138o9NjcycnQQFPA+oe26up8rB1mZO50B2SlzrRfBN555jFECdZU8YB4fbS4DZv39Fnbi4/by1HwaIWqd7ipahreOiNKdVrThNfGaZfTj2WCpIbkBlCFmKm85GHgOK70iNsS/ZvX04m33LdcSc65QYu9T0i1Y1NMXI2zqvZEkX3Ta6quhMKU99+5Kd+C+9R0Jg==\"","Accept":" */*","User-Agent":"WechatPay-Java/0.2.14 (Windows 11/10.0) Java/17.0.9 Credential/WechatPay2Credential Validator/ okhttp3/null","Content-Type":"application/json"}}}]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ~[spring-beans-6.1.13.jar:6.1.13]
... 19 common frames omitted
Caused by: com.wechat.pay.java.core.exception.ServiceException: Wrong HttpStatusCode[500]
如果是新申请的微信支付商户号出现「系统繁忙,请稍后重试」的报错,这是因为新申请的商户号需要使用公钥模式,具体还请参照:https://developers.weixin.qq.com/community/pay/doc/0002c6a7cf438818df52145b863c01 进行处理