MrShi
2025-07-18 13d0fc75a48f91cb1e6efa124d5f838b382ea53c
server/services/src/main/java/com/doumee/config/wx/WxMiniConfig.java
@@ -36,7 +36,7 @@
    public static JsapiServiceExtension jsapiExtService;
    public static BillDownloadService billDownloadService;
    public static WxPayProperties wxProperties;
    public static  TransferToUser transferToUser;
    @Autowired
    private WxPayProperties wxPayProperties;
@@ -49,6 +49,8 @@
        this.load_WxMaService();
        this.load_wxPayService();
        this.load_wxPayV2Service();
        this.load_transferToUser();
        this.load_transferToUser();
        this.wxProperties = wxPayProperties;
    }
    /**
@@ -134,7 +136,18 @@
//    }
    public void load_transferToUser()
    {
        TransferToUser transferToUser = new TransferToUser(
                StringUtils.trimToNull(wxPayProperties.getMchId()), //商户id
                StringUtils.trimToNull(wxPayProperties.getWechatSerialNumer()), //商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053
                StringUtils.trimToNull(wxPayProperties.getWechatPrivateKeyPath()), // 商户API证书私钥文件路径,本地文件路径
                StringUtils.trimToNull(wxPayProperties.getWechatPayPublicKeyId()),   // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013038816
                StringUtils.trimToNull(wxPayProperties.getWechatPubKeyPath()) // 微信支付公钥文件路径,本地文件路径
        );
        this.transferToUser = transferToUser;
    }
}