From 31ba9c30ae3378e28f6f706d9c40060861524915 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Wed, 15 May 2024 15:35:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(tenpayv3):=20=E6=96=B0=E5=A2=9E=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=95=86=E6=95=99=E8=82=B2=E7=BB=AD=E8=B4=B9=E9=80=9A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/WechatTenpayV3/Basic_ModelDefinition.md | 20 +++++++++- ...ayClientExecuteEducationPAPayExtensions.cs | 39 +++++++++++++++---- .../CreateEducationPAPayTransactionRequest.cs | 14 +++++++ ...ucationPAPayContractByContractIdRequest.cs | 14 +++++++ ...cationPAPayContractByContractIdResponse.cs | 28 +++++++++++++ ...APayTransactionByOutTradeNumberResponse.cs | 27 +++++++++++++ .../PresignEducationPAPayContractRequest.cs | 21 ++++++++++ ...QueryEducationPAPayUserContractsRequest.cs | 21 ++++++++++ ...ueryEducationPAPayUserContractsResponse.cs | 28 +++++++++++++ ...ucationPAPayContractNotificationRequest.cs | 14 +++++++ ...reateEducationPAPayTransactionRequest.json | 2 + ...tionPAPayContractByContractIdResponse.json | 4 ++ ...EducationPAPayTransactionByIdResponse.json | 10 +++-- ...ayTransactionByOutTradeNumberResponse.json | 11 ++++-- .../PresignEducationPAPayContractRequest.json | 3 ++ ...ryEducationPAPayUserContractsResponse.json | 6 ++- ...ationPAPayContractNotificationRequest.json | 4 +- 17 files changed, 249 insertions(+), 17 deletions(-) diff --git a/docs/WechatTenpayV3/Basic_ModelDefinition.md b/docs/WechatTenpayV3/Basic_ModelDefinition.md index 6c7abd7a1..b0f95ab80 100644 --- a/docs/WechatTenpayV3/Basic_ModelDefinition.md +++ b/docs/WechatTenpayV3/Basic_ModelDefinition.md @@ -73,7 +73,7 @@ | √ | 其他:ETC 扣费 | 合作伙伴 | | | √ | 其他:电子小票 | 合作伙伴 | | | √ | 其他:出租车电子发票 | 合作伙伴 | | -| √ | 其他:教育续费通 | 直连商户 | | +| √ | 其他:教育续费通 | 直连商户 & 合作伙伴 | | | √ | 其他:校园轻松付 | 合作伙伴 | | | √ | 其他:微信点餐订单 | 合作伙伴 | | | √ | 其他:微信寄快递 | 合作伙伴 | | @@ -1294,6 +1294,24 @@ - 将出租车电子发票插入微信用户卡包:`CreateTaxiInvoiceCard` + - 教育续费通: + + - 预签约:`PresignEducationPAPayContract` + + - 通过协议号查询签约:`GetEducationPAPayContractByContractId` + + - 通过用户标识查询签约:`QueryEducationPAPayUserContracts` + + - 解约:`TerminateEducationPAPayContract` + + - 发送扣款预通知:`SendEducationPAPayContractNotification` + + - 教育通扣款受理:`CreateEducationPAPayTransaction` + + - 微信订单号查单:`GetEducationPAPayTransactionById` + + - 商户订单号查单:`GetEducationPAPayTransactionByOutTradeNumber` + - 校园轻松付: - 预签约:`PresignEducationSchoolPayContract` diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteEducationPAPayExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteEducationPAPayExtensions.cs index 6289fda94..93776c1ba 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteEducationPAPayExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteEducationPAPayExtensions.cs @@ -12,7 +12,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [POST] /edu-papay/contracts/presign 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -34,7 +35,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [GET] /edu-papay/contracts/id/{contract_id} 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -50,6 +52,12 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions .CreateFlurlRequest(request, HttpMethod.Get, "edu-papay", "contracts", "id", request.ContractId) .SetQueryParam("appid", request.AppId); + if (request.SubMerchantId is not null) + flurlReq.SetQueryParam("sub_mchid", request.SubMerchantId); + + if (request.SubAppId is not null) + flurlReq.SetQueryParam("sub_appid", request.SubAppId); + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } @@ -57,7 +65,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [GET] /edu-papay/user/{openid}/contracts 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -74,6 +83,15 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions .SetQueryParam("appid", request.AppId) .SetQueryParam("plan_id", request.PlanId); + if (request.SubMerchantId is not null) + flurlReq.SetQueryParam("sub_mchid", request.SubMerchantId); + + if (request.SubAppId is not null) + flurlReq.SetQueryParam("sub_appid", request.SubAppId); + + if (request.SubOpenId is not null) + flurlReq.SetQueryParam("sub_openid", request.SubOpenId); + if (request.ContractStatus is not null) flurlReq.SetQueryParam("contract_status", request.ContractStatus); @@ -90,7 +108,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [DELETE] /edu-papay/contracts/{contract_id} 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -112,7 +131,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [POST] /edu-papay/user-notifications/{contract_id}/send 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -134,7 +154,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [POST] /edu-papay/transactions 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -156,7 +177,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [GET] /edu-papay/transactions/out-trade-no/{out_trade_no} 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -178,7 +200,8 @@ public static class WechatTenpayClientExecuteEducationPAPayExtensions /// 异步调用 [GET] /edu-papay/transactions/id/{transaction_id} 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/CreateEducationPAPayTransactionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/CreateEducationPAPayTransactionRequest.cs index 4785e84f8..71a008112 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/CreateEducationPAPayTransactionRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/CreateEducationPAPayTransactionRequest.cs @@ -29,6 +29,13 @@ public class Device } } + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -36,6 +43,13 @@ public class Device [System.Text.Json.Serialization.JsonPropertyName("appid")] public string AppId { get; set; } = string.Empty; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonProperty("sub_appid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_appid")] + public string? SubAppId { get; set; } + /// /// 获取或设置签约协议号。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdRequest.cs index aa64dcdaf..35320d570 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdRequest.cs @@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models /// public class GetEducationPAPayContractByContractIdRequest : WechatTenpayRequest { + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -12,6 +19,13 @@ public class GetEducationPAPayContractByContractIdRequest : WechatTenpayRequest [System.Text.Json.Serialization.JsonIgnore] public string AppId { get; set; } = string.Empty; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SubAppId { get; set; } + /// /// 获取或设置签约协议号。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdResponse.cs index dd9adc5e1..efe3d15b4 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayContractByContractIdResponse.cs @@ -36,6 +36,20 @@ public class Contract } } + /// + /// 获取或设置微信商户号。 + /// + [Newtonsoft.Json.JsonProperty("sp_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sp_mchid")] + public string MerchantId { get; set; } = default!; + + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -43,6 +57,13 @@ public class Contract [System.Text.Json.Serialization.JsonPropertyName("appid")] public string AppId { get; set; } = default!; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonProperty("sub_appid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_appid")] + public string? SubAppId { get; set; } + /// /// 获取或设置模板 ID。 /// @@ -57,6 +78,13 @@ public class Contract [System.Text.Json.Serialization.JsonPropertyName("openid")] public string OpenId { get; set; } = default!; + /// + /// 获取或设置用户在子商户下的唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("sub_openid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_openid")] + public string SubOpenId { get; set; } = default!; + /// /// 获取或设置签约信息。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.cs index 0fe7511c4..94a3d7a9a 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.cs @@ -11,6 +11,12 @@ public static class Types { public class Payer : GetPayTransactionByOutTradeNumberResponse.Types.Payer { + /// + /// 获取或设置用户在子商户下的唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("sub_openid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_openid")] + public string SubOpenId { get; set; } = default!; } public class Amount @@ -135,6 +141,20 @@ public class Promotion } } + /// + /// 获取或设置微信商户号。 + /// + [Newtonsoft.Json.JsonProperty("sp_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sp_mchid")] + public string MerchantId { get; set; } = default!; + + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -142,6 +162,13 @@ public class Promotion [System.Text.Json.Serialization.JsonPropertyName("appid")] public string AppId { get; set; } = default!; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonProperty("sub_appid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_appid")] + public string? SubAppId { get; set; } + /// /// 获取或设置商户订单号。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/PresignEducationPAPayContractRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/PresignEducationPAPayContractRequest.cs index 12c3847e1..964be5bf5 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/PresignEducationPAPayContractRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/PresignEducationPAPayContractRequest.cs @@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models /// public class PresignEducationPAPayContractRequest : WechatTenpayRequest { + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -12,6 +19,13 @@ public class PresignEducationPAPayContractRequest : WechatTenpayRequest [System.Text.Json.Serialization.JsonPropertyName("appid")] public string AppId { get; set; } = string.Empty; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonProperty("sub_appid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_appid")] + public string? SubAppId { get; set; } + /// /// 获取或设置模板 ID。 /// @@ -26,6 +40,13 @@ public class PresignEducationPAPayContractRequest : WechatTenpayRequest [System.Text.Json.Serialization.JsonPropertyName("openid")] public string OpenId { get; set; } = string.Empty; + /// + /// 获取或设置用户在子商户下的唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("sub_openid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_openid")] + public string? SubOpenId { get; set; } + /// /// 获取或设置商户用户账号标识。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsRequest.cs index e78ae7bd7..2eea2add6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsRequest.cs @@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models /// public class QueryEducationPAPayUserContractsRequest : WechatTenpayRequest { + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -12,6 +19,13 @@ public class QueryEducationPAPayUserContractsRequest : WechatTenpayRequest [System.Text.Json.Serialization.JsonIgnore] public string AppId { get; set; } = string.Empty; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SubAppId { get; set; } + /// /// 获取或设置模板 ID。 /// @@ -26,6 +40,13 @@ public class QueryEducationPAPayUserContractsRequest : WechatTenpayRequest [System.Text.Json.Serialization.JsonIgnore] public string OpenId { get; set; } = string.Empty; + /// + /// 获取或设置用户在子商户下的唯一标识。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SubOpenId { get; set; } + /// /// 获取或设置签约状态。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsResponse.cs index de98dd292..2260cb7ea 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/QueryEducationPAPayUserContractsResponse.cs @@ -16,6 +16,20 @@ public class Contract : GetEducationPAPayContractByContractIdResponse.Types.Cont } } + /// + /// 获取或设置微信商户号。 + /// + [Newtonsoft.Json.JsonProperty("sp_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sp_mchid")] + public string MerchantId { get; set; } = default!; + + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -23,6 +37,13 @@ public class Contract : GetEducationPAPayContractByContractIdResponse.Types.Cont [System.Text.Json.Serialization.JsonPropertyName("appid")] public string AppId { get; set; } = default!; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonProperty("sub_appid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_appid")] + public string? SubAppId { get; set; } + /// /// 获取或设置模板 ID。 /// @@ -37,6 +58,13 @@ public class Contract : GetEducationPAPayContractByContractIdResponse.Types.Cont [System.Text.Json.Serialization.JsonPropertyName("openid")] public string OpenId { get; set; } = default!; + /// + /// 获取或设置用户在子商户下的唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("sub_openid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_openid")] + public string SubOpenId { get; set; } = default!; + /// /// 获取或设置签约信息。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/SendEducationPAPayContractNotificationRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/SendEducationPAPayContractNotificationRequest.cs index 1068d54cb..31c2460a6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/SendEducationPAPayContractNotificationRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/EducationPAPay/SendEducationPAPayContractNotificationRequest.cs @@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models /// public class SendEducationPAPayContractNotificationRequest : WechatTenpayRequest { + /// + /// 获取或设置子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mchid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] + public string? SubMerchantId { get; set; } + /// /// 获取或设置微信 AppId。 /// @@ -12,6 +19,13 @@ public class SendEducationPAPayContractNotificationRequest : WechatTenpayRequest [System.Text.Json.Serialization.JsonPropertyName("appid")] public string AppId { get; set; } = string.Empty; + /// + /// 获取或设置子商户 AppId。 + /// + [Newtonsoft.Json.JsonProperty("sub_appid")] + [System.Text.Json.Serialization.JsonPropertyName("sub_appid")] + public string? SubAppId { get; set; } + /// /// 获取或设置签约协议号。 /// diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/CreateEducationPAPayTransactionRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/CreateEducationPAPayTransactionRequest.json index c1e166293..9aef22306 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/CreateEducationPAPayTransactionRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/CreateEducationPAPayTransactionRequest.json @@ -1,5 +1,7 @@ { "appid": "wx8888888888888888", + "sub_mchid": "1900000109", + "sub_appid": "wx8888888888888888", "body": "新东方-语文课程", "attach": "自定义数据", "out_trade_no": "121775250124070332", diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayContractByContractIdResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayContractByContractIdResponse.json index 6ea96e986..fd3deb306 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayContractByContractIdResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayContractByContractIdResponse.json @@ -1,6 +1,10 @@ { + "sp_mchid": "1230000109", "appid": "wx8888888888888888", + "sub_mchid": "1900000109", + "sub_appid": "wx8888888888888888", "openid": "oUpF8uMuAJOM2pxb1Q", + "sub_openid": "oUpF8uMuAJOM2pxb1Q", "plan_id": "101164396123311331", "contract_information": { "contract_id": "wx998877665544wx", diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByIdResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByIdResponse.json index 17dab13cd..43db9616d 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByIdResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByIdResponse.json @@ -1,5 +1,8 @@ { + "sp_mchid": "1230000109", "appid": "wx8888888888888888", + "sub_mchid": "1900000109", + "sub_appid": "wx8888888888888888", "out_trade_no": "201407033233368018", "transaction_id": "25012014070332333018", "attach": "自定义数据", @@ -8,7 +11,8 @@ "trade_state": "SUCCESS", "trade_state_description": "支付成功", "payer": { - "openid": "oUpF8uMuAJOM2pxb1Q" + "openid": "oUpF8uMuAJOM2pxb1Q", + "sub_openid": "oUpF8uMuAJOM2pxb1Q" }, "amount": { "total": 888, @@ -24,8 +28,8 @@ { "coupon_id": "109519", "name": "单品惠-6", - "scope": "GLOBALSINGLE", - "type": "DISCOUNTCOUPON", + "scope": "GLOBAL", + "type": "DISCOUNT", "amount": 5, "stock_id": "931386", "wechatpay_contribute": 0, diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.json index 03a201145..43db9616d 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/GetEducationPAPayTransactionByOutTradeNumberResponse.json @@ -1,4 +1,8 @@ { + "sp_mchid": "1230000109", + "appid": "wx8888888888888888", + "sub_mchid": "1900000109", + "sub_appid": "wx8888888888888888", "out_trade_no": "201407033233368018", "transaction_id": "25012014070332333018", "attach": "自定义数据", @@ -7,7 +11,8 @@ "trade_state": "SUCCESS", "trade_state_description": "支付成功", "payer": { - "openid": "oUpF8uMuAJOM2pxb1Q" + "openid": "oUpF8uMuAJOM2pxb1Q", + "sub_openid": "oUpF8uMuAJOM2pxb1Q" }, "amount": { "total": 888, @@ -23,8 +28,8 @@ { "coupon_id": "109519", "name": "单品惠-6", - "scope": "GLOBALSINGLE", - "type": "DISCOUNTCOUPON", + "scope": "GLOBAL", + "type": "DISCOUNT", "amount": 5, "stock_id": "931386", "wechatpay_contribute": 0, diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/PresignEducationPAPayContractRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/PresignEducationPAPayContractRequest.json index eb9cced8a..fb33eea49 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/PresignEducationPAPayContractRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/PresignEducationPAPayContractRequest.json @@ -1,6 +1,9 @@ { "appid": "wx8888888888888888", + "sub_mchid": "1900000109", + "sub_appid": "wx8888888888888888", "openid": "oUpF8uMuAJOM2pxb1Q", + "sub_openid": "oUpF8uMuAJOM2pxb2W", "plan_id": "101164396123311331", "user_id": "20200330tony", "period_start_date": "2020-03-19", diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/QueryEducationPAPayUserContractsResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/QueryEducationPAPayUserContractsResponse.json index eaefa6342..469ad606b 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/QueryEducationPAPayUserContractsResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/QueryEducationPAPayUserContractsResponse.json @@ -1,8 +1,12 @@ { "data": [ { + "sp_mchid": "1230000109", "appid": "wx8888888888888888", + "sub_mchid": "1900000109", + "sub_appid": "wx8888888888888888", "openid": "oUpF8uMuAJOM2pxb1Q", + "sub_openid": "oUpF8uMuAJOM2pxb1Q", "plan_id": "101164396123311331", "contract_information": { "contract_id": "wx998877665544wx", @@ -12,6 +16,6 @@ } ], "total_count": 30, - "offset": 0, + "offset": 1, "limit": 20 } diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/SendEducationPAPayContractNotificationRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/SendEducationPAPayContractNotificationRequest.json index c248aae33..d9dec0bd6 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/SendEducationPAPayContractNotificationRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/_/EducationPAPay/SendEducationPAPayContractNotificationRequest.json @@ -1,3 +1,5 @@ { - "appid": "wx8888888888888888" + "appid": "wx8888888888888888", + "sub_mchid": "1900000109", + "sub_appid": "wx8888888888888888" }