btcpayserver/BTCPayServer/Models/InvoicingModels/RefundModel.cs
Kukks 735995954f Add custom refund option
Allows you to specify an alternative refund amount and currency. This allows partial refunds and other negotiated terms
closes #1874
2020-09-02 11:24:18 +02:00

31 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Models.InvoicingModels
{
public enum RefundSteps
{
SelectPaymentMethod,
SelectRate,
SelectCustomAmount
}
public class RefundModel
{
public string Title { get; set; }
public SelectList AvailablePaymentMethods { get; set; }
[Display(Name = "Select the payment method used for refund")]
public string SelectedPaymentMethod { get; set; }
public RefundSteps RefundStep { get; set; }
public string SelectedRefundOption { get; set; }
public decimal CryptoAmountNow { get; set; }
public string CurrentRateText { get; set; }
public decimal CryptoAmountThen { get; set; }
public string RateThenText { get; set; }
public string FiatText { get; set; }
public decimal FiatAmount { get; set; }
[Display(Name = "Specify the amount and currency for the refund")]
public decimal CustomAmount { get; set; }
public string CustomCurrency { get; set; }
}
}