mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Fix: Creating a new invoice in payment request with LNURL activated would crash
This commit is contained in:
@@ -215,7 +215,7 @@ namespace BTCPayServer.Controllers.GreenField
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var invoice = await _invoiceController.CreateInvoiceCoreRaw(request, store,
|
var invoice = await _invoiceController.CreateInvoiceCoreRaw(request, store,
|
||||||
Request.GetAbsoluteUri(""));
|
Request.GetAbsoluteRoot());
|
||||||
return Ok(ToModel(invoice));
|
return Ok(ToModel(invoice));
|
||||||
}
|
}
|
||||||
catch (BitpayHttpException e)
|
catch (BitpayHttpException e)
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ namespace BTCPayServer.Controllers
|
|||||||
};
|
};
|
||||||
|
|
||||||
var additionalTags = new List<string> {PaymentRequestRepository.GetInternalTag(id)};
|
var additionalTags = new List<string> {PaymentRequestRepository.GetInternalTag(id)};
|
||||||
var newInvoice = await _InvoiceController.CreateInvoiceCoreRaw(invoiceRequest,store, "/",additionalTags, cancellationToken);
|
var newInvoice = await _InvoiceController.CreateInvoiceCoreRaw(invoiceRequest,store, Request.GetAbsoluteRoot(), additionalTags, cancellationToken);
|
||||||
|
|
||||||
if (redirectToInvoice)
|
if (redirectToInvoice)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ namespace BTCPayServer.Plugins.Shopify
|
|||||||
Currency = order.Currency,
|
Currency = order.Currency,
|
||||||
Metadata = new JObject {["orderId"] = invoiceOrderId}
|
Metadata = new JObject {["orderId"] = invoiceOrderId}
|
||||||
}, store,
|
}, store,
|
||||||
Request.GetAbsoluteUri(""), new List<string>() {invoiceOrderId});
|
Request.GetAbsoluteRoot(), new List<string>() {invoiceOrderId});
|
||||||
|
|
||||||
return Ok(new {invoiceId = invoice.Id, status = invoice.Status.ToString().ToLowerInvariant()});
|
return Ok(new {invoiceId = invoice.Id, status = invoice.Status.ToString().ToLowerInvariant()});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user