mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Add internal tags to invoice
This commit is contained in:
@@ -61,7 +61,7 @@ namespace BTCPayServer.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal async Task<DataWrapper<InvoiceResponse>> CreateInvoiceCore(Invoice invoice, StoreData store, string serverUrl)
|
internal async Task<DataWrapper<InvoiceResponse>> CreateInvoiceCore(Invoice invoice, StoreData store, string serverUrl, List<string> additionalTags = null)
|
||||||
{
|
{
|
||||||
if (!store.HasClaim(Policies.CanCreateInvoice.Key))
|
if (!store.HasClaim(Policies.CanCreateInvoice.Key))
|
||||||
throw new UnauthorizedAccessException();
|
throw new UnauthorizedAccessException();
|
||||||
@@ -86,6 +86,10 @@ namespace BTCPayServer.Controllers
|
|||||||
entity.NotificationEmail = invoice.NotificationEmail;
|
entity.NotificationEmail = invoice.NotificationEmail;
|
||||||
entity.BuyerInformation = Map<Invoice, BuyerInformation>(invoice);
|
entity.BuyerInformation = Map<Invoice, BuyerInformation>(invoice);
|
||||||
entity.PaymentTolerance = storeBlob.PaymentTolerance;
|
entity.PaymentTolerance = storeBlob.PaymentTolerance;
|
||||||
|
if (additionalTags != null)
|
||||||
|
entity.InternalTags.AddRange(additionalTags);
|
||||||
|
if (storeBlob.InternalTags != null)
|
||||||
|
entity.InternalTags.AddRange(storeBlob.InternalTags);
|
||||||
//Another way of passing buyer info to support
|
//Another way of passing buyer info to support
|
||||||
FillBuyerInfo(invoice.Buyer, entity.BuyerInformation);
|
FillBuyerInfo(invoice.Buyer, entity.BuyerInformation);
|
||||||
if (entity?.BuyerInformation?.BuyerEmail != null)
|
if (entity?.BuyerInformation?.BuyerEmail != null)
|
||||||
|
|||||||
@@ -424,6 +424,9 @@ namespace BTCPayServer.Data
|
|||||||
|
|
||||||
public EmailSettings EmailSettings { get; set; }
|
public EmailSettings EmailSettings { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
|
public HashSet<string> InternalTags { get; set; } = new HashSet<string>();
|
||||||
|
|
||||||
public IPaymentFilter GetExcludedPaymentMethods()
|
public IPaymentFilter GetExcludedPaymentMethods()
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0618 // Type or member is obsolete
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ namespace BTCPayServer.Services.Invoices
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
|
public HashSet<string> InternalTags { get; set; } = new HashSet<string>();
|
||||||
|
|
||||||
[Obsolete("Use GetDerivationStrategies instead")]
|
[Obsolete("Use GetDerivationStrategies instead")]
|
||||||
public string DerivationStrategy
|
public string DerivationStrategy
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user