btcpayserver/BTCPayServer/Services/Invoices/PaymentBlob.cs
2024-04-04 16:31:04 +09:00

23 lines
701 B
C#

using BTCPayServer.JsonConverters;
using BTCPayServer.Payments;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Services.Invoices
{
public class PaymentBlob
{
public int Version { get; set; } = 2;
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal PaymentMethodFee { get; set; }
public string Destination { get; set; }
public JToken Details { get; set; }
public int Divisibility { get; set; }
public PaymentBlob SetDetails(IPaymentMethodHandler handler, object details)
{
Details = JToken.FromObject(details, handler.Serializer);
return this;
}
}
}