Fix form processing when cart is enabled (#424)

This commit is contained in:
Mario Dian
2018-11-30 10:29:27 +08:00
committed by Nicolas Dorier
parent bab7bf6633
commit 613281a1e7

View File

@@ -76,11 +76,7 @@ namespace BTCPayServer.Controllers
if (app == null) if (app == null)
return NotFound(); return NotFound();
var settings = app.GetSettings<PointOfSaleSettings>(); var settings = app.GetSettings<PointOfSaleSettings>();
if (string.IsNullOrEmpty(choiceKey) && !settings.EnableShoppingCart) if (string.IsNullOrEmpty(choiceKey) && !settings.ShowCustomAmount && !settings.EnableShoppingCart)
{
return RedirectToAction(nameof(ViewPointOfSale), new { appId = appId });
}
if (string.IsNullOrEmpty(choiceKey) && !settings.ShowCustomAmount)
{ {
return RedirectToAction(nameof(ViewPointOfSale), new { appId = appId }); return RedirectToAction(nameof(ViewPointOfSale), new { appId = appId });
} }
@@ -99,7 +95,7 @@ namespace BTCPayServer.Controllers
} }
else else
{ {
if (!settings.ShowCustomAmount) if (!settings.ShowCustomAmount && !settings.EnableShoppingCart)
return NotFound(); return NotFound();
price = amount; price = amount;
title = settings.Title; title = settings.Title;