Files
btcpayserver/BTCPayServer/Payments/LNURLPay/LNURLPaymentMethodViewExtension.cs
2024-10-07 16:18:09 +09:00

24 lines
830 B
C#

namespace BTCPayServer.Payments.LNURLPay
{
public class LNURLPaymentMethodViewExtension : IPaymentMethodViewExtension
{
public LNURLPaymentMethodViewExtension(PaymentMethodId paymentMethodId)
{
PaymentMethodId = paymentMethodId;
}
public PaymentMethodId PaymentMethodId { get; }
public void RegisterViews(PaymentMethodViewContext context)
{
var details = context.Details;
if (details is not LNURLPayPaymentMethodDetails d)
return;
context.RegisterPaymentMethodDetails("LNURL/AdditionalPaymentMethodDetails");
context.RegisterCheckoutUI(new CheckoutUIPaymentMethodSettings()
{
ExtensionPartial = "Lightning/LightningLikeMethodCheckout"
});
}
}
}