mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
@@ -34,6 +34,7 @@ namespace BTCPayServer.Client.Models
|
||||
public string PaymentMethod { get; set; }
|
||||
|
||||
public string CryptoCode { get; set; }
|
||||
public Dictionary<string, object> AdditionalData { get; set; }
|
||||
|
||||
public class Payment
|
||||
{
|
||||
|
||||
@@ -365,7 +365,8 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
PaymentLink =
|
||||
method.GetId().PaymentType.GetPaymentLink(method.Network, details, accounting.Due,
|
||||
Request.GetAbsoluteRoot()),
|
||||
Payments = payments.Select(paymentEntity => ToPaymentModel(entity, paymentEntity)).ToList()
|
||||
Payments = payments.Select(paymentEntity => ToPaymentModel(entity, paymentEntity)).ToList(),
|
||||
AdditionalData = details.GetAdditionalData()
|
||||
};
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BTCPayServer.Payments
|
||||
{
|
||||
/// <summary>
|
||||
@@ -19,5 +21,6 @@ namespace BTCPayServer.Payments
|
||||
|
||||
bool Activated { get; set; }
|
||||
virtual string GetAdditionalDataPartialName() => null;
|
||||
virtual Dictionary<string,object> GetAdditionalData() => new();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.Lightning;
|
||||
using BTCPayServer.Payments.Lightning;
|
||||
@@ -11,6 +12,7 @@ namespace BTCPayServer.Payments
|
||||
|
||||
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
||||
public LightMoney GeneratedBoltAmount { get; set; }
|
||||
|
||||
public string BTCPayInvoiceId { get; set; }
|
||||
public bool Bech32Mode { get; set; }
|
||||
|
||||
@@ -31,5 +33,21 @@ namespace BTCPayServer.Payments
|
||||
|
||||
return "LNURL/AdditionalPaymentMethodDetails";
|
||||
}
|
||||
|
||||
public override Dictionary<string, object> GetAdditionalData()
|
||||
{
|
||||
var result = base.GetAdditionalData();
|
||||
if (!string.IsNullOrEmpty(ProvidedComment))
|
||||
{
|
||||
result.TryAdd(nameof(ProvidedComment), ProvidedComment);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ConsumedLightningAddress))
|
||||
{
|
||||
result.TryAdd(nameof(ConsumedLightningAddress), ConsumedLightningAddress);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using BTCPayServer.Lightning;
|
||||
using NBitcoin;
|
||||
|
||||
@@ -40,5 +41,10 @@ namespace BTCPayServer.Payments.Lightning
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual Dictionary<string, object> GetAdditionalData()
|
||||
{
|
||||
return new();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1140,6 +1140,10 @@
|
||||
"activated": {
|
||||
"type": "boolean",
|
||||
"description": "If the payment method is activated (when lazy payments option is enabled"
|
||||
},
|
||||
"additionalData": {
|
||||
"type": "object",
|
||||
"description": "Additional data provided by the payment method."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
BIN
Plugins/packed/BTCPayServer.Plugins.FixedFloat.btcpay
Normal file
BIN
Plugins/packed/BTCPayServer.Plugins.FixedFloat.btcpay
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"Identifier":"BTCPayServer.Plugins.FixedFloat","Name":"FixedFloat","Version":"1.0.1.0","Description":"Allows you to embed a FixedFloat conversion screen to allow customers to pay with altcoins.","SystemPlugin":false,"Dependencies":[{"Identifier":"BTCPayServer","Condition":"\u003E=1.4.0.0"}]}
|
||||
BIN
Plugins/packed/BTCPayServer.Plugins.SideShift.btcpay
Normal file
BIN
Plugins/packed/BTCPayServer.Plugins.SideShift.btcpay
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"Identifier":"BTCPayServer.Plugins.SideShift","Name":"SideShift","Version":"1.0.3.0","Description":"Allows you to embed a SideShift conversion screen to allow customers to pay with altcoins.","SystemPlugin":false,"Dependencies":[{"Identifier":"BTCPayServer","Condition":"\u003E=1.4.0.0"}]}
|
||||
Reference in New Issue
Block a user