Skip to content

Commit

Permalink
[WeChatPay.V3] 修正 因Certificate / MchId 赋值顺序导致不读取私钥的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
roc916 committed Aug 10, 2023
1 parent 95c07e4 commit 5c42922
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Essensoft.Paylink.WeChatPay/WeChatPayOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Essensoft.Paylink.WeChatPay
/// </summary>
public class WeChatPayOptions
{
private string mchId;
private string certificate;
private string certificatePassword;
private string privateKey;
Expand All @@ -36,7 +37,18 @@ public class WeChatPayOptions
/// <remarks>
/// 商户号、服务商户号
/// </remarks>
public string MchId { get; set; }
public string MchId
{
get => mchId;
set
{
if (!string.IsNullOrEmpty(value))
{
mchId = value;
GetCertificateInfo();
}
}
}

/// <summary>
/// 子商户应用号
Expand Down

0 comments on commit 5c42922

Please sign in to comment.