namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
///
/// 表示 EVENT.xpay_coin_pay_notify 事件的数据。
/// https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html
///
public class XPayCoinPayNotifyEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class WechatpayInfo
{
///
/// 获取或设置商户订单号。
///
[Newtonsoft.Json.JsonProperty("MchOrderNo")]
[System.Text.Json.Serialization.JsonPropertyName("MchOrderNo")]
[System.Xml.Serialization.XmlElement("MchOrderNo")]
public string MerchantOrderNumber { get; set; } = default!;
///
/// 获取或设置微信支付订单号。
///
[Newtonsoft.Json.JsonProperty("TransactionId")]
[System.Text.Json.Serialization.JsonPropertyName("TransactionId")]
[System.Xml.Serialization.XmlElement("TransactionId")]
public string TransactionId { get; set; } = default!;
///
/// 获取或设置支付时间戳。
///
[Newtonsoft.Json.JsonProperty("PaidTime")]
[System.Text.Json.Serialization.JsonPropertyName("PaidTime")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("PaidTime")]
public long PayTimestamp { get; set; }
}
public class CoinInfo
{
///
/// 获取或设置数量。
///
[Newtonsoft.Json.JsonProperty("Quantity")]
[System.Text.Json.Serialization.JsonPropertyName("Quantity")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("Quantity")]
public int Quantity { get; set; }
///
/// 获取或设置原始价格(单位:分)。
///
[Newtonsoft.Json.JsonProperty("OrigPrice")]
[System.Text.Json.Serialization.JsonPropertyName("OrigPrice")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("OrigPrice")]
public int OriginalPrice { get; set; }
///
/// 获取或设置实付价格(单位:分)。
///
[Newtonsoft.Json.JsonProperty("ActualPrice")]
[System.Text.Json.Serialization.JsonPropertyName("ActualPrice")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("ActualPrice")]
public int ActualPrice { get; set; }
///
/// 获取或设置透传信息。
///
[Newtonsoft.Json.JsonProperty("Attach")]
[System.Text.Json.Serialization.JsonPropertyName("Attach")]
[System.Xml.Serialization.XmlElement("Attach", IsNullable = true)]
public string? Attachment { get; set; }
}
}
///
/// 获取或设置用户 OpenId。
///
[Newtonsoft.Json.JsonProperty("OpenId")]
[System.Text.Json.Serialization.JsonPropertyName("OpenId")]
[System.Xml.Serialization.XmlElement("OpenId")]
public string OpenId { get; set; } = default!;
///
/// 获取或设置业务订单号。
///
[Newtonsoft.Json.JsonProperty("OutTradeNo")]
[System.Text.Json.Serialization.JsonPropertyName("OutTradeNo")]
[System.Xml.Serialization.XmlElement("OutTradeNo")]
public string OutTradeNumber { get; set; } = default!;
///
/// 获取或设置虚拟支付环境。
///
[Newtonsoft.Json.JsonProperty("Env")]
[System.Text.Json.Serialization.JsonPropertyName("Env")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("Env")]
public int Environment { get; set; }
///
/// 获取或设置微信支付信息。
///
[Newtonsoft.Json.JsonProperty("WeChatPayInfo")]
[System.Text.Json.Serialization.JsonPropertyName("WeChatPayInfo")]
[System.Xml.Serialization.XmlElement("WeChatPayInfo", IsNullable = true)]
public Types.WechatpayInfo? WechatpayInfo { get; set; }
///
/// 获取或设置代币信息。
///
[Newtonsoft.Json.JsonProperty("CoinInfo")]
[System.Text.Json.Serialization.JsonPropertyName("CoinInfo")]
[System.Xml.Serialization.XmlElement("CoinInfo", IsNullable = true)]
public Types.CoinInfo? CoinInfo { get; set; }
}
}