diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderPayEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderPayEvent.cs
new file mode 100644
index 00000000..ed3c850c
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderPayEvent.cs
@@ -0,0 +1,47 @@
+namespace SKIT.FlurlHttpClient.Wechat.Api.Events
+{
+ ///
+ /// 表示 EVENT.funds_order_pay 事件的数据。
+ /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/callback/create_order.html
+ ///
+ public class FundsOrderPayEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
+ {
+ public static class Types
+ {
+ public class Order
+ {
+ ///
+ /// 获取或设置商户订单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("trade_no")]
+ [System.Text.Json.Serialization.JsonPropertyName("trade_no")]
+ [System.Xml.Serialization.XmlElement("trade_no")]
+ public string OutTradeNumber { get; set; } = default!;
+
+ ///
+ /// 获取或设置微信支付交易单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("transaction_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
+ [System.Xml.Serialization.XmlElement("transaction_id")]
+ public string TransactionId { get; set; } = default!;
+
+ ///
+ /// 获取或设置支付时间字符串(格式:yyyy-MM-dd HH:mm:ss)。
+ ///
+ [Newtonsoft.Json.JsonProperty("pay_time")]
+ [System.Text.Json.Serialization.JsonPropertyName("pay_time")]
+ [System.Xml.Serialization.XmlElement("pay_time")]
+ public string PayTimeString { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置订单信息。
+ ///
+ [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!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderProfitSharingEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderProfitSharingEvent.cs
new file mode 100644
index 00000000..b4da78e0
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderProfitSharingEvent.cs
@@ -0,0 +1,55 @@
+namespace SKIT.FlurlHttpClient.Wechat.Api.Events
+{
+ ///
+ /// 表示 EVENT.funds_order_profitsharing 事件的数据。
+ /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/callback/profitsharing_order.html
+ ///
+ public class FundsOrderProfitSharingEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
+ {
+ public static class Types
+ {
+ public class Order
+ {
+ ///
+ /// 获取或设置商户分账单号。
+ ///
+ [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!;
+
+ ///
+ /// 获取或设置分账金额(单位:分)。
+ ///
+ [Newtonsoft.Json.JsonProperty("amount")]
+ [System.Text.Json.Serialization.JsonPropertyName("amount")]
+ [System.Xml.Serialization.XmlElement("amount")]
+ public int Amount { get; set; }
+
+ ///
+ /// 获取或设置分账状态。
+ ///
+ [Newtonsoft.Json.JsonProperty("result")]
+ [System.Text.Json.Serialization.JsonPropertyName("result")]
+ [System.Xml.Serialization.XmlElement("result")]
+ public string Status { get; set; } = default!;
+
+ ///
+ /// 获取或设置完成时间字符串(格式:yyyy-MM-dd HH:mm:ss)。
+ ///
+ [Newtonsoft.Json.JsonProperty("finish_time")]
+ [System.Text.Json.Serialization.JsonPropertyName("finish_time")]
+ [System.Xml.Serialization.XmlElement("finish_time")]
+ public string FinishTimeString { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置订单信息。
+ ///
+ [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!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderRefundEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderRefundEvent.cs
new file mode 100644
index 00000000..4b57ef8b
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/FundsOrderRefundEvent.cs
@@ -0,0 +1,47 @@
+namespace SKIT.FlurlHttpClient.Wechat.Api.Events
+{
+ ///
+ /// 表示 EVENT.funds_order_refund 事件的数据。
+ /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/callback/refunds_order.html
+ ///
+ public class FundsOrderRefundEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
+ {
+ public static class Types
+ {
+ public class Order
+ {
+ ///
+ /// 获取或设置商户退款单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("refund_no")]
+ [System.Text.Json.Serialization.JsonPropertyName("refund_no")]
+ [System.Xml.Serialization.XmlElement("refund_no")]
+ public string OutRefundNumber { get; set; } = default!;
+
+ ///
+ /// 获取或设置退款状态。
+ ///
+ [Newtonsoft.Json.JsonProperty("status")]
+ [System.Text.Json.Serialization.JsonPropertyName("status")]
+ [System.Xml.Serialization.XmlElement("status")]
+ public string Status { get; set; } = default!;
+
+ ///
+ /// 获取或设置退款成功时间字符串(格式:yyyy-MM-dd HH:mm:ss)。
+ ///
+ [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; }
+ }
+ }
+
+ ///
+ /// 获取或设置订单信息。
+ ///
+ [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!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/WithdrawNotifyEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/WithdrawNotifyEvent.cs
new file mode 100644
index 00000000..3ecd4332
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenProduct/WithdrawNotifyEvent.cs
@@ -0,0 +1,39 @@
+namespace SKIT.FlurlHttpClient.Wechat.Api.Events
+{
+ ///
+ /// 表示 EVENT.withdraw_notify 事件的数据。
+ /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/callback/withdraw_notify.html
+ ///
+ public class WithdrawNotifyEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
+ {
+ public static class Types
+ {
+ public class Withdraw
+ {
+ ///
+ /// 获取或设置商户提现单号。
+ ///
+ [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!;
+
+ ///
+ /// 获取或设置提现结果事件类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("event")]
+ [System.Text.Json.Serialization.JsonPropertyName("event")]
+ [System.Xml.Serialization.XmlElement("event")]
+ public int EventType { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置提现信息。
+ ///
+ [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!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Pay/ShopPayGetOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Pay/ShopPayGetOrderResponse.cs
index c3d19c1e..f5293575 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Pay/ShopPayGetOrderResponse.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Pay/ShopPayGetOrderResponse.cs
@@ -49,11 +49,11 @@
public long? FinishTimestamp { get; set; }
///
- /// 获取或设置退款结果。
+ /// 获取或设置退款状态。
///
[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; }
///
- /// 获取或设置分账结果。
+ /// 获取或设置分账状态。
///
[Newtonsoft.Json.JsonProperty("result")]
[System.Text.Json.Serialization.JsonPropertyName("result")]
- public string Result { get; set; } = default!;
+ public string Status { get; set; } = default!;
}
}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderPayEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderPayEvent.xml
new file mode 100644
index 00000000..bf1d232f
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderPayEvent.xml
@@ -0,0 +1,12 @@
+
+ gh_abcdefg
+ oABCD
+ 12344555555
+ event
+ funds_order_pay
+
+ 1217752501201407033233368018
+ 42000000123123
+ 2021-12-30 22:31:00
+
+
diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderProfitSharingEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderProfitSharingEvent.xml
new file mode 100644
index 00000000..c4e0a25f
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderProfitSharingEvent.xml
@@ -0,0 +1,13 @@
+
+ gh_abcdefg
+ oABCD
+ 12344555555
+ event
+ funds_order_profitsharing
+
+ P2015080612534
+ 100
+ SUCCESS
+ 2021-12-30 22:31:00
+
+
diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderRefundEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderRefundEvent.xml
new file mode 100644
index 00000000..ca26b983
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/FundsOrderRefundEvent.xml
@@ -0,0 +1,12 @@
+
+ gh_abcdefg
+ oABCD
+ 12344555555
+ event
+ funds_order_refund
+
+ 1217752501201407033233368018
+ SUCCESS
+ 2021-12-30 22:31:00
+
+
diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/WithdrawNotifyEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/WithdrawNotifyEvent.xml
new file mode 100644
index 00000000..ec322a41
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/OpenProduct/WithdrawNotifyEvent.xml
@@ -0,0 +1,11 @@
+
+ gh_abcdefg
+ oABCD
+ 12344555555
+ event
+ withdraw_notify
+
+ 123456
+ 1234567
+
+