mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-18 17:48:12 +08:00
feat(tenpayv2): 新增车主平台相关接口
This commit is contained in:
@@ -239,6 +239,22 @@
|
|||||||
|
|
||||||
- 查询签约关系:`GetPAPPayContract`
|
- 查询签约关系:`GetPAPPayContract`
|
||||||
|
|
||||||
|
- 车主平台:
|
||||||
|
|
||||||
|
- 用户入场通知:`NotifyVehiclePay`
|
||||||
|
|
||||||
|
- 申请扣款:`ApplyVehiclePay`
|
||||||
|
|
||||||
|
- 下载交易账单:`DownloadPayBill`
|
||||||
|
|
||||||
|
- 申请退款:`CreatePayRefund`
|
||||||
|
|
||||||
|
- 查询退款:`GetPayRefund`
|
||||||
|
|
||||||
|
- 查询订单:`GetTransitOrder`
|
||||||
|
|
||||||
|
- 用户状态查询:`GetVehiclePayState`
|
||||||
|
|
||||||
- 清关报关:
|
- 清关报关:
|
||||||
|
|
||||||
- 订单附加信息提交接口:`CreateMerchantCustomsCustomDeclaration`
|
- 订单附加信息提交接口:`CreateMerchantCustomsCustomDeclaration`
|
||||||
@@ -373,6 +389,22 @@
|
|||||||
|
|
||||||
- 交易保障:`SubmitPayITILReport`
|
- 交易保障:`SubmitPayITILReport`
|
||||||
|
|
||||||
|
- 支付工具:
|
||||||
|
|
||||||
|
- 现金红包:
|
||||||
|
|
||||||
|
- 发放红包:`SendPayMarketingTransfersRedPack`
|
||||||
|
|
||||||
|
- 发放裂变红包:`SendPayMarketingTransfersGroupRedPack`
|
||||||
|
|
||||||
|
- 查询红包记录:`GetPayMarketingTransfersRedPackInfo`
|
||||||
|
|
||||||
|
- 小程序红包:
|
||||||
|
|
||||||
|
- 发放红包:`SendPayMarketingTransfersMiniProgramRedPack`
|
||||||
|
|
||||||
|
- 查询红包记录:`GetPayMarketingTransfersRedPackInfo`
|
||||||
|
|
||||||
- 扣款服务:
|
- 扣款服务:
|
||||||
|
|
||||||
- APP 纯签约:`CreatePAPPayPartnerPreEntrustWeb`
|
- APP 纯签约:`CreatePAPPayPartnerPreEntrustWeb`
|
||||||
@@ -417,24 +449,10 @@
|
|||||||
|
|
||||||
- 查询退款:`GetPayRefund`
|
- 查询退款:`GetPayRefund`
|
||||||
|
|
||||||
|
- 查询订单:`GetTransitPartnerOrder`
|
||||||
|
|
||||||
- 用户状态查询:`GetVehiclePartnerPayState`
|
- 用户状态查询:`GetVehiclePartnerPayState`
|
||||||
|
|
||||||
- 支付工具:
|
|
||||||
|
|
||||||
- 现金红包:
|
|
||||||
|
|
||||||
- 发放红包:`SendPayMarketingTransfersRedPack`
|
|
||||||
|
|
||||||
- 发放裂变红包:`SendPayMarketingTransfersGroupRedPack`
|
|
||||||
|
|
||||||
- 查询红包记录:`GetPayMarketingTransfersRedPackInfo`
|
|
||||||
|
|
||||||
- 小程序红包:
|
|
||||||
|
|
||||||
- 发放红包:`SendPayMarketingTransfersMiniProgramRedPack`
|
|
||||||
|
|
||||||
- 查询红包记录:`GetPayMarketingTransfersRedPackInfo`
|
|
||||||
|
|
||||||
- 小微商户:
|
- 小微商户:
|
||||||
|
|
||||||
- 查询提现状态:`GetFundAutoWithdrawByDate`
|
- 查询提现状态:`GetFundAutoWithdrawByDate`
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -73,8 +73,8 @@ namespace Newtonsoft.Json.Converters
|
|||||||
else if (reader.TokenType == JsonToken.StartObject)
|
else if (reader.TokenType == JsonToken.StartObject)
|
||||||
{
|
{
|
||||||
InnerTypedJsonPropertyInfo[] typedJsonProperties = GetTypedJsonProperties(objectType);
|
InnerTypedJsonPropertyInfo[] typedJsonProperties = GetTypedJsonProperties(objectType);
|
||||||
if (typedJsonProperties.Count(p => p.PropertyIsNArray) != 1)
|
//if (typedJsonProperties.Count(p => p.PropertyIsNArray) != 1)
|
||||||
throw new JsonSerializationException("The number of `$n` properties must be only one.");
|
// throw new JsonSerializationException("The count of `$n` properties must be only one.");
|
||||||
|
|
||||||
JObject jObject = JObject.Load(reader);
|
JObject jObject = JObject.Load(reader);
|
||||||
T tObject = new T();
|
T tObject = new T();
|
||||||
@@ -90,25 +90,28 @@ namespace Newtonsoft.Json.Converters
|
|||||||
}
|
}
|
||||||
else if (TryMatchNArrayIndex(jProperty.Name, out int index))
|
else if (TryMatchNArrayIndex(jProperty.Name, out int index))
|
||||||
{
|
{
|
||||||
typedJsonPropertyInfo = typedJsonProperties.Single(e => e.PropertyIsNArray);
|
foreach (var _ in typedJsonProperties.Where(e => e.PropertyIsNArray))
|
||||||
|
|
||||||
Array? propertyValue = typedJsonPropertyInfo.PropertyInfo.GetValue(tObject) as Array;
|
|
||||||
ReflectionUtility.CreateOrExpandArray(ref propertyValue, typedJsonPropertyInfo.PropertyType.GetElementType()!, index + 1);
|
|
||||||
ReflectionUtility.CreateOrExpandArrayElement(propertyValue!, index, (object element) =>
|
|
||||||
{
|
{
|
||||||
InnerTypedJsonPropertyInfo? insider = GetTypedJsonProperties(element.GetType())
|
typedJsonPropertyInfo = _;
|
||||||
.SingleOrDefault(p => string.Equals(p.PropertyName.Replace(PROPERTY_WILDCARD_NARRAY_ELEMENT, index.ToString()), jProperty.Name));
|
|
||||||
if (insider != null)
|
Array? propertyValue = typedJsonPropertyInfo.PropertyInfo.GetValue(tObject) as Array;
|
||||||
|
ReflectionUtility.CreateOrExpandArray(ref propertyValue, typedJsonPropertyInfo.PropertyType.GetElementType()!, index + 1);
|
||||||
|
ReflectionUtility.CreateOrExpandArrayElement(propertyValue!, index, (object element) =>
|
||||||
{
|
{
|
||||||
JsonSerializer tmpSerializer = GetClonedJsonSerializer(serializer, insider.JsonConverterOnRead);
|
InnerTypedJsonPropertyInfo? insider = GetTypedJsonProperties(element.GetType())
|
||||||
object? elementPropertyValue = jProperty.Value?.ToObject(insider.PropertyType, tmpSerializer);
|
.SingleOrDefault(p => string.Equals(p.PropertyName.Replace(PROPERTY_WILDCARD_NARRAY_ELEMENT, index.ToString()), jProperty.Name));
|
||||||
insider.PropertyInfo.SetValue(element, elementPropertyValue);
|
if (insider != null)
|
||||||
}
|
{
|
||||||
|
JsonSerializer tmpSerializer = GetClonedJsonSerializer(serializer, insider.JsonConverterOnRead);
|
||||||
|
object? elementPropertyValue = jProperty.Value?.ToObject(insider.PropertyType, tmpSerializer);
|
||||||
|
insider.PropertyInfo.SetValue(element, elementPropertyValue);
|
||||||
|
}
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
});
|
});
|
||||||
|
|
||||||
typedJsonPropertyInfo.PropertyInfo.SetValue(tObject, propertyValue);
|
typedJsonPropertyInfo.PropertyInfo.SetValue(tObject, propertyValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (serializer.MissingMemberHandling == MissingMemberHandling.Error)
|
else if (serializer.MissingMemberHandling == MissingMemberHandling.Error)
|
||||||
{
|
{
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -59,8 +59,8 @@ namespace System.Text.Json.Converters
|
|||||||
else if (reader.TokenType == JsonTokenType.StartObject)
|
else if (reader.TokenType == JsonTokenType.StartObject)
|
||||||
{
|
{
|
||||||
InnerTypedJsonPropertyInfo[] typedJsonProperties = GetTypedJsonProperties(typeToConvert);
|
InnerTypedJsonPropertyInfo[] typedJsonProperties = GetTypedJsonProperties(typeToConvert);
|
||||||
if (typedJsonProperties.Count(p => p.PropertyIsNArray) != 1)
|
//if (typedJsonProperties.Count(p => p.PropertyIsNArray) != 1)
|
||||||
throw new JsonException("The number of `$n` properties must be only one.");
|
// throw new JsonException("The count of `$n` properties must be only one.");
|
||||||
|
|
||||||
JsonElement jElement = JsonDocument.ParseValue(ref reader).RootElement.Clone();
|
JsonElement jElement = JsonDocument.ParseValue(ref reader).RootElement.Clone();
|
||||||
T tObject = new T();
|
T tObject = new T();
|
||||||
@@ -76,25 +76,28 @@ namespace System.Text.Json.Converters
|
|||||||
}
|
}
|
||||||
else if (TryMatchNArrayIndex(jProperty.Name, out int index))
|
else if (TryMatchNArrayIndex(jProperty.Name, out int index))
|
||||||
{
|
{
|
||||||
typedJsonPropertyInfo = typedJsonProperties.Single(e => e.PropertyIsNArray);
|
foreach (var _ in typedJsonProperties.Where(e => e.PropertyIsNArray))
|
||||||
|
|
||||||
Array? propertyValue = typedJsonPropertyInfo.PropertyInfo.GetValue(tObject) as Array;
|
|
||||||
ReflectionUtility.CreateOrExpandArray(ref propertyValue, typedJsonPropertyInfo.PropertyType.GetElementType()!, index + 1);
|
|
||||||
ReflectionUtility.CreateOrExpandArrayElement(propertyValue!, index, (object element) =>
|
|
||||||
{
|
{
|
||||||
InnerTypedJsonPropertyInfo? insider = GetTypedJsonProperties(element.GetType())
|
typedJsonPropertyInfo = _;
|
||||||
.SingleOrDefault(p => string.Equals(p.PropertyName.Replace(PROPERTY_WILDCARD_NARRAY_ELEMENT, index.ToString()), jProperty.Name));
|
|
||||||
if (insider != null)
|
Array? propertyValue = typedJsonPropertyInfo.PropertyInfo.GetValue(tObject) as Array;
|
||||||
|
ReflectionUtility.CreateOrExpandArray(ref propertyValue, typedJsonPropertyInfo.PropertyType.GetElementType()!, index + 1);
|
||||||
|
ReflectionUtility.CreateOrExpandArrayElement(propertyValue!, index, (object element) =>
|
||||||
{
|
{
|
||||||
JsonSerializerOptions tmpOptions = GetClonedJsonSerializerOptions(options, insider.JsonConverter);
|
InnerTypedJsonPropertyInfo? insider = GetTypedJsonProperties(element.GetType())
|
||||||
object? elementPropertyValue = JsonSerializer.Deserialize(jProperty.Value, insider.PropertyType, tmpOptions)!;
|
.SingleOrDefault(p => string.Equals(p.PropertyName.Replace(PROPERTY_WILDCARD_NARRAY_ELEMENT, index.ToString()), jProperty.Name));
|
||||||
insider.PropertyInfo.SetValue(element, elementPropertyValue);
|
if (insider != null)
|
||||||
}
|
{
|
||||||
|
JsonSerializerOptions tmpOptions = GetClonedJsonSerializerOptions(options, insider.JsonConverter);
|
||||||
|
object? elementPropertyValue = JsonSerializer.Deserialize(jProperty.Value, insider.PropertyType, tmpOptions)!;
|
||||||
|
insider.PropertyInfo.SetValue(element, elementPropertyValue);
|
||||||
|
}
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
});
|
});
|
||||||
|
|
||||||
typedJsonPropertyInfo.PropertyInfo.SetValue(tObject, propertyValue);
|
typedJsonPropertyInfo.PropertyInfo.SetValue(tObject, propertyValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tObject;
|
return tObject;
|
||||||
|
@@ -0,0 +1,61 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Events
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示车主平台通知的模型。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class VehicleEvent : WechatTenpayEvent
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")]
|
||||||
|
public string? SubMerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户 AppId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车牌号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("plate_number")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number")]
|
||||||
|
public string PlateNumber { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置发起扣费方式。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("deduct_mode")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("deduct_mode")]
|
||||||
|
public string? DeductMode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置变更事件类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("vehicle_event_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("vehicle_event_type")]
|
||||||
|
public string EventType { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置变更事件信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("vehicle_event_des")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("vehicle_event_des")]
|
||||||
|
public string? EventDescription { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置变更事件时间。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("vehicle_event_createtime")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.PureDigitalTextDateTimeOffsetConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("vehicle_event_createtime")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.PureDigitalTextDateTimeOffsetConverter))]
|
||||||
|
public DateTimeOffset EventTime { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,87 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Flurl.Http;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
|
||||||
|
{
|
||||||
|
public static class WechatTenpayClientExecuteVehicleExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /vehicle/pay/notification 接口。</para>
|
||||||
|
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2.php?chapter=20_992 </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.NotifyVehiclePayResponse> ExecuteNotifyVehiclePayAsync(this WechatTenpayClient client, Models.NotifyVehiclePayRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateRequest(request, HttpMethod.Post, "vehicle", "pay", "notification");
|
||||||
|
|
||||||
|
return await client.SendRequestWithXmlAsync<Models.NotifyVehiclePayResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /vehicle/pay/payapply 接口。</para>
|
||||||
|
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2.php?chapter=20_982 </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ApplyVehiclePayResponse> ExecuteApplyVehiclePayAsync(this WechatTenpayClient client, Models.ApplyVehiclePayRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateRequest(request, HttpMethod.Post, "vehicle", "pay", "payapply");
|
||||||
|
|
||||||
|
return await client.SendRequestWithXmlAsync<Models.ApplyVehiclePayResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /vehicle/pay/querystate 接口。</para>
|
||||||
|
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2.php?chapter=20_93 </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.GetVehiclePayStateResponse> ExecuteGetVehiclePayStateAsync(this WechatTenpayClient client, Models.GetVehiclePayStateRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateRequest(request, HttpMethod.Post, "vehicle", "pay", "querystate");
|
||||||
|
|
||||||
|
return await client.SendRequestWithXmlAsync<Models.GetVehiclePayStateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /transit/queryorder 接口。</para>
|
||||||
|
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2.php?chapter=20_96 </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.GetTransitOrderResponse> ExecuteGetTransitOrderAsync(this WechatTenpayClient client, Models.GetTransitOrderRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateRequest(request, HttpMethod.Post, "transit", "queryorder");
|
||||||
|
|
||||||
|
return await client.SendRequestWithXmlAsync<Models.GetTransitOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -64,5 +64,24 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
|
|||||||
|
|
||||||
return await client.SendRequestWithXmlAsync<Models.GetVehiclePartnerPayStateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
return await client.SendRequestWithXmlAsync<Models.GetVehiclePartnerPayStateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /transit/partnerpay/queryorder 接口。</para>
|
||||||
|
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2_sl.php?chapter=20_96 </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.GetTransitPartnerOrderResponse> ExecuteGetTransitPartnerOrderAsync(this WechatTenpayClient client, Models.GetTransitPartnerOrderRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateRequest(request, HttpMethod.Post, "transit", "partnerpay", "queryorder");
|
||||||
|
|
||||||
|
return await client.SendRequestWithXmlAsync<Models.GetTransitPartnerOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,275 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /vehicle/pay/payapply 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ApplyVehiclePayRequest : WechatTenpaySignableRequest
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Scene
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data : NotifyVehiclePayRequest.Types.Scene.Types.Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置出场时间。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("end_time")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.PureDigitalTextNullableDateTimeOffsetConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.PureDigitalTextNullableDateTimeOffsetConverter))]
|
||||||
|
public DateTimeOffset? EndTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置支持的扣费方式。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("support_deduct_mode")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("support_deduct_mode")]
|
||||||
|
public string? SupportDeductMode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置发起扣费方式。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("deduct_mode")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("deduct_mode")]
|
||||||
|
public string? DeductMode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计费时长(单位:秒)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("charging_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("charging_time")]
|
||||||
|
public int? ChargingDuration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置加油站名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("gas_station")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("gas_station")]
|
||||||
|
public string? GasStation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置油品标号名。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("gas_label_name")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("gas_label_name")]
|
||||||
|
public string? GasLabelName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置油品类型名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("gas_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("gas_type")]
|
||||||
|
public string? GasType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置油品标准。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("gas_standard")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("gas_standard")]
|
||||||
|
public string? GasStandard { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置油量(单位:毫升)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("gas_amount")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("gas_amount")]
|
||||||
|
public int? GasAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置油枪号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("gas_gun_no")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("gas_gun_no")]
|
||||||
|
public int? GasGunNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置入口名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("entrance_name")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("entrance_name")]
|
||||||
|
public string? EntranceName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置出口名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("exit_name")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("exit_name")]
|
||||||
|
public string? ExitName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置核载人数。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("carrying_capacity")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("carrying_capacity")]
|
||||||
|
public int? CarryingCapacity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置核载区间字符串。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("carrying_range")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("carrying_range")]
|
||||||
|
public string? CarryingRangeString { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置通道类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("channel_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("channel_type")]
|
||||||
|
public string? ChannelType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置场景信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("scene_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static class Converters
|
||||||
|
{
|
||||||
|
internal class RequestPropertySceneNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class RequestPropertySceneSystemTextJsonConverter : System.Text.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置接口版本号。
|
||||||
|
/// <para>默认值:3.0</para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("version")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||||
|
public string Version { get; set; } = "3.0";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
public override string? MerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
public override string? AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// <para>默认值:<see cref="Constants.SignTypes.HMAC_SHA256"/></para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sign_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sign_type")]
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string SignType { get; set; } = Constants.SignTypes.HMAC_SHA256;
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("body")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("body")]
|
||||||
|
public string Body { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户订单号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("out_trade_no")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("out_trade_no")]
|
||||||
|
public string OutTradeNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置订单金额(单位:分)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("total_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("total_fee")]
|
||||||
|
public int TotalFee { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置货币类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("fee_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("fee_type")]
|
||||||
|
public string? FeeType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户的 OpenId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||||
|
public string? OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置交易类型。
|
||||||
|
/// <para>默认值:PAP</para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("trade_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("trade_type")]
|
||||||
|
public string TradeType { get; set; } = "PAP";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置交易场景值。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
||||||
|
public string TradeScene { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置附加数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("attach")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("attach")]
|
||||||
|
public string? Attachment { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户终端 IP。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("spbill_create_ip")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("spbill_create_ip")]
|
||||||
|
public string ClientIp { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置订单优惠标记。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("goods_tag")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("goods_tag")]
|
||||||
|
public string? GoodsTag { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置通知地址。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("notify_url")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("notify_url")]
|
||||||
|
public string NotifyUrl { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置场景信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("scene_info")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertySceneNewtonsoftJsonConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.RequestPropertySceneSystemTextJsonConverter))]
|
||||||
|
public Types.Scene? Scene { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否分账。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("profit_sharing")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.YesOrNoNullableBooleanConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.YesOrNoNullableBooleanConverter))]
|
||||||
|
public bool? IsProfitSharing { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,37 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /vehicle/pay/payapply 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ApplyVehiclePayResponse : WechatTenpaySignableResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string MerchantId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string AppId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置终端设备号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("device_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("device_info")]
|
||||||
|
public string? DeviceInfo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,46 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /transit/queryorder 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetTransitOrderRequest : WechatTenpaySignableRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
public override string? MerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
public override string? AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// <para>默认值:<see cref="Constants.SignTypes.HMAC_SHA256"/></para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sign_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sign_type")]
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string SignType { get; set; } = Constants.SignTypes.HMAC_SHA256;
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户订单号。与字段 <see cref="TransactionId"/> 二选一。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("out_trade_no")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("out_trade_no")]
|
||||||
|
public string? OutTradeNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信订单号。与字段 <see cref="OutTradeNumber"/> 二选一。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||||
|
public string? TransactionId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,194 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /transit/queryorder 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponseClassNewtonsoftJsonConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponseClassSystemTextJsonConverter))]
|
||||||
|
public class GetTransitOrderResponse : WechatTenpaySignableResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Coupon : GetPayOrderResponse.Types.Coupon
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static class Converters
|
||||||
|
{
|
||||||
|
internal class ResponseClassNewtonsoftJsonConverter : Newtonsoft.Json.Converters.FlattenNArrayObjectConverterBase<GetTransitOrderResponse>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class ResponseClassSystemTextJsonConverter : System.Text.Json.Converters.FlattenNArrayObjectConverterBase<GetTransitOrderResponse>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string MerchantId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string AppId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置终端设备号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("device_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("device_info")]
|
||||||
|
public string? DeviceInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户唯一标识。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||||
|
public string OpenId { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户是否订阅该公众号标识。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("is_subscribe")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.YesOrNoNullableBooleanConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("is_subscribe")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.YesOrNoNullableBooleanConverter))]
|
||||||
|
public bool? IsSubscribed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置交易状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("trade_state")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("trade_state")]
|
||||||
|
public string TradeState { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置交易状态描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("trade_state_desc")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("trade_state_desc")]
|
||||||
|
public string TradeStateDescription { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置交易类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("trade_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("trade_type")]
|
||||||
|
public string TradeType { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置付款银行。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("bank_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("bank_type")]
|
||||||
|
public string BankType { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置订单金额(单位:分)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("total_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("total_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public int TotalFee { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置货币类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("fee_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("fee_type")]
|
||||||
|
public string? FeeType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置应结订单金额(单位:分)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("settlement_total_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("settlement_total_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public int? SettlementFee { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置代金券金额。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("coupon_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("coupon_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public int? CouponFee { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置代金券使用数量。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("coupon_count")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("coupon_count")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public int? CouponCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置代金券使用列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty(Newtonsoft.Json.Converters.FlattenNArrayObjectConverterBase.PROPERTY_NAME_NARRAY)]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName(System.Text.Json.Converters.FlattenNArrayObjectConverterBase.PROPERTY_NAME_NARRAY)]
|
||||||
|
public Types.Coupon[]? CouponList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置现金支付金额(单位:分)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("cash_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("cash_fee")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public int? CashFee { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置现金支付货币类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("cash_fee_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("cash_fee_type")]
|
||||||
|
public string? CashFeeType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户订单号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("out_trade_no")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("out_trade_no")]
|
||||||
|
public string OutTradeNumber { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信支付订单号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||||
|
public string TransactionId { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置附加数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("attach")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("attach")]
|
||||||
|
public string? Attachment { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置支付完成时间。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("time_end")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.PureDigitalTextNullableDateTimeOffsetConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("time_end")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.PureDigitalTextNullableDateTimeOffsetConverter))]
|
||||||
|
public DateTimeOffset? EndTime { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,68 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /vehicle/pay/querystate 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetVehiclePayStateRequest : WechatTenpaySignableRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置接口版本号。
|
||||||
|
/// <para>默认值:3.0</para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("version")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||||
|
public string Version { get; set; } = "3.0";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
public override string? MerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
public override string? AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// <para>默认值:<see cref="Constants.SignTypes.HMAC_SHA256"/></para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sign_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sign_type")]
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string SignType { get; set; } = Constants.SignTypes.HMAC_SHA256;
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置交易场景值。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
||||||
|
public string TradeScene { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置跳转场景。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("jump_scene")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("jump_scene")]
|
||||||
|
public string? JumpScene { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户的 OpenId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||||
|
public string? OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车牌号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("plate_number")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number")]
|
||||||
|
public string? PlateNumber { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,118 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /vehicle/pay/querystate 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetVehiclePayStateResponse : WechatTenpaySignableResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class PlateNumberInfo
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车牌号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("plate_number")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number")]
|
||||||
|
public string PlateNumber { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车牌通道标识。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("channel_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("channel_type")]
|
||||||
|
public string? ChannelType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置常用车牌标志。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("common_use_flag")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("common_use_flag")]
|
||||||
|
public string? CommonUseFlag { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车牌号信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("plate_number_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number_info")]
|
||||||
|
public Types.Data[] Data { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static class Converters
|
||||||
|
{
|
||||||
|
internal class ResponsePropertyPlateNumberInfoNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.PlateNumberInfo>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class ResponsePropertyPlateNumberInfoSystemTextJsonConverter : System.Text.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.PlateNumberInfo>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string MerchantId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string AppId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("user_state")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("user_state")]
|
||||||
|
public string UserState { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置发起扣费方式。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("deduct_mode")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("deduct_mode")]
|
||||||
|
public string? DeductMode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户的 OpenId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||||
|
public string? OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置跳转路径。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("path")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||||
|
public string? JumpPath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车牌号信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("plate_number_info")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponsePropertyPlateNumberInfoNewtonsoftJsonConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponsePropertyPlateNumberInfoSystemTextJsonConverter))]
|
||||||
|
public Types.PlateNumberInfo? PlateNumberInfo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,153 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /vehicle/pay/notification 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class NotifyVehiclePayRequest : WechatTenpaySignableRequest
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Scene
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置入场时间。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("start_time")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.PureDigitalTextDateTimeOffsetConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("start_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.PureDigitalTextDateTimeOffsetConverter))]
|
||||||
|
public DateTimeOffset StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车牌号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("plate_number")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number")]
|
||||||
|
public string? PlateNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车辆类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("car_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("car_type")]
|
||||||
|
public string? CarType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置停车场名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("parking_name")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("parking_name")]
|
||||||
|
public string? ParkingName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置车位编号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("space_number")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("space_number")]
|
||||||
|
public string? SpaceNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置免费时长(单位:秒)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("free_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("free_time")]
|
||||||
|
public int? FreeDuration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户的 OpenId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||||
|
public string? OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户在子商户下的 OpenId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
||||||
|
public string? SubOpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置通知地址。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("notify_url")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("notify_url")]
|
||||||
|
public string? NotifyUrl { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置停车信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("scene_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static class Converters
|
||||||
|
{
|
||||||
|
internal class RequestPropertySceneNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class RequestPropertySceneSystemTextJsonConverter : System.Text.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置接口版本号。
|
||||||
|
/// <para>默认值:3.0</para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("version")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||||
|
public string Version { get; set; } = "3.0";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
public override string? MerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
public override string? AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// <para>默认值:<see cref="Constants.SignTypes.HMAC_SHA256"/></para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sign_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sign_type")]
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string SignType { get; set; } = Constants.SignTypes.HMAC_SHA256;
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置交易场景值。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
||||||
|
public string TradeScene { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置场景信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("scene_info")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertySceneNewtonsoftJsonConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.RequestPropertySceneSystemTextJsonConverter))]
|
||||||
|
public Types.Scene? Scene { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,44 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /vehicle/pay/notification 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class NotifyVehiclePayResponse : WechatTenpaySignableResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string MerchantId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
#pragma warning disable CS8765
|
||||||
|
public override string AppId { get; set; }
|
||||||
|
#pragma warning restore CS8765
|
||||||
|
#pragma warning restore CS8618
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("user_state")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("user_state")]
|
||||||
|
public string UserState { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置发起扣费方式。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("deduct_mode")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("deduct_mode")]
|
||||||
|
public string? DeductMode { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -1,126 +1,18 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /vehicle/partnerpay/payapply 接口的请求。</para>
|
/// <para>表示 [POST] /vehicle/partnerpay/payapply 接口的请求。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ApplyVehiclePartnerPayRequest : WechatTenpaySignableRequest
|
public class ApplyVehiclePartnerPayRequest : ApplyVehiclePayRequest
|
||||||
{
|
{
|
||||||
public static class Types
|
public static new class Types
|
||||||
{
|
{
|
||||||
public class Scene
|
public class Scene : ApplyVehiclePayRequest.Types.Scene
|
||||||
{
|
{
|
||||||
public static class Types
|
public static new class Types
|
||||||
{
|
{
|
||||||
public class Data : NotifyVehiclePartnerPayRequest.Types.Scene.Types.Data
|
public class Data : ApplyVehiclePayRequest.Types.Scene.Types.Data
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置出场时间。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("end_time")]
|
|
||||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.PureDigitalTextNullableDateTimeOffsetConverter))]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
|
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.PureDigitalTextNullableDateTimeOffsetConverter))]
|
|
||||||
public DateTimeOffset? EndTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置支持的扣费方式。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("support_deduct_mode")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("support_deduct_mode")]
|
|
||||||
public string? SupportDeductMode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置发起扣费方式。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("deduct_mode")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("deduct_mode")]
|
|
||||||
public string? DeductMode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置计费时长(单位:秒)。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("charging_time")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("charging_time")]
|
|
||||||
public int? ChargingDuration { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置加油站名称。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("gas_station")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("gas_station")]
|
|
||||||
public string? GasStation { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置油品标号名。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("gas_label_name")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("gas_label_name")]
|
|
||||||
public string? GasLabelName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置油品类型名称。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("gas_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("gas_type")]
|
|
||||||
public string? GasType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置油品标准。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("gas_standard")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("gas_standard")]
|
|
||||||
public string? GasStandard { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置油量(单位:毫升)。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("gas_amount")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("gas_amount")]
|
|
||||||
public int? GasAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置油枪号。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("gas_gun_no")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("gas_gun_no")]
|
|
||||||
public int? GasGunNumber { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置入口名称。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("entrance_name")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("entrance_name")]
|
|
||||||
public string? EntranceName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置出口名称。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("exit_name")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("exit_name")]
|
|
||||||
public string? ExitName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置核载人数。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("carrying_capacity")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("carrying_capacity")]
|
|
||||||
public int? CarryingCapacity { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置核载区间字符串。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("carrying_range")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("carrying_range")]
|
|
||||||
public string? CarryingRangeString { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置通道类型。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("channel_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("channel_type")]
|
|
||||||
public string? ChannelType { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,11 +21,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("scene_info")]
|
[Newtonsoft.Json.JsonProperty("scene_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
public Types.Data Data { get; set; } = new Types.Data();
|
public new Types.Data Data { get; set; } = new Types.Data();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static class Converters
|
internal static new class Converters
|
||||||
{
|
{
|
||||||
internal class RequestPropertySceneNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
internal class RequestPropertySceneNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
||||||
{
|
{
|
||||||
@@ -144,20 +36,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("mch_id")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
|
||||||
public override string? MerchantId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("appid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
|
||||||
public override string? AppId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -172,92 +50,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
public string? SubAppId { get; set; }
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置接口版本号。
|
|
||||||
/// <para>默认值:3.0</para>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("version")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
|
||||||
public string Version { get; set; } = "3.0";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置商品描述。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("body")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("body")]
|
|
||||||
public string Body { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置商户订单号。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("out_trade_no")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("out_trade_no")]
|
|
||||||
public string OutTradeNumber { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置订单金额(单位:分)。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("total_fee")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("total_fee")]
|
|
||||||
public int TotalFee { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置货币类型。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("fee_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("fee_type")]
|
|
||||||
public string? FeeType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户的 OpenId。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("openid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
|
||||||
public string? OpenId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置交易类型。
|
|
||||||
/// <para>默认值:PAP</para>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("trade_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("trade_type")]
|
|
||||||
public string TradeType { get; set; } = "PAP";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置交易场景值。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
|
||||||
public string TradeScene { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置附加数据。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("attach")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("attach")]
|
|
||||||
public string? Attachment { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户终端 IP。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("spbill_create_ip")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("spbill_create_ip")]
|
|
||||||
public string ClientIp { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置订单优惠标记。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("goods_tag")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("goods_tag")]
|
|
||||||
public string? GoodsTag { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置通知地址。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("notify_url")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("notify_url")]
|
|
||||||
public string NotifyUrl { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置场景信息。
|
/// 获取或设置场景信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -265,25 +57,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertySceneNewtonsoftJsonConverter))]
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertySceneNewtonsoftJsonConverter))]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.RequestPropertySceneSystemTextJsonConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.RequestPropertySceneSystemTextJsonConverter))]
|
||||||
public Types.Scene? Scene { get; set; }
|
public new Types.Scene? Scene { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置是否分账。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("profit_sharing")]
|
|
||||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.YesOrNoNullableBooleanConverter))]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing")]
|
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.YesOrNoNullableBooleanConverter))]
|
|
||||||
public bool? IsProfitSharing { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// <para>默认值:<see cref="Constants.SignTypes.HMAC_SHA256"/></para>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("sign_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sign_type")]
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string SignType { get; set; } = Constants.SignTypes.HMAC_SHA256;
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,30 +3,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /vehicle/partnerpay/payapply 接口的响应。</para>
|
/// <para>表示 [POST] /vehicle/partnerpay/payapply 接口的响应。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ApplyVehiclePartnerPayResponse : WechatTenpaySignableResponse
|
public class ApplyVehiclePartnerPayResponse : ApplyVehiclePayResponse
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("mch_id")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
|
||||||
#pragma warning disable CS8618
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string MerchantId { get; set; }
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
#pragma warning restore CS8618
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("appid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
|
||||||
#pragma warning disable CS8618
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string AppId { get; set; }
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
#pragma warning restore CS8618
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -40,12 +18,5 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
public string? SubAppId { get; set; }
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置终端设备号。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("device_info")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("device_info")]
|
|
||||||
public string? DeviceInfo { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /transit/partnerpay/queryorder 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetTransitPartnerOrderRequest : GetTransitOrderRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")]
|
||||||
|
public string SubMerchantId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户 AppId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
|
public string? SubAppId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,49 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /transit/partnerpay/queryorder 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponseClassNewtonsoftJsonConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponseClassSystemTextJsonConverter))]
|
||||||
|
public class GetTransitPartnerOrderResponse : GetTransitOrderResponse
|
||||||
|
{
|
||||||
|
public static new class Types
|
||||||
|
{
|
||||||
|
public class Coupon : GetTransitOrderResponse.Types.Coupon
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static new class Converters
|
||||||
|
{
|
||||||
|
internal class ResponseClassNewtonsoftJsonConverter : Newtonsoft.Json.Converters.FlattenNArrayObjectConverterBase<GetTransitPartnerOrderResponse>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class ResponseClassSystemTextJsonConverter : System.Text.Json.Converters.FlattenNArrayObjectConverterBase<GetTransitPartnerOrderResponse>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_mch_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")]
|
||||||
|
public string SubMerchantId { 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>
|
||||||
|
[Newtonsoft.Json.JsonProperty(Newtonsoft.Json.Converters.FlattenNArrayObjectConverterBase.PROPERTY_NAME_NARRAY)]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName(System.Text.Json.Converters.FlattenNArrayObjectConverterBase.PROPERTY_NAME_NARRAY)]
|
||||||
|
public new Types.Coupon[]? CouponList { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -1,24 +1,10 @@
|
|||||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /vehicle/partnerpay/querystate 接口的请求。</para>
|
/// <para>表示 [POST] /vehicle/partnerpay/querystate 接口的请求。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetVehiclePartnerPayStateRequest : WechatTenpaySignableRequest
|
public class GetVehiclePartnerPayStateRequest : GetVehiclePayStateRequest
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("mch_id")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
|
||||||
public override string? MerchantId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("appid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
|
||||||
public override string? AppId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -33,57 +19,11 @@
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
public string? SubAppId { get; set; }
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置接口版本号。
|
|
||||||
/// <para>默认值:3.0</para>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("version")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
|
||||||
public string Version { get; set; } = "3.0";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置交易场景值。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
|
||||||
public string TradeScene { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置跳转场景。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("jump_scene")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("jump_scene")]
|
|
||||||
public string? JumpScene { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户的 OpenId。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("openid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
|
||||||
public string? OpenId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置用户在子商户下的 OpenId。
|
/// 获取或设置用户在子商户下的 OpenId。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
||||||
public string? SubOpenId { get; set; }
|
public string? SubOpenId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置车牌号。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("plate_number")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("plate_number")]
|
|
||||||
public string? PlateNumber { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// <para>默认值:<see cref="Constants.SignTypes.HMAC_SHA256"/></para>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("sign_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sign_type")]
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string SignType { get; set; } = Constants.SignTypes.HMAC_SHA256;
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,36 +3,16 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /vehicle/partnerpay/querystate 接口的响应。</para>
|
/// <para>表示 [POST] /vehicle/partnerpay/querystate 接口的响应。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetVehiclePartnerPayStateResponse : WechatTenpaySignableResponse
|
public class GetVehiclePartnerPayStateResponse : GetVehiclePayStateResponse
|
||||||
{
|
{
|
||||||
public static class Types
|
public static new class Types
|
||||||
{
|
{
|
||||||
public class PlateNumberInfo
|
public class PlateNumberInfo : GetVehiclePayStateResponse.Types.PlateNumberInfo
|
||||||
{
|
{
|
||||||
public static class Types
|
public static new class Types
|
||||||
{
|
{
|
||||||
public class Data
|
public class Data : GetVehiclePayStateResponse.Types.PlateNumberInfo.Types.Data
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置车牌号。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("plate_number")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("plate_number")]
|
|
||||||
public string PlateNumber { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置车牌通道标识。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("channel_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("channel_type")]
|
|
||||||
public string? ChannelType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置常用车牌标志。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("common_use_flag")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("common_use_flag")]
|
|
||||||
public string? CommonUseFlag { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,11 +21,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("plate_number_info")]
|
[Newtonsoft.Json.JsonProperty("plate_number_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("plate_number_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number_info")]
|
||||||
public Types.Data Data { get; set; } = default!;
|
public new Types.Data[] Data { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static class Converters
|
internal static new class Converters
|
||||||
{
|
{
|
||||||
internal class ResponsePropertyPlateNumberInfoNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.PlateNumberInfo>
|
internal class ResponsePropertyPlateNumberInfoNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.PlateNumberInfo>
|
||||||
{
|
{
|
||||||
@@ -56,28 +36,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("mch_id")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
|
||||||
#pragma warning disable CS8618
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string MerchantId { get; set; }
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
#pragma warning restore CS8618
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("appid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
|
||||||
#pragma warning disable CS8618
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string AppId { get; set; }
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
#pragma warning restore CS8618
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -92,27 +50,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
public string? SubAppId { get; set; }
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户状态。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("user_state")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("user_state")]
|
|
||||||
public string UserState { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置发起扣费方式。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("deduct_mode")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("deduct_mode")]
|
|
||||||
public string? DeductMode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户的 OpenId。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("openid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
|
||||||
public string? OpenId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置用户在子商户下的 OpenId。
|
/// 获取或设置用户在子商户下的 OpenId。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -120,13 +57,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
||||||
public string? SubOpenId { get; set; }
|
public string? SubOpenId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置跳转路径。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("path")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
|
||||||
public string? JumpPath { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置车牌号信息。
|
/// 获取或设置车牌号信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -134,6 +64,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponsePropertyPlateNumberInfoNewtonsoftJsonConverter))]
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponsePropertyPlateNumberInfoNewtonsoftJsonConverter))]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("plate_number_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("plate_number_info")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponsePropertyPlateNumberInfoSystemTextJsonConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponsePropertyPlateNumberInfoSystemTextJsonConverter))]
|
||||||
public Types.PlateNumberInfo? PlateNumberInfo { get; set; }
|
public new Types.PlateNumberInfo? PlateNumberInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,84 +1,18 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /vehicle/partnerpay/notification 接口的请求。</para>
|
/// <para>表示 [POST] /vehicle/partnerpay/notification 接口的请求。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NotifyVehiclePartnerPayRequest : WechatTenpaySignableRequest
|
public class NotifyVehiclePartnerPayRequest : NotifyVehiclePayRequest
|
||||||
{
|
{
|
||||||
public static class Types
|
public static new class Types
|
||||||
{
|
{
|
||||||
public class Scene
|
public class Scene : NotifyVehiclePayRequest.Types.Scene
|
||||||
{
|
{
|
||||||
public static class Types
|
public static new class Types
|
||||||
{
|
{
|
||||||
public class Data
|
public class Data : NotifyVehiclePayRequest.Types.Scene.Types.Data
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置入场时间。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("start_time")]
|
|
||||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.PureDigitalTextDateTimeOffsetConverter))]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("start_time")]
|
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.PureDigitalTextDateTimeOffsetConverter))]
|
|
||||||
public DateTimeOffset StartTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置车牌号。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("plate_number")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("plate_number")]
|
|
||||||
public string? PlateNumber { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置车辆类型。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("car_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("car_type")]
|
|
||||||
public string? CarType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置停车场名称。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("parking_name")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("parking_name")]
|
|
||||||
public string? ParkingName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置车位编号。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("space_number")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("space_number")]
|
|
||||||
public string? SpaceNumber { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置免费时长(单位:秒)。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("free_time")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("free_time")]
|
|
||||||
public int? FreeDuration { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户的 OpenId。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("openid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
|
||||||
public string? OpenId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户在子商户下的 OpenId。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
|
||||||
public string? SubOpenId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置通知地址。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("notify_url")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("notify_url")]
|
|
||||||
public string? NotifyUrl { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,11 +21,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("scene_info")]
|
[Newtonsoft.Json.JsonProperty("scene_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
public Types.Data Data { get; set; } = new Types.Data();
|
public new Types.Data Data { get; set; } = new Types.Data();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static class Converters
|
internal static new class Converters
|
||||||
{
|
{
|
||||||
internal class RequestPropertySceneNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
internal class RequestPropertySceneNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Scene>
|
||||||
{
|
{
|
||||||
@@ -102,20 +36,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("mch_id")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
|
||||||
public override string? MerchantId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("appid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
|
||||||
public override string? AppId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -130,21 +50,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
public string? SubAppId { get; set; }
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置接口版本号。
|
|
||||||
/// <para>默认值:3.0</para>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("version")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
|
||||||
public string Version { get; set; } = "3.0";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置交易场景值。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
|
||||||
public string TradeScene { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置场景信息。
|
/// 获取或设置场景信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -152,16 +57,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertySceneNewtonsoftJsonConverter))]
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertySceneNewtonsoftJsonConverter))]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.RequestPropertySceneSystemTextJsonConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.RequestPropertySceneSystemTextJsonConverter))]
|
||||||
public Types.Scene? Scene { get; set; }
|
public new Types.Scene? Scene { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// <para>默认值:<see cref="Constants.SignTypes.HMAC_SHA256"/></para>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("sign_type")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sign_type")]
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string SignType { get; set; } = Constants.SignTypes.HMAC_SHA256;
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,30 +3,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /vehicle/partnerpay/notification 接口的响应。</para>
|
/// <para>表示 [POST] /vehicle/partnerpay/notification 接口的响应。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NotifyVehiclePartnerPayResponse : WechatTenpaySignableResponse
|
public class NotifyVehiclePartnerPayResponse : NotifyVehiclePayResponse
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("mch_id")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
|
|
||||||
#pragma warning disable CS8618
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string MerchantId { get; set; }
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
#pragma warning restore CS8618
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("appid")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
|
||||||
#pragma warning disable CS8618
|
|
||||||
#pragma warning disable CS8765
|
|
||||||
public override string AppId { get; set; }
|
|
||||||
#pragma warning restore CS8765
|
|
||||||
#pragma warning restore CS8618
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -40,19 +18,5 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
public string? SubAppId { get; set; }
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置用户状态。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("user_state")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("user_state")]
|
|
||||||
public string UserState { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置发起扣费方式。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("deduct_mode")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("deduct_mode")]
|
|
||||||
public string? DeductMode { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"mch_id": "100000981",
|
||||||
|
"appid": "wxcbda96de0b165486",
|
||||||
|
"nonce_str": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS",
|
||||||
|
"sign_type": "HMAC-SHA256",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"plate_number": "粤A00000",
|
||||||
|
"vehicle_event_type": "NORMAL",
|
||||||
|
"vehicle_event_createtime": "20180101100000"
|
||||||
|
}
|
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"mch_id": "10000098",
|
||||||
|
"appid": "wxcbda96de0b165486",
|
||||||
|
"nonce_str": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS",
|
||||||
|
"sign_type": "HMAC-SHA256",
|
||||||
|
"sign": " EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"body": "公交代扣",
|
||||||
|
"out_trade_no": "217752501201407033233368018",
|
||||||
|
"total_fee": "888",
|
||||||
|
"spbill_create_ip": "8.8.8.8",
|
||||||
|
"notify_url": "http://yoursite.com/wxpay.html",
|
||||||
|
"trade_scene": " PARKING",
|
||||||
|
"version": "3.0",
|
||||||
|
"scene_info": "{\"scene_info\":{\"start_time\":\"20170926114339\",\"end_time\":\"20170826114339\",\"charging_time\":3600,\"free_time\":1200,\"plate_number\":\"CB1000sdfasd\",\"car_type\":\"大型车\",\"parking_name\":\"欢乐海岸停车场\"}}"
|
||||||
|
}
|
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"return_code": "SUCCESS",
|
||||||
|
"return_msg": "OK",
|
||||||
|
"appid": "wxcbda96de0b165486",
|
||||||
|
"mch_id": "10000098",
|
||||||
|
"nonce_str": "IITRi8Iabbblz1Jc",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"result_code": "SUCCESS"
|
||||||
|
}
|
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"appid": "wx2421b1c4370ec43b",
|
||||||
|
"mch_id": "10000100",
|
||||||
|
"nonce_str": "ec2316275641faa3aacf3cc599e8730f",
|
||||||
|
"transaction_id": "1008450740201411110005820873",
|
||||||
|
"sign_type": "HMAC-SHA256",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5"
|
||||||
|
}
|
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"return_code": "SUCCESS",
|
||||||
|
"return_msg": "OK",
|
||||||
|
"appid": "wx2421b1c4370ec43b",
|
||||||
|
"mch_id": "10000100",
|
||||||
|
"device_info": "1000",
|
||||||
|
"nonce_str": "TN55wO9Pba5yENl8",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"result_code": "SUCCESS",
|
||||||
|
"openid": "oUpF8uN95-Ptaags6E_roPHg7AG0",
|
||||||
|
"is_subscribe": "Y",
|
||||||
|
"trade_type": "PAP",
|
||||||
|
"bank_type": "CCB_DEBIT",
|
||||||
|
"total_fee": "1",
|
||||||
|
"fee_type": "CNY",
|
||||||
|
"transaction_id": "1008450740201411110005820873",
|
||||||
|
"out_trade_no": "1415757673",
|
||||||
|
"attach": "订单额外描述",
|
||||||
|
"time_end": "20141111170043",
|
||||||
|
"trade_state": "SUCCESS"
|
||||||
|
}
|
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"mch_id": "100000981",
|
||||||
|
"appid": "wxcbda96de0b165486",
|
||||||
|
"nonce_str": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS",
|
||||||
|
"sign_type": "HMAC-SHA256",
|
||||||
|
"trade_scene": "PARKING",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"openid": " oUpF8uMuAJO_M2pxb1Q9zNjWeS6o",
|
||||||
|
"plate_number": "粤A00000"
|
||||||
|
}
|
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"return_code": "SUCCESS",
|
||||||
|
"return_msg": "OK",
|
||||||
|
"appid": "wx2421b1c4370ec43b",
|
||||||
|
"mch_id": "10000100",
|
||||||
|
"nonce_str": "ec2316275641faa3aacf3cc599e8730f",
|
||||||
|
"user_state": "NORMAL",
|
||||||
|
"result_code": "SUCCESS",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"plate_number_info": "{\"plate_number_info\":[{\"plate_number\":\"粤B888888\",\"channel_type\":\"ETC\"}]}"
|
||||||
|
}
|
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"mch_id": "100000981",
|
||||||
|
"appid": "wxcbda96de0b165486",
|
||||||
|
"nonce_str": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS",
|
||||||
|
"sign_type": "HMAC-SHA256",
|
||||||
|
"trade_scene": "PARKING",
|
||||||
|
"version": "3.0",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"scene_info": "{\"scene_info\":{\"start_time\":\"20170926114339\",\"plate_number\":\"CB1000sdfasd\",\"car_type\":\"大型车\",\"parking_name\":\"欢乐海岸停车场\",\"free_time\":1200}}"
|
||||||
|
}
|
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"return_code": "SUCCESS",
|
||||||
|
"return_msg": "OK",
|
||||||
|
"appid": "wx2421b1c4370ec43b",
|
||||||
|
"mch_id": "10000100",
|
||||||
|
"nonce_str": "ec2316275641faa3aacf3cc599e8730f",
|
||||||
|
"user_state": "NORMAL",
|
||||||
|
"result_code": "SUCCESS",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5"
|
||||||
|
}
|
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"appid": "wx2421b1c4370ec43b",
|
||||||
|
"mch_id": "10000100",
|
||||||
|
"sub_mch_id": "10000100",
|
||||||
|
"nonce_str": "ec2316275641faa3aacf3cc599e8730f",
|
||||||
|
"transaction_id": "1008450740201411110005820873",
|
||||||
|
"sign_type": "HMAC-SHA256",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5"
|
||||||
|
}
|
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"return_code": "SUCCESS",
|
||||||
|
"return_msg": "OK",
|
||||||
|
"appid": "wx2421b1c4370ec43b",
|
||||||
|
"mch_id": "10000100",
|
||||||
|
"sub_mch_id": "10000100",
|
||||||
|
"device_info": "1000",
|
||||||
|
"nonce_str": "TN55wO9Pba5yENl8",
|
||||||
|
"sign": "EE088059BBC9141264F8D14293AD6C4BB94CEA8C08AA98FBF93E262D445F8FF5",
|
||||||
|
"result_code": "SUCCESS",
|
||||||
|
"openid": "oUpF8uN95-Ptaags6E_roPHg7AG0",
|
||||||
|
"is_subscribe": "Y",
|
||||||
|
"trade_type": "PAP",
|
||||||
|
"bank_type": "CCB_DEBIT",
|
||||||
|
"total_fee": "1",
|
||||||
|
"fee_type": "CNY",
|
||||||
|
"transaction_id": "1008450740201411110005820873",
|
||||||
|
"out_trade_no": "1415757673",
|
||||||
|
"attach": "订单额外描述",
|
||||||
|
"time_end": "20141111170043",
|
||||||
|
"trade_state": "SUCCESS"
|
||||||
|
}
|
Reference in New Issue
Block a user