2020-06-29 04:44:35 +02:00
|
|
|
using System.Collections.Generic;
|
2018-08-17 13:21:00 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2019-03-09 15:40:22 +01:00
|
|
|
using BTCPayServer.ModelBinders;
|
2020-03-15 10:51:57 +01:00
|
|
|
using BTCPayServer.Models.AppViewModels;
|
2019-03-09 15:40:22 +01:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2018-08-10 20:26:51 +02:00
|
|
|
|
2018-08-22 13:57:54 +02:00
|
|
|
namespace BTCPayServer.Models.StoreViewModels
|
2018-08-10 20:26:51 +02:00
|
|
|
{
|
|
|
|
public class PayButtonViewModel
|
|
|
|
{
|
2019-03-09 15:40:22 +01:00
|
|
|
[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; }
|
2018-08-17 13:21:00 +02:00
|
|
|
[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; }
|
2019-04-03 21:43:53 +02:00
|
|
|
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; }
|
|
|
|
|
2019-07-31 15:58:04 +02:00
|
|
|
// Custom Amount properties (ButtonType = 1)
|
|
|
|
public bool SimpleInput { get; set; }
|
|
|
|
public bool FitButtonInline { get; set; }
|
|
|
|
|
2018-08-17 13:26:33 +02:00
|
|
|
[Url]
|
2018-08-10 20:26:51 +02:00
|
|
|
public string ServerIpn { get; set; }
|
2018-08-17 13:26:33 +02:00
|
|
|
[Url]
|
2018-08-10 20:26:51 +02:00
|
|
|
public string BrowserRedirect { get; set; }
|
2018-08-17 13:26:33 +02:00
|
|
|
[EmailAddress]
|
2018-08-17 12:38:03 +02:00
|
|
|
public string NotifyEmail { get; set; }
|
2018-08-14 14:57:46 +02:00
|
|
|
|
2018-08-22 13:57:54 +02:00
|
|
|
public string StoreId { get; set; }
|
2019-06-25 21:01:37 +02:00
|
|
|
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; }
|
2018-08-14 23:47:41 +02:00
|
|
|
public List<string> CurrencyDropdown { get; set; }
|
2018-08-22 10:52:17 +02:00
|
|
|
public string PayButtonImageUrl { get; set; }
|
2020-02-24 13:29:29 +01:00
|
|
|
public string PayButtonText { get; set; }
|
2020-02-28 16:01:44 +01:00
|
|
|
public bool UseModal { get; set; }
|
|
|
|
public bool JsonResponse { get; set; }
|
2020-03-15 10:51:57 +01:00
|
|
|
public ListAppsViewModel.ListAppViewModel[] Apps { get; set; }
|
|
|
|
public string AppIdEndpoint { get; set; } = "";
|
|
|
|
public string AppChoiceKey { get; set; } = "";
|
2018-08-10 20:26:51 +02:00
|
|
|
}
|
|
|
|
}
|