mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 14:40:36 +01:00
* Support specifying payment method through apps closes #1525 This is great if you want to offer items with an incentive to use a specific payment method without messing with the rates. For example, you can have `Item A` which costs 25$ and your store is configured for USDT and BTC. You can create two items, with different prices, where Item A costs 20$ if you pay with bitcoin or 25$ if you paid in dirty fiat pegs * make code cleaner * Add Test * fix test * fix test
58 lines
2 KiB
C#
58 lines
2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BTCPayServer.Models.AppViewModels
|
|
{
|
|
public class ViewPointOfSaleViewModel
|
|
{
|
|
public class Item
|
|
{
|
|
public class ItemPrice
|
|
{
|
|
public string Formatted { get; set; }
|
|
public decimal Value { get; set; }
|
|
}
|
|
public string Description { get; set; }
|
|
public string Id { get; set; }
|
|
public string Image { get; set; }
|
|
public ItemPrice Price { get; set; }
|
|
public string Title { get; set; }
|
|
public bool Custom { get; set; }
|
|
public int? Inventory { get; set; } = null;
|
|
public string[] PaymentMethods { get; set; }
|
|
}
|
|
|
|
public class CurrencyInfoData
|
|
{
|
|
public bool Prefixed { get; set; }
|
|
public string CurrencySymbol { get; set; }
|
|
public string ThousandSeparator { get; set; }
|
|
public string DecimalSeparator { get; set; }
|
|
public int Divisibility { get; set; }
|
|
public bool SymbolSpace { get; set; }
|
|
}
|
|
|
|
public CurrencyInfoData CurrencyInfo { get; set; }
|
|
|
|
public bool EnableShoppingCart { get; set; }
|
|
public bool ShowCustomAmount { get; set; }
|
|
public bool ShowDiscount { get; set; }
|
|
public bool EnableTips { get; set; }
|
|
public string Step { get; set; }
|
|
public string Title { get; set; }
|
|
public Item[] Items { get; set; }
|
|
public string CurrencyCode { get; set; }
|
|
public string CurrencySymbol { get; set; }
|
|
public string AppId { get; set; }
|
|
public string ButtonText { get; set; }
|
|
public string CustomButtonText { get; set; }
|
|
public string CustomTipText { get; set; }
|
|
public int[] CustomTipPercentages { get; set; }
|
|
|
|
public string CustomCSSLink { get; set; }
|
|
public string Description { get; set; }
|
|
public string EmbeddedCSS { get; set; }
|
|
}
|
|
}
|