Implemented new subscription system and basic stripe support

This commit is contained in:
Marcel Baumgartner
2023-07-06 02:12:06 +02:00
parent ab529991fd
commit c0df8ac507
26 changed files with 1899 additions and 374 deletions

View File

@@ -1,6 +1,5 @@
using BlazorDownloadFile;
using BlazorTable;
using CurrieTechnologies.Razor.SweetAlert2;
using HealthChecks.UI.Client;
using Moonlight.App.ApiClients.CloudPanel;
using Moonlight.App.ApiClients.Daemon;
@@ -32,6 +31,8 @@ using Moonlight.App.Services.SupportChat;
using Sentry;
using Serilog;
using Serilog.Events;
using Stripe;
using SubscriptionService = Moonlight.App.Services.SubscriptionService;
namespace Moonlight
{
@@ -209,9 +210,9 @@ namespace Moonlight
builder.Services.AddScoped<DynamicBackgroundService>();
builder.Services.AddScoped<ServerAddonPluginService>();
builder.Services.AddScoped<KeyListenerService>();
builder.Services.AddScoped<PopupService>();
builder.Services.AddScoped<SubscriptionService>();
builder.Services.AddScoped<SubscriptionAdminService>();
builder.Services.AddScoped<BillingService>();
builder.Services.AddScoped<SessionClientService>();
builder.Services.AddSingleton<SessionServerService>();
@@ -252,6 +253,10 @@ namespace Moonlight
builder.Services.AddBlazorContextMenu();
builder.Services.AddBlazorDownloadFile();
StripeConfiguration.ApiKey = configService
.Get()
.Moonlight.Stripe.ApiKey;
var app = builder.Build();
// Configure the HTTP request pipeline.