admin/src/Oms.Application/Services/Payment/WeChatPayMerchantSettings.cs
zzh b0fd3a30e1
All checks were successful
Build and Deploy / deploy (push) Successful in 1m29s
feat: 微信在线支付入账加固(CAS 防重、禁人工审未付单、下单失败清理)
回调/查单/补偿走事务内原子占单再入账;关单同步驳回充值;创建先落单失败即 Failed;列表标记在线支付态。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-12-01 12:25:45 +08:00

25 lines
893 B
C#

namespace Oms.Application.Services.Payment;
/// <summary>
/// 运行时加载的微信支付商户设置。
/// </summary>
public class WeChatPayMerchantSettings
{
public bool Enabled { get; init; }
public string MchId { get; init; } = string.Empty;
public string MchSerialNo { get; init; } = string.Empty;
public string ApiV3Key { get; init; } = string.Empty;
public string PrivateKeyPem { get; init; } = string.Empty;
public string NotifyUrl { get; init; } = string.Empty;
public string AppId { get; init; } = string.Empty;
public bool IsReady =>
Enabled
&& !string.IsNullOrWhiteSpace(MchId)
&& !string.IsNullOrWhiteSpace(MchSerialNo)
&& !string.IsNullOrWhiteSpace(ApiV3Key)
&& !string.IsNullOrWhiteSpace(PrivateKeyPem)
&& !string.IsNullOrWhiteSpace(NotifyUrl)
&& !string.IsNullOrWhiteSpace(AppId);
}