fixed: 微信支付证书路径问题
This commit is contained in:
parent
1ca94438a1
commit
e3feb6cad8
@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user