#27 added userTransactions

This commit is contained in:
Dominic Villemure
2024-04-22 15:55:49 -04:00
parent cbde9838d1
commit b63d53f109
17 changed files with 696 additions and 28 deletions

View File

@@ -1,16 +1,16 @@
using Stripe;
using Stripe.Checkout;
using Hutopy.Application.Common.Interfaces;
using Microsoft.Extensions.Configuration;
namespace Hutopy.Infrastructure.Stripe;
public class StripeService : IStripeService
{
public StripeService()
{
// I removed the key to push. Will need to be in config.
StripeConfiguration.ApiKey = "";
}
public StripeService(IConfiguration configuration)
{
StripeConfiguration.ApiKey = configuration["STRIPE_API_KEY"];
}
public async Task<string> CreateCheckoutSession(int price, string currency = "cad")
{
@@ -32,7 +32,7 @@ public class StripeService : IStripeService
],
Mode = "payment",
UiMode = "embedded",
ReturnUrl = $"http://localhost:5173/creatorfolio",
ReturnUrl = $"https://zealous-bay-08204590f.5.azurestaticapps.net/paymentcompleted",
};
var service = new SessionService();