2020-06-28 21:44:35 -05:00
|
|
|
using System;
|
2017-10-13 00:25:45 +09:00
|
|
|
using System.Collections.Generic;
|
2020-07-22 13:58:41 +02:00
|
|
|
using BTCPayServer.Client.Models;
|
2022-06-03 12:08:16 +02:00
|
|
|
using BTCPayServer.Data;
|
2019-08-24 16:10:13 +02:00
|
|
|
using BTCPayServer.Payments;
|
2020-02-19 09:35:23 +01:00
|
|
|
using BTCPayServer.Payments.Bitcoin;
|
2017-10-20 14:06:37 -05:00
|
|
|
using BTCPayServer.Services.Invoices;
|
2017-10-13 00:25:45 +09:00
|
|
|
using NBitcoin;
|
2019-08-24 16:10:13 +02:00
|
|
|
using Newtonsoft.Json;
|
2017-10-13 00:25:45 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Models.InvoicingModels
|
|
|
|
{
|
2019-08-24 16:10:13 +02:00
|
|
|
public class OnchainPaymentViewModel
|
|
|
|
{
|
2024-10-04 16:58:13 +09:00
|
|
|
public PaymentMethodId PaymentMethodId { get; set; }
|
2019-08-24 16:10:13 +02:00
|
|
|
public string Confirmations { get; set; }
|
|
|
|
public BitcoinAddress DepositAddress { get; set; }
|
|
|
|
public string Amount { get; set; }
|
|
|
|
public string TransactionId { get; set; }
|
|
|
|
public DateTimeOffset ReceivedTime { get; set; }
|
|
|
|
public string TransactionLink { get; set; }
|
|
|
|
|
|
|
|
public bool Replaced { get; set; }
|
2020-02-19 09:35:23 +01:00
|
|
|
public BitcoinLikePaymentData CryptoPaymentData { get; set; }
|
2024-04-04 16:31:04 +09:00
|
|
|
public decimal Value { get; set; }
|
2020-04-05 22:44:34 +09:00
|
|
|
public string AdditionalInformation { get; set; }
|
2021-07-06 00:18:14 +02:00
|
|
|
public decimal NetworkFee { get; set; }
|
2023-04-04 03:59:14 +02:00
|
|
|
public string PaymentProof { get; set; }
|
2024-10-04 16:58:13 +09:00
|
|
|
public string Currency { get; set; }
|
2019-08-24 16:10:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public class OffChainPaymentViewModel
|
|
|
|
{
|
2024-04-04 16:31:04 +09:00
|
|
|
public string Type { get; set; }
|
2019-08-24 16:10:13 +02:00
|
|
|
public string BOLT11 { get; set; }
|
2023-04-04 03:59:14 +02:00
|
|
|
public string Amount { get; set; }
|
|
|
|
public string PaymentProof { get; set; }
|
2019-08-24 16:10:13 +02:00
|
|
|
}
|
2020-06-28 17:55:27 +09:00
|
|
|
|
2017-10-13 00:25:45 +09:00
|
|
|
public class InvoiceDetailsModel
|
|
|
|
{
|
2018-01-08 20:06:16 +09:00
|
|
|
public class CryptoPayment
|
|
|
|
{
|
2018-03-06 16:37:25 -05:00
|
|
|
public string PaymentMethod { get; set; }
|
2023-10-10 05:28:00 +02:00
|
|
|
public string TotalDue { get; set; }
|
2018-01-08 20:06:16 +09:00
|
|
|
public string Due { get; set; }
|
|
|
|
public string Paid { get; set; }
|
2020-02-28 16:30:57 -06:00
|
|
|
public string Address { get; internal set; }
|
2018-01-08 20:06:16 +09:00
|
|
|
public string Rate { get; internal set; }
|
|
|
|
public string PaymentUrl { get; internal set; }
|
2018-05-04 02:01:43 +09:00
|
|
|
public string Overpaid { get; set; }
|
2019-08-24 16:10:13 +02:00
|
|
|
[JsonIgnore]
|
|
|
|
public PaymentMethodId PaymentMethodId { get; set; }
|
2021-10-25 08:18:02 +02:00
|
|
|
|
2024-04-04 16:31:04 +09:00
|
|
|
public PaymentPrompt PaymentMethodRaw { get; set; }
|
2018-01-08 20:06:16 +09:00
|
|
|
}
|
2018-03-06 16:37:25 -05:00
|
|
|
public class AddressModel
|
|
|
|
{
|
|
|
|
public string PaymentMethod { get; set; }
|
|
|
|
public string Destination { get; set; }
|
|
|
|
public bool Current { get; set; }
|
|
|
|
}
|
2017-10-27 17:53:04 +09:00
|
|
|
public String Id
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2017-10-13 00:25:45 +09:00
|
|
|
|
2018-01-08 20:06:16 +09:00
|
|
|
public List<CryptoPayment> CryptoPayments
|
2017-10-27 17:53:04 +09:00
|
|
|
{
|
|
|
|
get; set;
|
2018-01-08 20:06:16 +09:00
|
|
|
} = new List<CryptoPayment>();
|
|
|
|
|
2022-01-11 21:49:56 +09:00
|
|
|
public InvoiceState State
|
2017-10-27 17:53:04 +09:00
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2018-12-10 21:48:28 +09:00
|
|
|
public InvoiceExceptionStatus StatusException { get; set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
public DateTimeOffset CreatedDate
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2017-10-13 00:25:45 +09:00
|
|
|
|
2017-10-27 17:53:04 +09:00
|
|
|
public DateTimeOffset ExpirationDate
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2020-11-06 20:42:26 +09:00
|
|
|
|
|
|
|
public List<StoreViewModels.DeliveryViewModel> Deliveries { get; set; } = new List<StoreViewModels.DeliveryViewModel>();
|
2019-01-30 19:18:44 +09:00
|
|
|
public string TaxIncluded { get; set; }
|
2018-01-19 00:52:17 +09:00
|
|
|
|
|
|
|
public string TransactionSpeed { get; set; }
|
2020-11-06 20:42:26 +09:00
|
|
|
public string StoreId { get; set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
public object StoreName
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
internal set;
|
|
|
|
}
|
|
|
|
public string StoreLink
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
set;
|
|
|
|
}
|
2021-07-14 13:43:13 +02:00
|
|
|
|
|
|
|
public string PaymentRequestLink
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
set;
|
|
|
|
}
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2017-10-27 17:53:04 +09:00
|
|
|
public string NotificationUrl
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
internal set;
|
|
|
|
}
|
2018-01-14 15:01:09 +09:00
|
|
|
|
|
|
|
public string RedirectUrl { get; set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
public string Fiat
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
set;
|
|
|
|
}
|
2020-08-25 14:33:00 +09:00
|
|
|
public InvoiceMetadata TypedMetadata { get; set; }
|
2018-01-08 20:06:16 +09:00
|
|
|
public DateTimeOffset MonitoringDate { get; internal set; }
|
2024-04-25 14:09:01 +09:00
|
|
|
public InvoiceEventData[] Events { get; internal set; }
|
2018-10-11 20:09:13 -05:00
|
|
|
public string NotificationEmail { get; internal set; }
|
2023-02-25 14:38:28 +01:00
|
|
|
public Dictionary<string, object> Metadata { get; set; }
|
2023-08-10 14:57:54 +03:00
|
|
|
public Dictionary<string, object> ReceiptData { get; set; }
|
2023-02-25 14:38:28 +01:00
|
|
|
public Dictionary<string, object> AdditionalData { get; set; }
|
2019-08-24 16:10:13 +02:00
|
|
|
public List<PaymentEntity> Payments { get; set; }
|
2020-05-07 12:50:07 +02:00
|
|
|
public bool Archived { get; set; }
|
2020-06-24 17:51:00 +09:00
|
|
|
public bool CanRefund { get; set; }
|
2021-06-24 12:52:41 +02:00
|
|
|
public bool ShowCheckout { get; set; }
|
2022-06-03 12:08:16 +02:00
|
|
|
public List<RefundData> Refunds { get; set; }
|
2022-07-06 14:14:55 +02:00
|
|
|
public bool ShowReceipt { get; set; }
|
2023-10-10 05:28:00 +02:00
|
|
|
public bool Overpaid { get; set; }
|
2023-10-11 16:12:45 +02:00
|
|
|
public bool HasRefund { get; set; }
|
2023-10-10 05:28:00 +02:00
|
|
|
public bool StillDue { get; set; }
|
|
|
|
public bool HasRates { get; set; }
|
2024-10-07 18:19:19 +09:00
|
|
|
public InvoiceEntity Entity { get; internal set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
}
|
2017-10-13 00:25:45 +09:00
|
|
|
}
|