btcpayserver/BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs
d11n 3805b7f287
Checkout v2 (#4157)
* Opt-in for new checkout

* Update wording

* Create invoice view update

* Remove jQuery from checkout testing code

* Checkout v2 basics

* WIP

* WIP 2

* Updates and fixes

* Updates

* Design updates

* More design updates

* Cheating and JS fixes

* Use checkout form id whenever invoices get created

* Improve email form handling

* Cleanups

* Payment method exclusion cases for Lightning and LNURL

TODO: Cases and implementation need to be discussed

* Introduce CheckoutType in API and replace UseNewCheckout in backend

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-11-02 18:21:33 +09:00

97 lines
2.1 KiB
C#

using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using BTCPayServer.Services.Apps;
using BTCPayServer.Validation;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Models.InvoicingModels
{
public class CreateInvoiceModel
{
public decimal? Amount
{
get; set;
}
public string Currency
{
get; set;
}
[Required]
[DisplayName("Store Id")]
public string StoreId
{
get; set;
}
[DisplayName("Order Id")]
public string OrderId
{
get; set;
}
[DisplayName("Item Description")]
public string ItemDesc
{
get; set;
}
[DisplayName("Default payment method on checkout")]
public string DefaultPaymentMethod
{
get; set;
}
[DisplayName("POS Data")]
public string PosData
{
get; set;
}
[MailboxAddress]
[DisplayName("Buyer Email")]
public string BuyerEmail
{
get; set;
}
[Uri]
[DisplayName("Notification URL")]
public string NotificationUrl
{
get; set;
}
[DisplayName("Supported Transaction Currencies")]
public List<string> SupportedTransactionCurrencies
{
get; set;
}
[DisplayName("Available Payment Methods")]
public SelectList AvailablePaymentMethods
{
get; set;
}
[MailboxAddress]
[DisplayName("Notification Email")]
public string NotificationEmail
{
get; set;
}
[DisplayName("Require Refund Email")]
public RequiresRefundEmail RequiresRefundEmail
{
get; set;
}
[Display(Name = "Request customer data on checkout")]
public string CheckoutFormId { get; set; }
public bool UseNewCheckout { get; set; }
}
}