Skip to content

Commit

Permalink
Merge pull request #337 from freesme/fix-master-#319-wx-pay-client-error
Browse files Browse the repository at this point in the history
修复:#319 微信支付初始化 client 客户端错误,导致发起支付报错
  • Loading branch information
YunaiV authored Sep 3, 2023
2 parents 891ed3d + e8662e3 commit a1f6826
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public AbstractWxPayClient(Long channelId, String channelCode, WxPayClientConfig
protected void doInit(String tradeType) {
// 创建 config 配置
WxPayConfig payConfig = new WxPayConfig();
BeanUtil.copyProperties(config, payConfig, "keyContent");
BeanUtil.copyProperties(config, payConfig, "keyContent", "privateKeyContent", "privateCertContent");
payConfig.setTradeType(tradeType);
// weixin-pay-java 无法设置内容,只允许读取文件,所以这里要创建临时文件来解决
if (Base64.isBase64(config.getKeyContent())) {
Expand Down

0 comments on commit a1f6826

Please sign in to comment.