btcpayserver/BTCPayServer/Models/StoreViewModels/PayButtonViewModel.cs

52 lines
1.8 KiB
C#
Raw Normal View History

2020-06-29 04:44:35 +02:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.ModelBinders;
using BTCPayServer.Models.AppViewModels;
using Microsoft.AspNetCore.Mvc;
2018-08-10 20:26:51 +02:00
namespace BTCPayServer.Models.StoreViewModels
2018-08-10 20:26:51 +02:00
{
public class PayButtonViewModel
{
[ModelBinder(BinderType = typeof(InvariantDecimalModelBinder))]
2018-08-10 20:26:51 +02:00
public decimal Price { get; set; }
2018-09-08 07:53:11 +02:00
public string InvoiceId { get; set; }
[Required]
2018-08-10 20:26:51 +02:00
public string Currency { get; set; }
public string CheckoutDesc { get; set; }
2018-08-14 14:57:46 +02:00
public string OrderId { get; set; }
2018-08-10 20:26:51 +02:00
public int ButtonSize { get; set; }
public int ButtonType { get; set; }
2019-04-04 20:56:12 +02:00
// 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]
2018-08-10 20:26:51 +02:00
public string ServerIpn { get; set; }
[Url]
2018-08-10 20:26:51 +02:00
public string BrowserRedirect { get; set; }
[EmailAddress]
public string NotifyEmail { get; set; }
2018-08-14 14:57:46 +02:00
public string StoreId { get; set; }
public string CheckoutQueryString { get; set; }
2018-08-22 12:59:55 +02:00
2018-08-22 10:52:17 +02:00
// Data that influences Pay Button UI, but not invoice creation
2018-08-14 14:57:46 +02:00
public string UrlRoot { get; set; }
public List<string> CurrencyDropdown { get; set; }
2018-08-22 10:52:17 +02:00
public string PayButtonImageUrl { get; set; }
public string PayButtonText { get; set; }
public bool UseModal { get; set; }
public bool JsonResponse { get; set; }
public ListAppsViewModel.ListAppViewModel[] Apps { get; set; }
public string AppIdEndpoint { get; set; } = "";
public string AppChoiceKey { get; set; } = "";
2018-08-10 20:26:51 +02:00
}
}