btcpayserver/BTCPayServer/Models/StoreViewModels/PayButtonViewModel.cs
Andrew Camilleri 89a7166c1b More options to Custom Amount Pay button (#948)
* Start adding more options to Custom Amount Pay button

This allows you to simplify the custom amount pay button to remove the big + & - buttons along with set a min, max and step amounts. There's also an option to fit the button next to the input amount to have it more condensed(not finished)

* make fit button inline work nicely

* make currency dropdown more obvious

* fix space
2019-07-31 22:58:04 +09:00

45 lines
1.5 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.ModelBinders;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Models.StoreViewModels
{
public class PayButtonViewModel
{
[ModelBinder(BinderType = typeof(InvariantDecimalModelBinder))]
public decimal Price { get; set; }
public string InvoiceId { get; set; }
[Required]
public string Currency { get; set; }
public string CheckoutDesc { get; set; }
public string OrderId { get; set; }
public int ButtonSize { get; set; }
public int ButtonType { get; set; }
// Slider properties (ButtonType = 2)
public decimal Min { get; set; }
public decimal Max { get; set; }
public decimal Step { get; set; }
// Custom Amount properties (ButtonType = 1)
public bool SimpleInput { get; set; }
public bool FitButtonInline { get; set; }
[Url]
public string ServerIpn { get; set; }
[Url]
public string BrowserRedirect { get; set; }
[EmailAddress]
public string NotifyEmail { get; set; }
public string StoreId { get; set; }
public string CheckoutQueryString { get; set; }
// Data that influences Pay Button UI, but not invoice creation
public string UrlRoot { get; set; }
public List<string> CurrencyDropdown { get; set; }
public string PayButtonImageUrl { get; set; }
}
}