From cbc12255627574d23693180935a6a5f2a75dbacc Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Tue, 22 Sep 2026 00:59:39 +0330 Subject: [PATCH] fix(payment): update JSON serialization settings and enhance request data structure - Changed PropertyNamingPolicy in TwentyCardPaymentService from SnakeCaseLower to CamelCase for improved consistency in JSON serialization. - Added JsonPropertyName attributes for Authority and RedirectUrl properties in TwentyCardRequestData to ensure correct JSON mapping. --- .../Services/Payment/TwentyCardPaymentService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs b/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs index f086906..f2c45fc 100644 --- a/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs +++ b/src/CMSMicroservice.Infrastructure/Services/Payment/TwentyCardPaymentService.cs @@ -23,7 +23,7 @@ public class TwentyCardPaymentService : IPaymentGatewayService private static readonly JsonSerializerOptions JsonOptions = new() { - PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, PropertyNameCaseInsensitive = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; @@ -281,7 +281,10 @@ public class TwentyCardPaymentService : IPaymentGatewayService private sealed class TwentyCardRequestData { + [JsonPropertyName("authority")] public string? Authority { get; set; } + + [JsonPropertyName("redirectUrl")] public string? RedirectUrl { get; set; } }