Files
btcpayserver/BTCPayServer/Payments/PaymentTypes.cs
2024-04-04 16:31:04 +09:00

30 lines
832 B
C#

#nullable enable
using System;
using System.Linq;
#if ALTCOINS
using BTCPayServer.Services.Altcoins.Monero.Payments;
using BTCPayServer.Services.Altcoins.Zcash.Payments;
#endif
using BTCPayServer.Services.Invoices;
using NBitcoin;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Payments
{
public static class PaymentTypes
{
public static readonly PaymentType CHAIN = new("CHAIN");
public static readonly PaymentType LN = new("LN");
public static readonly PaymentType LNURL = new("LNURL");
}
public class PaymentType
{
private readonly string _paymentType;
public PaymentType(string paymentType)
{
_paymentType = paymentType;
}
public PaymentMethodId GetPaymentMethodId(string cryptoCode) => new (cryptoCode, _paymentType);
}
}