Skip to content

Commit b1943eb

Browse files
committed
feat(tenpayv3): 新增分账动账回调通知模型
1 parent 046b4aa commit b1943eb

File tree

6 files changed

+196
-5
lines changed

6 files changed

+196
-5
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
using System;
2+
3+
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
4+
{
5+
/// <summary>
6+
/// <para>表示 PROFITSHARING.SUCCESS (仅限直连商户)通知的数据。</para>
7+
/// <para>表示 PROFITSHARING.RETURN (仅限直连商户)通知的数据。</para>
8+
/// <para>
9+
/// REF: <br/>
10+
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012289679 ]]>
11+
/// </para>
12+
/// </summary>
13+
public class ProfitSharingResource : WechatTenpayEvent.Types.IDecryptedResource
14+
{
15+
public static class Types
16+
{
17+
public class Receiver
18+
{
19+
/// <summary>
20+
/// 获取或设置分账接收方类型。
21+
/// </summary>
22+
[Newtonsoft.Json.JsonProperty("type")]
23+
[System.Text.Json.Serialization.JsonPropertyName("type")]
24+
public string Type { get; set; } = default!;
25+
26+
/// <summary>
27+
/// 获取或设置分账接收方账户。
28+
/// </summary>
29+
[Newtonsoft.Json.JsonProperty("account")]
30+
[System.Text.Json.Serialization.JsonPropertyName("account")]
31+
public string Account { get; set; } = default!;
32+
33+
/// <summary>
34+
/// 获取或设置分账金额(单位:分)。
35+
/// </summary>
36+
[Newtonsoft.Json.JsonProperty("amount")]
37+
[System.Text.Json.Serialization.JsonPropertyName("amount")]
38+
public int Amount { get; set; }
39+
40+
/// <summary>
41+
/// 获取或设置分账描述。
42+
/// </summary>
43+
[Newtonsoft.Json.JsonProperty("description")]
44+
[System.Text.Json.Serialization.JsonPropertyName("description")]
45+
public string Description { get; set; } = default!;
46+
}
47+
}
48+
49+
/// <summary>
50+
/// 获取或设置微信商户号。
51+
/// </summary>
52+
[Newtonsoft.Json.JsonProperty("mchid")]
53+
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
54+
public string MerchantId { get; set; } = default!;
55+
56+
/// <summary>
57+
/// 获取或设置微信支付订单号。
58+
/// </summary>
59+
[Newtonsoft.Json.JsonProperty("transaction_id")]
60+
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
61+
public string TransactionId { get; set; } = default!;
62+
63+
/// <summary>
64+
/// 获取或设置商户分账单号。
65+
/// </summary>
66+
[Newtonsoft.Json.JsonProperty("out_order_no")]
67+
[System.Text.Json.Serialization.JsonPropertyName("out_order_no")]
68+
public string OutOrderNumber { get; set; } = default!;
69+
70+
/// <summary>
71+
/// 获取或设置微信分账单号。
72+
/// </summary>
73+
[Newtonsoft.Json.JsonProperty("order_id")]
74+
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
75+
public string OrderId { get; set; } = default!;
76+
77+
/// <summary>
78+
/// 获取或设置分账接收方信息。
79+
/// </summary>
80+
[Newtonsoft.Json.JsonProperty("receiver")]
81+
[System.Text.Json.Serialization.JsonPropertyName("receiver")]
82+
public Types.Receiver Receiver { get; set; } = default!;
83+
84+
/// <summary>
85+
/// 获取或设置成功时间。
86+
/// </summary>
87+
[Newtonsoft.Json.JsonProperty("success_time")]
88+
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
89+
[System.Text.Json.Serialization.JsonPropertyName("success_time")]
90+
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
91+
public DateTimeOffset SuccessTime { get; set; }
92+
}
93+
}

src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Events/Transactions/TransactionResource.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
88
/// REF: <br/>
99
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012286313 ]]> <br/>
1010
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012289459 ]]> <br/>
11-
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012289679 ]]> <br/>
1211
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012791836 ]]> <br/>
1312
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012791861 ]]> <br/>
1413
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012791882 ]]> <br/>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
using System;
2+
3+
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
4+
{
5+
/// <summary>
6+
/// <para>表示 PROFITSHARING.SUCCESS (仅限服务商)通知的数据。</para>
7+
/// <para>表示 PROFITSHARING.RETURN (仅限服务商)通知的数据。</para>
8+
/// <para>
9+
/// REF: <br/>
10+
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012116672 ]]> <br/>
11+
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012075216 ]]> <br/>
12+
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012075400 ]]>
13+
/// </para>
14+
/// </summary>
15+
public class PartnerProfitSharingResource : WechatTenpayEvent.Types.IDecryptedResource
16+
{
17+
public static class Types
18+
{
19+
public class Receiver : ProfitSharingResource.Types.Receiver
20+
{
21+
}
22+
}
23+
24+
/// <summary>
25+
/// 获取或设置微信商户号。
26+
/// </summary>
27+
[Newtonsoft.Json.JsonProperty("sp_mchid")]
28+
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
29+
public string MerchantId { get; set; } = default!;
30+
31+
/// <summary>
32+
/// 获取或设置微信子商户号。
33+
/// </summary>
34+
[Newtonsoft.Json.JsonProperty("sub_mchid")]
35+
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
36+
public string SubMerchantId { get; set; } = default!;
37+
38+
/// <summary>
39+
/// 获取或设置微信支付订单号。
40+
/// </summary>
41+
[Newtonsoft.Json.JsonProperty("transaction_id")]
42+
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
43+
public string TransactionId { get; set; } = default!;
44+
45+
/// <summary>
46+
/// 获取或设置商户分账单号。
47+
/// </summary>
48+
[Newtonsoft.Json.JsonProperty("out_order_no")]
49+
[System.Text.Json.Serialization.JsonPropertyName("out_order_no")]
50+
public string OutOrderNumber { get; set; } = default!;
51+
52+
/// <summary>
53+
/// 获取或设置微信分账单号。
54+
/// </summary>
55+
[Newtonsoft.Json.JsonProperty("order_id")]
56+
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
57+
public string OrderId { get; set; } = default!;
58+
59+
/// <summary>
60+
/// 获取或设置分账接收方信息。
61+
/// </summary>
62+
[Newtonsoft.Json.JsonProperty("receiver")]
63+
[System.Text.Json.Serialization.JsonPropertyName("receiver")]
64+
public Types.Receiver Receiver { get; set; } = default!;
65+
66+
/// <summary>
67+
/// 获取或设置成功时间。
68+
/// </summary>
69+
[Newtonsoft.Json.JsonProperty("success_time")]
70+
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
71+
[System.Text.Json.Serialization.JsonPropertyName("success_time")]
72+
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
73+
public DateTimeOffset SuccessTime { get; set; }
74+
}
75+
}

src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Events/_Partner/Transactions/PartnerTransactionResource.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
1212
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012085875 ]]> <br/>
1313
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012085801 ]]> <br/>
1414
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012090195 ]]> <br/>
15-
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012237246 ]]> <br/>
16-
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012116672 ]]> <br/>
17-
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012075216 ]]> <br/>
18-
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012075400 ]]>
15+
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012237246 ]]>
1916
/// </para>
2017
/// </summary>
2118
public class PartnerTransactionResource : WechatTenpayEvent.Types.IDecryptedResource
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"mchid": "1900000100",
3+
"transaction_id": "4200000000000000000000000000",
4+
"order_id": "1217752501201407033233368018",
5+
"out_order_no": "P20150806125346",
6+
"receiver": {
7+
"type": "MERCHANT_ID",
8+
"account": "1900000100",
9+
"amount": 888,
10+
"description": "运费/交易分账/及时奖励"
11+
},
12+
"success_time": "2018-06-08T10:34:56+08:00"
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"sp_mchid": "1900000100",
3+
"sub_mchid": "1900000100",
4+
"transaction_id": "4200000000000000000000000000",
5+
"order_id": "1217752501201407033233368018",
6+
"out_order_no": "P20150806125346",
7+
"receiver": {
8+
"type": "MERCHANT_ID",
9+
"account": "1900000100",
10+
"amount": 888,
11+
"description": "运费/交易分账/及时奖励"
12+
},
13+
"success_time": "2018-06-08T10:34:56+08:00"
14+
}

0 commit comments

Comments
 (0)