java.lang.IllegalArgumentException: Illegal base64 character 2d
at java.util.Base64$Decoder.decode0(Base64.java:714)
at java.util.Base64$Decoder.decode(Base64.java:526)
at java.util.Base64$Decoder.decode(Base64.java:549)
at com.wechat.pay.java.core.util.PemUtil.loadPrivateKeyFromString(PemUtil.java:41)
at com.wechat.pay.java.core.util.PemUtil.loadPrivateKeyFromPath(PemUtil.java:81)
at com.wechat.pay.java.core.AbstractRSAConfigBuilder.privateKeyFromPath(AbstractRSAConfigBuilder.java:31)
at com.ruoyi.web.controller.openapi.CallBackResultController.wechatBackResult(CallBackResultController.java:126)
at com.ruoyi.web.controller.openapi.CallBackResultController$$FastClassBySpringCGLIB$$2b902b55.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
如何配置支付平台的证书,用商户的证书不会报错但是验签不过 NotificationConfig notificationConfig = new RSAAutoCertificateConfig.Builder() .merchantId(WechatConfig.merchantId) .privateKeyFromPath(WechatConfig.publicKeyPath) .merchantSerialNumber(serialNo) .apiV3Key(WechatConfig.privateKeyStr) .build();
一般是商户号或者秘钥不对