20 lines
1.2 KiB
C#
20 lines
1.2 KiB
C#
using Fitness_core_BE.DTOs.PaymentGateways;
|
|
|
|
namespace Fitness_core_BE.Interfaces.Services
|
|
{
|
|
// Server-to-server client for Payment-Service's internal-key-protected admin
|
|
// routes (Controllers/v1/GatewaysController.cs, PlatformsController.cs there).
|
|
public interface IPaymentServiceClient
|
|
{
|
|
Task<List<GatewayDefinitionDto>> ListGatewaysAsync(CancellationToken cancellationToken = default);
|
|
Task<GatewayDefinitionDto> UpsertGatewayAsync(UpsertGatewayDefinitionRequest request, CancellationToken cancellationToken = default);
|
|
Task<GatewayDefinitionDto> SetGatewayEnabledAsync(Guid id, bool isEnabled, CancellationToken cancellationToken = default);
|
|
Task UpsertPlatformCredentialAsync(UpsertPlatformGatewayCredentialRequest request, CancellationToken cancellationToken = default);
|
|
|
|
// Mints (or returns) the Payment-Service Platform for a client; call once at
|
|
// client activation and store the returned PlatformId on Client.FKPaymentPlatformId.
|
|
Task<(Guid PlatformId, string ApiKey, string HmacSecret)> ProvisionPlatformAsync(
|
|
Guid clientId, string displayName, CancellationToken cancellationToken = default);
|
|
}
|
|
}
|