48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using Furion.ConfigurableOptions;
|
|
|
|
namespace YD_Event.Core.Options;
|
|
|
|
/// <summary>
|
|
/// 微信支付客户端配置选项
|
|
/// </summary>
|
|
[OptionsSettings("WechatTenpayClient")]
|
|
public class WechatTenpayClientOptions : IConfigurableOptions
|
|
{
|
|
/// <summary>
|
|
/// 微信公众号/小程序的AppId
|
|
/// </summary>
|
|
[Required(ErrorMessage = "AppId不能为空")]
|
|
public string AppId { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 微信支付商户号
|
|
/// </summary>
|
|
[Required(ErrorMessage = "商户号不能为空")]
|
|
public string MerchantId { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 微信支付 APIv3 密钥
|
|
/// </summary>
|
|
[Required(ErrorMessage = "APIv3密钥不能为空")]
|
|
public string MerchantV3Secret { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 微信支付商户证书序列号
|
|
/// </summary>
|
|
[Required(ErrorMessage = "商户证书序列号不能为空")]
|
|
public string MerchantCertificateSerialNumber { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 微信支付商户私钥(PEM格式)
|
|
/// </summary>
|
|
[Required(ErrorMessage = "商户私钥不能为空")]
|
|
public string MerchantCertificatePrivateKey { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 支付回调通知地址
|
|
/// </summary>
|
|
[Required(ErrorMessage = "回调地址不能为空")]
|
|
public string NotifyUrl { get; set; } = string.Empty;
|
|
}
|