mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Fix strange message in PaymentRequests (Fix #1130)
This commit is contained in:
@@ -96,16 +96,12 @@ namespace BTCPayServer.Controllers
|
|||||||
nameof(StoreData.StoreName), data?.StoreDataId);
|
nameof(StoreData.StoreName), data?.StoreDataId);
|
||||||
if (!stores.Any())
|
if (!stores.Any())
|
||||||
{
|
{
|
||||||
return RedirectToAction("GetPaymentRequests",
|
TempData[WellKnownTempData.StatusMessageModel] = new StatusMessageModel()
|
||||||
new
|
{
|
||||||
{
|
Html = $"Error: You need to create at least one store. <a href='{Url.Action("CreateStore", "UserStores")}'>Create store</a>",
|
||||||
StatusMessage = new StatusMessageModel()
|
Severity = StatusMessageModel.StatusSeverity.Error
|
||||||
{
|
};
|
||||||
Html =
|
return RedirectToAction("GetPaymentRequests");
|
||||||
$"Error: You need to create at least one store. <a href='{Url.Action("CreateStore", "UserStores")}'>Create store</a>",
|
|
||||||
Severity = StatusMessageModel.StatusSeverity.Error
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return View(new UpdatePaymentRequestViewModel(data)
|
return View(new UpdatePaymentRequestViewModel(data)
|
||||||
@@ -212,7 +208,7 @@ namespace BTCPayServer.Controllers
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("{id}")]
|
[Route("{id}")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IActionResult> ViewPaymentRequest(string id, string statusMessage = null)
|
public async Task<IActionResult> ViewPaymentRequest(string id)
|
||||||
{
|
{
|
||||||
var result = await _PaymentRequestService.GetPaymentRequest(id, GetUserId());
|
var result = await _PaymentRequestService.GetPaymentRequest(id, GetUserId());
|
||||||
if (result == null)
|
if (result == null)
|
||||||
@@ -335,10 +331,10 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
if (redirect)
|
if (redirect)
|
||||||
{
|
{
|
||||||
|
TempData[WellKnownTempData.SuccessMessage] = "Payment cancelled";
|
||||||
return RedirectToAction(nameof(ViewPaymentRequest), new
|
return RedirectToAction(nameof(ViewPaymentRequest), new
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id
|
||||||
StatusMessage = "Payment cancelled"
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user