90 lines
3.3 KiB
C#
90 lines
3.3 KiB
C#
namespace Fitness_core_BE.DTOs.PaymentGateways
|
|
{
|
|
// Mirrors Payment-Service's DTOs/Payments/*.cs for the HMAC-signed, per-platform
|
|
// Cards/Payments/Refunds surface (IPaymentGatewayClient) — distinct from
|
|
// PaymentGatewayDtos.cs, which is the X-Internal-Key admin/catalog surface.
|
|
|
|
public class OnboardCardRequest
|
|
{
|
|
public string GatewayName { get; set; } = "DirectPay";
|
|
public string CustomerId { get; set; } = string.Empty;
|
|
public string CardLabel { get; set; } = string.Empty;
|
|
public string CardholderName { get; set; } = string.Empty;
|
|
public bool IsDefault { get; set; } = false;
|
|
public string? ReturnUrl { get; set; }
|
|
}
|
|
|
|
public class OnboardCardResult
|
|
{
|
|
public string Status { get; set; } = string.Empty;
|
|
public string? RedirectUrl { get; set; }
|
|
public string CardToken { get; set; } = string.Empty;
|
|
public string MaskedPan { get; set; } = string.Empty;
|
|
public string CardLabel { get; set; } = string.Empty;
|
|
public string CardBrand { get; set; } = string.Empty;
|
|
public int ExpiryMonth { get; set; }
|
|
public int ExpiryYear { get; set; }
|
|
public bool IsDefault { get; set; }
|
|
public string GatewayRef { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class CardDetailsResult
|
|
{
|
|
public string CardToken { get; set; } = string.Empty;
|
|
public string MaskedPan { get; set; } = string.Empty;
|
|
public string CardLabel { get; set; } = string.Empty;
|
|
public string CardBrand { get; set; } = string.Empty;
|
|
public int ExpiryMonth { get; set; }
|
|
public int ExpiryYear { get; set; }
|
|
public bool IsDefault { get; set; }
|
|
public string GatewayName { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class AttemptPaymentRequest
|
|
{
|
|
public string IdempotencyKey { get; set; } = string.Empty;
|
|
public string GatewayName { get; set; } = "DirectPay";
|
|
public string CardToken { get; set; } = string.Empty;
|
|
public decimal AmountMinorUnits { get; set; }
|
|
public string Currency { get; set; } = "LKR";
|
|
public string Description { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class AttemptPaymentResult
|
|
{
|
|
public Guid PaymentId { get; set; }
|
|
public string Status { get; set; } = string.Empty;
|
|
public string? GatewayRef { get; set; }
|
|
public DateTime CreatedAtUtc { get; set; }
|
|
}
|
|
|
|
public class RefundPaymentResult
|
|
{
|
|
public Guid PaymentId { get; set; }
|
|
public string Status { get; set; } = string.Empty;
|
|
public string GatewayRef { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class SetDefaultCardResult
|
|
{
|
|
public string CardToken { get; set; } = string.Empty;
|
|
public bool IsDefault { get; set; }
|
|
}
|
|
|
|
public class PaymentListItemResult
|
|
{
|
|
public Guid PaymentId { get; set; }
|
|
public decimal AmountMinorUnits { get; set; }
|
|
public string Currency { get; set; } = string.Empty;
|
|
public string Status { get; set; } = string.Empty;
|
|
public DateTime CreatedAtUtc { get; set; }
|
|
}
|
|
|
|
public class PaymentListResult
|
|
{
|
|
public int Total { get; set; }
|
|
public int Page { get; set; }
|
|
public List<PaymentListItemResult> Items { get; set; } = new();
|
|
}
|
|
}
|