Allow Pay Button to work on Apps

This PR allows you to use the pay button generator to create buttons that target apps. This means that you can generate an invoice that is linked to an item on the POS/Crowdfund (targeting the item is optional). The POS/Crowdfund item amount -> invoice creation amount validation works too so that the user cannot modify the amount of a perk using just html ( fixes #1392 )
This commit is contained in:
Kukks
2020-03-15 10:51:57 +01:00
committed by rockstardev
parent f0f05acdfd
commit 36bd76248b
7 changed files with 108 additions and 31 deletions

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.ModelBinders;
using BTCPayServer.Models.AppViewModels;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Models.StoreViewModels
@@ -43,5 +44,8 @@ namespace BTCPayServer.Models.StoreViewModels
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; } = "";
}
}