btcpayserver/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs
Andrew Camilleri 2c63d16774
Refactor shopify logic (#6029)
This refactors the logic around shopify to keep it in one place. invoice Statuses are handled in a more streamlined way.
2024-06-05 09:00:55 +09:00

23 lines
1,023 B
C#

using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Abstractions.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace BTCPayServer.Plugins.Shopify
{
public class ShopifyPlugin : BaseBTCPayServerPlugin
{
public override string Identifier => "BTCPayServer.Plugins.Shopify";
public override string Name => "Shopify";
public override string Description => "Allows you to integrate BTCPay Server as a payment option in Shopify.";
public override void Execute(IServiceCollection applicationBuilder)
{
applicationBuilder.AddSingleton<ShopifyService>();
applicationBuilder.AddSingleton<IHostedService, ShopifyService>(provider => provider.GetRequiredService<ShopifyService>());
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("Shopify/NavExtension", "header-nav"));
base.Execute(applicationBuilder);
}
}
}