mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-18 22:35:46 +08:00
fix(tenpayv2): 修复部分场景下付款码支付接口响应模型反序列化错误的问题
This commit is contained in:
parent
ecaaee96f3
commit
3d7f59fe55
@ -6,6 +6,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// <para>表示 [POST] /pay/micropay 接口的响应。</para>
|
/// <para>表示 [POST] /pay/micropay 接口的响应。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CreatePayMicroPayResponse : WechatTenpaySignableResponse
|
public class CreatePayMicroPayResponse : WechatTenpaySignableResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class PromotionDetail
|
||||||
{
|
{
|
||||||
public static class Types
|
public static class Types
|
||||||
{
|
{
|
||||||
@ -131,13 +135,22 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置优惠信息列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||||
|
public Types.Promotion[]? PromotionList { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static class Converters
|
internal static class Converters
|
||||||
{
|
{
|
||||||
internal class ResponsePropertyPromotionListNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Promotion[]>
|
internal class ResponsePropertyPromotionDetailNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.PromotionDetail>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class ResponsePropertyPromotionListSystemTextJsonConverter : System.Text.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.Promotion[]>
|
internal class ResponsePropertyPromotionDetailSystemTextJsonConverter : System.Text.Json.Converters.TextualObjectInJsonFormatConverterBase<Types.PromotionDetail>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -303,9 +316,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
|
|||||||
/// 获取或设置优惠信息。
|
/// 获取或设置优惠信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||||
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponsePropertyPromotionListNewtonsoftJsonConverter))]
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponsePropertyPromotionDetailNewtonsoftJsonConverter))]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponsePropertyPromotionListSystemTextJsonConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponsePropertyPromotionDetailSystemTextJsonConverter))]
|
||||||
public Types.Promotion[]? PromotionList { get; set; }
|
public Types.PromotionDetail? PromotionDetail { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"return_code": "SUCCESS",
|
"return_code": "SUCCESS",
|
||||||
"return_msg": "OK",
|
"return_msg": "OK",
|
||||||
"appid": "wx2421b1c4370ec43b",
|
"appid": "wx2421b1c4370ec43b",
|
||||||
@ -17,5 +17,6 @@
|
|||||||
"transaction_id": "1008450740201411110005820873",
|
"transaction_id": "1008450740201411110005820873",
|
||||||
"out_trade_no": "1415757673",
|
"out_trade_no": "1415757673",
|
||||||
"attach": "订单额外描述",
|
"attach": "订单额外描述",
|
||||||
"time_end": "20141111170043"
|
"time_end": "20141111170043",
|
||||||
|
"promotion_detail": "{\"promotion_detail\":[{\"promotion_id\":\"42565506954\",\"name\":\"测罐战马0.5元券\",\"scope\":\"SINGLE\",\"type\":\"DISCOUNT\",\"amount\":50,\"activity_id\":\"17232399\",\"wxpay_contribute\":0,\"merchant_contribute\":50,\"other_contribute\":0,\"goods_detail\":[{\"goods_id\":\"6970440826666\",\"quantity\":1,\"price\":650,\"discount_amount\":50}]}]}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user