mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-22 20:13:41 +08:00
feat(wxapi): 新增部分小程序支付管理服务回调通知事件模型
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.funds_order_pay 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/callback/create_order.html </para>
|
||||
/// </summary>
|
||||
public class FundsOrderPayEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_no")]
|
||||
[System.Xml.Serialization.XmlElement("trade_no")]
|
||||
public string OutTradeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信支付交易单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||
[System.Xml.Serialization.XmlElement("transaction_id")]
|
||||
public string TransactionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付时间字符串(格式:yyyy-MM-dd HH:mm:ss)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time")]
|
||||
[System.Xml.Serialization.XmlElement("pay_time")]
|
||||
public string PayTimeString { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_info")]
|
||||
[System.Xml.Serialization.XmlElement("order_info")]
|
||||
public Types.Order Order { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.funds_order_profitsharing 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/callback/profitsharing_order.html </para>
|
||||
/// </summary>
|
||||
public class FundsOrderProfitSharingEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户分账单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("profit_sharing_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing_no")]
|
||||
[System.Xml.Serialization.XmlElement("profit_sharing_no")]
|
||||
public string OutProfitSharingNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分账金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
[System.Xml.Serialization.XmlElement("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分账状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
[System.Xml.Serialization.XmlElement("result")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置完成时间字符串(格式:yyyy-MM-dd HH:mm:ss)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_time")]
|
||||
[System.Xml.Serialization.XmlElement("finish_time")]
|
||||
public string FinishTimeString { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_info")]
|
||||
[System.Xml.Serialization.XmlElement("order_info")]
|
||||
public Types.Order Order { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.funds_order_refund 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/callback/refunds_order.html </para>
|
||||
/// </summary>
|
||||
public class FundsOrderRefundEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户退款单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("refund_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("refund_no")]
|
||||
[System.Xml.Serialization.XmlElement("refund_no")]
|
||||
public string OutRefundNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
[System.Xml.Serialization.XmlElement("status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款成功时间字符串(格式:yyyy-MM-dd HH:mm:ss)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("success_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("success_time")]
|
||||
[System.Xml.Serialization.XmlElement("success_time", IsNullable = true)]
|
||||
public string? SuccessTimeString { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_info")]
|
||||
[System.Xml.Serialization.XmlElement("order_info")]
|
||||
public Types.Order Order { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.withdraw_notify 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/callback/withdraw_notify.html </para>
|
||||
/// </summary>
|
||||
public class WithdrawNotifyEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Withdraw
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户提现单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_request_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_request_no")]
|
||||
[System.Xml.Serialization.XmlElement("out_request_no")]
|
||||
public string OutRequestNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现结果事件类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("event")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("event")]
|
||||
[System.Xml.Serialization.XmlElement("event")]
|
||||
public int EventType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("withdraw_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("withdraw_info")]
|
||||
[System.Xml.Serialization.XmlElement("withdraw_info")]
|
||||
public Types.Withdraw Withdraw { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -49,11 +49,11 @@
|
||||
public long? FinishTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款结果。
|
||||
/// 获取或设置退款状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public string Result { get; set; } = default!;
|
||||
public string Status { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class ProfitSharing
|
||||
@@ -101,11 +101,11 @@
|
||||
public long? FinishTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分账结果。
|
||||
/// 获取或设置分账状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public string Result { get; set; } = default!;
|
||||
public string Status { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,12 @@
|
||||
<xml>
|
||||
<ToUserName>gh_abcdefg</ToUserName>
|
||||
<FromUserName>oABCD</FromUserName>
|
||||
<CreateTime>12344555555</CreateTime>
|
||||
<MsgType>event</MsgType>
|
||||
<Event>funds_order_pay</Event>
|
||||
<order_info>
|
||||
<trade_no>1217752501201407033233368018</trade_no>
|
||||
<transaction_id>42000000123123</transaction_id>
|
||||
<pay_time>2021-12-30 22:31:00</pay_time>
|
||||
</order_info>
|
||||
</xml>
|
@@ -0,0 +1,13 @@
|
||||
<xml>
|
||||
<ToUserName>gh_abcdefg</ToUserName>
|
||||
<FromUserName>oABCD</FromUserName>
|
||||
<CreateTime>12344555555</CreateTime>
|
||||
<MsgType>event</MsgType>
|
||||
<Event>funds_order_profitsharing</Event>
|
||||
<order_info>
|
||||
<profit_sharing_no>P2015080612534</profit_sharing_no>
|
||||
<amount>100</amount>
|
||||
<result>SUCCESS</result>
|
||||
<finish_time>2021-12-30 22:31:00</finish_time>
|
||||
</order_info>
|
||||
</xml>
|
@@ -0,0 +1,12 @@
|
||||
<xml>
|
||||
<ToUserName>gh_abcdefg</ToUserName>
|
||||
<FromUserName>oABCD</FromUserName>
|
||||
<CreateTime>12344555555</CreateTime>
|
||||
<MsgType>event</MsgType>
|
||||
<Event>funds_order_refund</Event>
|
||||
<order_info>
|
||||
<refund_no>1217752501201407033233368018</refund_no>
|
||||
<status>SUCCESS</status>
|
||||
<success_time>2021-12-30 22:31:00</success_time>
|
||||
</order_info>
|
||||
</xml>
|
@@ -0,0 +1,11 @@
|
||||
<xml>
|
||||
<ToUserName>gh_abcdefg</ToUserName>
|
||||
<FromUserName>oABCD</FromUserName>
|
||||
<CreateTime>12344555555</CreateTime>
|
||||
<MsgType>event</MsgType>
|
||||
<Event>withdraw_notify</Event>
|
||||
<withdraw_info>
|
||||
<out_request_no>123456</out_request_no>
|
||||
<event>1234567</event>
|
||||
</withdraw_info>
|
||||
</xml>
|
Reference in New Issue
Block a user