mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
951bfeefb1
* LNURL Payment Method Support
* Merge recent Lightning controller related changes
* Fix build
* Create separate payment settings section for stores
* Improve LNURL configuration
* Prevent duplicate array entries when merging Swagger JSON
* Fix CanSetPaymentMethodLimitsLightning
* Fix CanUsePayjoinViaUI
* Adapt test for new cancel bolt invoice feature
* rebase fixes
* Fixes after rebase
* Test fixes
* Do not turn LNURL on by default, Off-Chain payment criteria should affects both BOLT11 and LNURL, Payment criteria of unset payment method shouldn't be shown
* Send better error if payment method not found
* Revert "Prevent duplicate array entries when merging Swagger JSON"
This reverts commit 5783db9eda
.
* Fix LNUrl doc
* Fix some warnings
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
45 lines
1.0 KiB
C#
45 lines
1.0 KiB
C#
using BTCPayServer.Lightning;
|
|
using NBitcoin;
|
|
|
|
namespace BTCPayServer.Payments.Lightning
|
|
{
|
|
public class LightningLikePaymentMethodDetails : IPaymentMethodDetails
|
|
{
|
|
public string BOLT11 { get; set; }
|
|
public uint256 PaymentHash { get; set; }
|
|
public string InvoiceId { get; set; }
|
|
public string NodeInfo { get; set; }
|
|
|
|
public virtual string GetPaymentDestination()
|
|
{
|
|
return BOLT11;
|
|
}
|
|
|
|
public uint256 GetPaymentHash(Network network)
|
|
{
|
|
return PaymentHash ?? BOLT11PaymentRequest.Parse(BOLT11, network).PaymentHash;
|
|
}
|
|
|
|
public virtual PaymentType GetPaymentType()
|
|
{
|
|
return PaymentTypes.LightningLike;
|
|
}
|
|
|
|
public decimal GetNextNetworkFee()
|
|
{
|
|
return 0.0m;
|
|
}
|
|
|
|
public decimal GetFeeRate()
|
|
{
|
|
return 0.0m;
|
|
}
|
|
public bool Activated { get; set; }
|
|
|
|
public virtual string GetAdditionalDataPartialName()
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|