Config config =
new RSAPublicKeyConfig.Builder()
.merchantId(merchantId)
.privateKeyFromPath(privateKeyPath)
.publicKeyFromPath(publicKeyPath)
.publicKeyId(publicKeyId)
.merchantSerialNumber(merchantSerialNumber)
.apiV3Key(apiV3Key)
.build();
我在.publicKeyFromPath(publicKeyPath)这行报错:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.wechat.pay.java.core.Config]: Factory method 'wechatPayConfigBuild' threw exception with message: Illegal base64 character 2d
我是在resources目录下,上传的apiclient_cert.pem文件,publicKeyPath的路径就是该文件的路径。请问这报错是什么问题?publicKeyFromPath这里读取的文件应该从哪获取
apiclient_cert是商户 API 证书而不是微信支付公钥
这里要读取的公钥文件,是在商户平台哪里获取
商户账户中心 api 安全里面
apiclient_cert是商户 API 证书而不是微信支付公钥
这里要读取的公钥文件,是在商户平台哪里获取
商户账户中心 api 安全里面