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.
This commit is contained in:
masoodafar-web
2026-09-22 00:59:39 +03:30
parent 6ad1341754
commit cbc1225562
@@ -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; }
}