mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
fix no store error message for payment request (#646)
* fix no store error message for payment request closes #628 * Update PaymentRequestController.cs
This commit is contained in:
committed by
Nicolas Dorier
parent
06406c0695
commit
fd963b9ad0
@@ -99,7 +99,12 @@ namespace BTCPayServer.Controllers
|
|||||||
return RedirectToAction("GetPaymentRequests",
|
return RedirectToAction("GetPaymentRequests",
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
StatusMessage = "Error: You need to create at least one store before creating a payment request"
|
StatusMessage = new StatusMessageModel()
|
||||||
|
{
|
||||||
|
Html =
|
||||||
|
$"Error: You need to create at least one store. <a href='{Url.Action("CreateStore", "UserStores")}'>Create store</a>",
|
||||||
|
Severity = StatusMessageModel.StatusSeverity.Error
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,11 +295,14 @@ namespace BTCPayServer.Controllers
|
|||||||
FullNotifications = true,
|
FullNotifications = true,
|
||||||
BuyerEmail = result.Email,
|
BuyerEmail = result.Email,
|
||||||
RedirectURL = redirectUrl,
|
RedirectURL = redirectUrl,
|
||||||
}, store, HttpContext.Request.GetAbsoluteRoot(), new List<string>() { PaymentRequestRepository.GetInternalTag(id) }, cancellationToken: cancellationToken)).Data.Id;
|
}, store, HttpContext.Request.GetAbsoluteRoot(),
|
||||||
|
new List<string>() {PaymentRequestRepository.GetInternalTag(id)},
|
||||||
|
cancellationToken: cancellationToken))
|
||||||
|
.Data.Id;
|
||||||
|
|
||||||
if (redirectToInvoice)
|
if (redirectToInvoice)
|
||||||
{
|
{
|
||||||
return RedirectToAction("Checkout", "Invoice", new { Id = newInvoiceId });
|
return RedirectToAction("Checkout", "Invoice", new {Id = newInvoiceId});
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(newInvoiceId);
|
return Ok(newInvoiceId);
|
||||||
|
|||||||
Reference in New Issue
Block a user