mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-03-10 00:13:36 +08:00
feat(tenpayv3): 新增服务商教育续费通相关接口
This commit is contained in:
@@ -12,7 +12,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [POST] /edu-papay/contracts/presign 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_1.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/contracts/pre-sign.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/contracts/pre-sign.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -34,7 +35,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [GET] /edu-papay/contracts/id/{contract_id} 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_2.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/contracts/query-contract.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/contracts/query-contract.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -50,6 +52,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
.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<Models.GetEducationPAPayContractByContractIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -57,7 +65,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [GET] /edu-papay/user/{openid}/contracts 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_3.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/contracts/list-user-contracts.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/contracts/list-user-contracts.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -74,6 +83,15 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
.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 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [DELETE] /edu-papay/contracts/{contract_id} 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_4.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/contracts/delete-contract.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/contracts/list-user-contracts.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -112,7 +131,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [POST] /edu-papay/user-notifications/{contract_id}/send 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_6.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/user-notifications/send-user-notification.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/user-notifications/send-user-notification.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -134,7 +154,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [POST] /edu-papay/transactions 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_7.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/transactions/create-transaction.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/transactions/create-transaction.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -156,7 +177,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [GET] /edu-papay/transactions/out-trade-no/{out_trade_no} 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_9.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/transactions/query-transaction-by-out-trade-no.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/transactions/query-transaction-by-out-trade-no.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -178,7 +200,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
/// <para>异步调用 [GET] /edu-papay/transactions/id/{transaction_id} 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_8.shtml ]]>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/transactions/query-transaction-by-id.html ]]> <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/transactions/query-transaction-by-id.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
|
||||
@@ -29,6 +29,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -36,6 +43,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// </summary>
|
||||
public class GetEducationPAPayContractByContractIdRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -12,6 +19,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
|
||||
@@ -36,6 +36,20 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sp_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -43,6 +57,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
@@ -57,6 +78,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户在子商户下的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
||||
public string SubOpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约信息。
|
||||
/// </summary>
|
||||
|
||||
@@ -11,6 +11,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
public class Payer : GetPayTransactionByOutTradeNumberResponse.Types.Payer
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户在子商户下的唯一标识。
|
||||
/// </summary>
|
||||
[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 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sp_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -142,6 +162,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// </summary>
|
||||
public class PresignEducationPAPayContractRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -12,6 +19,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
@@ -26,6 +40,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户在子商户下的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
||||
public string? SubOpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户用户账号标识。
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// </summary>
|
||||
public class QueryEducationPAPayUserContractsRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -12,6 +19,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
@@ -26,6 +40,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户在子商户下的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? SubOpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约状态。
|
||||
/// </summary>
|
||||
|
||||
@@ -16,6 +16,20 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sp_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -23,6 +37,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
@@ -37,6 +58,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户在子商户下的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
||||
public string SubOpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约信息。
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// </summary>
|
||||
public class SendEducationPAPayContractNotificationRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
@@ -12,6 +19,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||
public string? SubAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user