mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
b5f4739ae5
* allow invoice creation to only allow specific payment methods * add test * reuse existing feature * final fixes
86 lines
1.5 KiB
C#
86 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using BTCPayServer.Validation;
|
|
|
|
namespace BTCPayServer.Models.InvoicingModels
|
|
{
|
|
public class CreateInvoiceModel
|
|
{
|
|
public CreateInvoiceModel()
|
|
{
|
|
Currency = "USD";
|
|
}
|
|
[Required]
|
|
public decimal? Amount
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[Required]
|
|
public string Currency
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[Required]
|
|
public string StoreId
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public string OrderId
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public string ItemDesc
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public string PosData
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[EmailAddress]
|
|
public string BuyerEmail
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[EmailAddress]
|
|
public string NotificationEmail
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[Uri]
|
|
public string NotificationUrl
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public SelectList Stores
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public List<string> SupportedTransactionCurrencies
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
public SelectList AvailablePaymentMethods
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
}
|
|
}
|