String privateKeyPath = "/Users/cailia/IdeaProjects/ymk/ymk_backend/ruoyi-admin/src/main/resources/apiclient_cert.p12";
Config config =
new RSAAutoCertificateConfig.Builder()
.merchantId(merchantId)
// 使用 com.wechat.pay.java.core.util 中的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
.privateKeyFromPath(privateKeyPath)
.merchantSerialNumber(merchantSerialNumber)
.apiV3Key(apiV3Key).build();
路径下是有证书的,加载的时候报错 Error creating bean with name 'weChatPayConfig': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal base64 character 3f 什么情况?有没有app支付的服务端的demo直接能调试的
证书加载方式可参考:https://pay.weixin.qq.com/docs/merchant/products/in-app-payment/development.html