Merge pull request 'main' (#72) from coolcalf/Admin.NET.Pro:main into main

Reviewed-on: http://101.43.53.74:3000/Admin.NET/Admin.NET.Pro/pulls/72
This commit is contained in:
zuohuaijun 2024-07-23 01:36:18 +08:00
commit fa8bdb15f8

View File

@ -38,10 +38,10 @@ public class SysWechatPayService : IDynamicApiController, ITransient
/// <returns></returns> /// <returns></returns>
private WechatTenpayClient CreateTenpayClient() private WechatTenpayClient CreateTenpayClient()
{ {
var cerFilePath = _wechatPayOptions.MerchantCertificatePrivateKey; var cerFilePath = App.WebHostEnvironment.ContentRootPath + _wechatPayOptions.MerchantCertificatePrivateKey;
if (!File.Exists(cerFilePath)) if (!File.Exists(cerFilePath))
throw Oops.Oh<Exception>("商户证书文件不存在:" + cerFilePath); Log.Warning("商户证书文件不存在:" + cerFilePath);
var tenpayClientOptions = new WechatTenpayClientOptions() var tenpayClientOptions = new WechatTenpayClientOptions()
{ {