-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStartup.cs
46 lines (38 loc) · 1.4 KB
/
Startup.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using OrchardCore.TenantBilling;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Modules;
using OrchardCore.Security.Permissions;
using Stripe;
using LefeWareLearning.StripePayment;
using OrchardCore.Data.Migration;
using OrchardCore.StripePayment.Services;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Display.ContentDisplay;
namespace OrchardCore.StripePayment
{
public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IPermissionProvider, Permissions>();
}
public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
{
}
}
[Feature(StripePaymentConstants.Features.StripePayment)]
public class StripePaymentStartup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IDataMigration, StripePaymentMigrations>();
services.AddTransient<IStripePaymentService, StripePaymentService>();
services.AddContentPart<StripePaymentFormPart>()
.UseDisplayDriver<StripePaymentFormPartDisplay>();
}
}
}