diff --git a/BTCPayServer/Controllers/PaymentRequestController.cs b/BTCPayServer/Controllers/PaymentRequestController.cs
index 686994d20..e5792ba70 100644
--- a/BTCPayServer/Controllers/PaymentRequestController.cs
+++ b/BTCPayServer/Controllers/PaymentRequestController.cs
@@ -99,7 +99,12 @@ namespace BTCPayServer.Controllers
return RedirectToAction("GetPaymentRequests",
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. Create store",
+ Severity = StatusMessageModel.StatusSeverity.Error
+ }
});
}
@@ -283,18 +288,21 @@ namespace BTCPayServer.Controllers
var redirectUrl = Request.GetDisplayUrl().TrimEnd("/pay", StringComparison.InvariantCulture)
.Replace("hub?id=", string.Empty, StringComparison.InvariantCultureIgnoreCase);
var newInvoiceId = (await _InvoiceController.CreateInvoiceCore(new CreateInvoiceRequest()
- {
- OrderId = $"{PaymentRequestRepository.GetOrderIdForPaymentRequest(id)}",
- Currency = blob.Currency,
- Price = amount.Value,
- FullNotifications = true,
- BuyerEmail = result.Email,
- RedirectURL = redirectUrl,
- }, store, HttpContext.Request.GetAbsoluteRoot(), new List() { PaymentRequestRepository.GetInternalTag(id) }, cancellationToken: cancellationToken)).Data.Id;
+ {
+ OrderId = $"{PaymentRequestRepository.GetOrderIdForPaymentRequest(id)}",
+ Currency = blob.Currency,
+ Price = amount.Value,
+ FullNotifications = true,
+ BuyerEmail = result.Email,
+ RedirectURL = redirectUrl,
+ }, store, HttpContext.Request.GetAbsoluteRoot(),
+ new List() {PaymentRequestRepository.GetInternalTag(id)},
+ cancellationToken: cancellationToken))
+ .Data.Id;
if (redirectToInvoice)
{
- return RedirectToAction("Checkout", "Invoice", new { Id = newInvoiceId });
+ return RedirectToAction("Checkout", "Invoice", new {Id = newInvoiceId});
}
return Ok(newInvoiceId);