using Hutopy.Application.Common.Interfaces; namespace Hutopy.Application.Stripe.Commands; public record CreateSessionCheckoutCommand : IRequest { public required int Price { get; init; } public string Currency { get; init; } = "cad"; } public class CreateSessionCheckoutCommandHandler : IRequestHandler { private readonly IApplicationDbContext _context; private readonly IStripeService _stripeService; public CreateSessionCheckoutCommandHandler(IApplicationDbContext context, IStripeService stripeService) { _context = context; _stripeService = stripeService; } public async Task Handle(CreateSessionCheckoutCommand request, CancellationToken cancellationToken) { var stripeSecret = await _stripeService.CreateCheckoutSession(request.Price, request.Currency); return stripeSecret; } }