using Fitness_core_BE.DTOs.PaymentGateways; namespace Fitness_core_BE.Interfaces.Services { // Server-to-server client for Payment-Service's HMAC-signed, per-platform routes // (Controllers/v1/CardsController.cs, PaymentsController.cs, RefundsController.cs there). // Distinct from IPaymentServiceClient, which calls the X-Internal-Key admin/catalog surface. // Every method here is scoped to one gym client and lazily provisions that client's // Payment-Service Platform on first use (see PaymentGatewayClient.EnsureCredentialsAsync). public interface IPaymentGatewayClient { Task OnboardCardAsync(Guid clientId, OnboardCardRequest request, CancellationToken ct = default); Task GetCardDetailsAsync(Guid clientId, string cardToken, CancellationToken ct = default); Task> ListCardsAsync(Guid clientId, string customerId, CancellationToken ct = default); Task DeactivateCardAsync(Guid clientId, string cardToken, CancellationToken ct = default); Task SetDefaultCardAsync(Guid clientId, string cardToken, string customerId, CancellationToken ct = default); /// Polls a hosted-page onboarding started earlier (CardToken is empty until /// the gateway's webhook completes it — see Payment-Service's CardService). Task GetOnboardingStatusAsync(Guid clientId, string gatewayName, string sessionId, CancellationToken ct = default); Task AttemptPaymentAsync(Guid clientId, AttemptPaymentRequest request, CancellationToken ct = default); Task RefundPaymentAsync(Guid clientId, Guid paymentId, bool isVoid, CancellationToken ct = default); Task ListPaymentsAsync(Guid clientId, string? cardToken, int page, int pageSize, CancellationToken ct = default); } }