这样使用jdk创建支付,这几个参数都是必须有的嘛??
private Config getConfig(WxPayConfig wxPayConfig) {
return new RSAAutoCertificateConfig.Builder()
.merchantId(wxPayConfig.getMerchantId())
.privateKeyFromPath(wxPayConfig.getPrivateKeyPath())
.merchantSerialNumber(wxPayConfig.getMerchantSerialNumber())
// .wechatPayCertificatesFromPath("D:/hypay/cert/apiclient_cert.pem")
.apiV3Key(wxPayConfig.getApiV3Key())
.build();
}
JsapiService service = new JsapiService.Builder().config(config).build();
这个报错说明你给的MerchantSerialNumber不是对应PrivateKey的,这个需要自查
https://developers.weixin.qq.com/community/pay/article/doc/000ca894a20c983cad52242286b813