Add warning about the tradeoff the paybutton (#3340)

* Add warning about the security tradeoff of the paybutton

* Update BTCPayServer/Views/UIStores/PayButtonEnable.cshtml

Co-authored-by: d11n <mail@dennisreimann.de>

* Move message in column

Co-authored-by: d11n <mail@dennisreimann.de>
This commit is contained in:
Nicolas Dorier
2022-01-24 20:00:42 +09:00
committed by GitHub
parent 11d6588249
commit e23ddf118e
4 changed files with 55 additions and 15 deletions

View File

@@ -992,6 +992,17 @@ namespace BTCPayServer.Controllers
return _UserManager.GetUserId(User);
}
[HttpPost("{storeId}/disable-anyone-can-pay")]
public async Task<IActionResult> DisableAnyoneCanCreateInvoice(string storeId)
{
var blob = CurrentStore.GetStoreBlob();
blob.AnyoneCanInvoice = false;
CurrentStore.SetStoreBlob(blob);
TempData[WellKnownTempData.SuccessMessage] = "Feature disabled";
await _Repo.UpdateStore(CurrentStore);
return RedirectToAction(nameof(Payment), new { storeId = storeId });
}
[Route("{storeId}/paybutton")]
public async Task<IActionResult> PayButton()
{