Skip to content

Commit f44bb80

Browse files
committed
feat(tenpayv3): 随官方更新平台收付通分账相关接口模型
1 parent adf9b01 commit f44bb80

8 files changed

Lines changed: 63 additions & 22 deletions

src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/_Partner/Ecommerce/ProfitSharing/CreateEcommerceProfitSharingReturnOrderRequest.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
1+
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
22
{
33
/// <summary>
44
/// <para>表示 [POST] /ecommerce/profitsharing/returnorders 接口的请求。</para>
@@ -33,6 +33,13 @@ public class CreateEcommerceProfitSharingReturnOrderRequest : WechatTenpayReques
3333
[System.Text.Json.Serialization.JsonPropertyName("out_return_no")]
3434
public string OutReturnNumber { get; set; } = string.Empty;
3535

36+
/// <summary>
37+
/// 获取或设置微信支付订单号。
38+
/// </summary>
39+
[Newtonsoft.Json.JsonProperty("transaction_id")]
40+
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
41+
public string? TransactionId { get; set; }
42+
3643
/// <summary>
3744
/// 获取或设置回退商户号。
3845
/// </summary>

src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/_Partner/Ecommerce/ProfitSharing/GetEcommerceProfitSharingOrderByOutOrderNumberResponse.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
44
{
@@ -11,20 +11,21 @@ public static class Types
1111
{
1212
public class Receiver
1313
{
14-
/// <summary>
15-
/// 获取或设置分账接收商户号。
16-
/// </summary>
17-
[Newtonsoft.Json.JsonProperty("receiver_mchid")]
18-
[System.Text.Json.Serialization.JsonPropertyName("receiver_mchid")]
19-
public string MerchantId { get; set; } = default!;
20-
2114
/// <summary>
2215
/// 获取或设置分账接收方类型。
2316
/// </summary>
2417
[Newtonsoft.Json.JsonProperty("type")]
2518
[System.Text.Json.Serialization.JsonPropertyName("type")]
2619
public string Type { get; set; } = default!;
2720

21+
/// <summary>
22+
/// 获取或设置分账接收商户号。
23+
/// </summary>
24+
[Obsolete("相关接口或字段于 2025-09-29 下线。")]
25+
[Newtonsoft.Json.JsonProperty("receiver_mchid")]
26+
[System.Text.Json.Serialization.JsonPropertyName("receiver_mchid")]
27+
public string? MerchantId { get; set; }
28+
2829
/// <summary>
2930
/// 获取或设置分账接收方账户。
3031
/// </summary>
@@ -46,6 +47,13 @@ public class Receiver
4647
[System.Text.Json.Serialization.JsonPropertyName("description")]
4748
public string Description { get; set; } = default!;
4849

50+
/// <summary>
51+
/// 获取或设置分账明细单号。
52+
/// </summary>
53+
[Newtonsoft.Json.JsonProperty("detail_id")]
54+
[System.Text.Json.Serialization.JsonPropertyName("detail_id")]
55+
public string DetailId { get; set; } = default!;
56+
4957
/// <summary>
5058
/// 获取或设置分账结果。
5159
/// </summary>

src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/_Partner/Ecommerce/ProfitSharing/GetEcommerceProfitSharingReturnOrderByOutOrderNumberResponse.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
44
{
@@ -42,6 +42,13 @@ public class GetEcommerceProfitSharingReturnOrderByOutOrderNumberResponse : Wech
4242
[System.Text.Json.Serialization.JsonPropertyName("return_no")]
4343
public string ReturnId { get; set; } = default!;
4444

45+
/// <summary>
46+
/// 获取或设置微信支付订单号。
47+
/// </summary>
48+
[Newtonsoft.Json.JsonProperty("transaction_id")]
49+
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
50+
public string? TransactionId { get; set; }
51+
4552
/// <summary>
4653
/// 获取或设置回退商户号。
4754
/// </summary>

test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/_Partner/Ecommerce/ProfitSharing/CreateEcommerceProfitSharingOrderRequest.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
{
1+
{
22
"appid": "wx8888888888888888",
33
"sub_mchid": "1900000109",
44
"transaction_id": "4208450740201411110007820472",
55
"out_order_no": "P20150806125346",
66
"receivers": [
77
{
88
"type": "MERCHANT_ID",
9-
"receiver_account": "1900000110",
9+
"receiver_account": "1900000109",
1010
"amount": 100,
11-
"description": "分给商户1900000110"
11+
"description": "分给商户1900000110",
12+
"receiver_name": "hu89ohu89ohu89o"
1213
}
1314
],
1415
"finish": true
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
{
1+
{
22
"sub_mchid": "1900000109",
33
"transaction_id": "4208450740201411110007820472",
44
"out_order_no": "P20150806125346",
5-
"order_id": "3008450740201411110007820472"
5+
"order_id": "3008450740201411110007820472",
6+
"receivers": [
7+
{
8+
"amount": 100,
9+
"description": "分给商户1900000110",
10+
"result": "SUCCESS",
11+
"finish_time": "2015-05-20T13:29:35.120+08:00",
12+
"fail_reason": "ACCOUNT_ABNORMAL",
13+
"type": "MERCHANT_ID",
14+
"receiver_account": "1900000109",
15+
"detail_id": "36011111111111111111111"
16+
}
17+
],
18+
"status": "PROCESSING"
619
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
{
1+
{
22
"sub_mchid": "1900000109",
33
"order_id": "3008450740201411110007820472",
44
"out_order_no": "P20150806125346",
55
"out_return_no": "R20190516001",
66
"return_mchid": "86693852",
77
"amount": 10,
8-
"description": "分账回退"
8+
"description": "分账回退",
9+
"transaction_id": "4208450740201411110007820472"
910
}

test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/_Partner/Ecommerce/ProfitSharing/GetEcommerceProfitSharingOrderByOutOrderNumberResponse.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"sub_mchid": "1900000109",
33
"transaction_id": "4208450740201411110007820472",
44
"out_order_no": "P20150806125346",
@@ -11,7 +11,10 @@
1111
"description": "分给商户1900000110",
1212
"result": "SUCCESS",
1313
"finish_time": "2015-05-20T13:29:35.120+08:00",
14-
"fail_reason": "ACCOUNT_ABNORMAL"
14+
"fail_reason": "ACCOUNT_ABNORMAL",
15+
"type": "MERCHANT_ID",
16+
"receiver_account": "1900000109",
17+
"detail_id": "36011111111111111111111"
1518
}
1619
],
1720
"finish_amount": 100,
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
{
1+
{
22
"sub_mchid": "1900000109",
33
"order_id": "3008450740201411110007820472",
44
"out_order_no": "P20150806125346",
55
"out_return_no": "R20190516001",
6+
"return_no": "3008450740201411110007820472",
67
"return_mchid": "86693852",
78
"amount": 10,
8-
"return_no": "3008450740201411110007820472",
99
"result": "SUCCESS",
1010
"fail_reason": "TIME_OUT_CLOSED",
11-
"finish_time": "2015-05-20T13:29:35.120+08:00"
11+
"finish_time": "2015-05-20T13:29:35.120+08:00",
12+
"transaction_id": "4208450740201411110007820472"
1213
}

0 commit comments

Comments
 (0)