mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 23:54:26 +01:00
Add File Seller plugin
This commit is contained in:
27
Plugins/BTCPayServer.Plugins.FileSeller/FileSellerPlugin.cs
Normal file
27
Plugins/BTCPayServer.Plugins.FileSeller/FileSellerPlugin.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
using BTCPayServer.Abstractions.Models;
|
||||
using BTCPayServer.Abstractions.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BTCPayServer.Plugins.FileSeller;
|
||||
|
||||
public class FileSellerPlugin : BaseBTCPayServerPlugin
|
||||
{
|
||||
public override IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } =
|
||||
{
|
||||
new() { Identifier = nameof(BTCPayServer), Condition = ">=1.10.3" }
|
||||
};
|
||||
public override void Execute(IServiceCollection applicationBuilder)
|
||||
{
|
||||
applicationBuilder.AddHostedService<FileSellerService>();
|
||||
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("FileSeller/Detect",
|
||||
"header-nav"));
|
||||
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("FileSeller/Detect",
|
||||
"checkout-end"));
|
||||
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("FileSeller/FileSellerTemplateEditorItemDetail",
|
||||
"app-template-editor-item-detail"));
|
||||
|
||||
|
||||
base.Execute(applicationBuilder);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user