mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-31 12:44:29 +01:00
Currently invoice email notifications are only sent when the invoice is created via the API. This commit adds an option to set an email address for notifications when an invoice is created from the Web UI.
98 lines
1.9 KiB
C#
98 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using BTCPayServer.Validation;
|
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
|
|
namespace BTCPayServer.Models.InvoicingModels
|
|
{
|
|
public class CreateInvoiceModel
|
|
{
|
|
public CreateInvoiceModel()
|
|
{
|
|
Currency = "USD";
|
|
}
|
|
|
|
public decimal? Amount
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[Required]
|
|
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;
|
|
}
|
|
|
|
[Display(Name = "Default payment method on checkout")]
|
|
public string DefaultPaymentMethod
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[DisplayName("POS Data")]
|
|
public string PosData
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[EmailAddress]
|
|
[DisplayName("Buyer Email")]
|
|
public string BuyerEmail
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[Uri]
|
|
[DisplayName("Notification Url")]
|
|
public string NotificationUrl
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public SelectList Stores
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[DisplayName("Supported Transaction Currencies")]
|
|
public List<string> SupportedTransactionCurrencies
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[DisplayName("Available Payment Methods")]
|
|
public SelectList AvailablePaymentMethods
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[EmailAddress]
|
|
[DisplayName("Notification Email")]
|
|
public string NotificationEmail
|
|
{
|
|
get; set;
|
|
}
|
|
}
|
|
}
|