More URL id parameter fixes (#3673)

This commit is contained in:
d11n 2022-04-22 15:52:57 +02:00 committed by GitHub
parent b39a67534c
commit 9ab129ba89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -186,7 +186,7 @@ namespace BTCPayServer.Controllers
{
if (redirectToInvoice)
{
return RedirectToAction("ViewPaymentRequest", new { Id = payReqId });
return RedirectToAction("ViewPaymentRequest", new { payReqId });
}
return BadRequest("Payment Request cannot be paid as it has been archived");
@ -197,7 +197,7 @@ namespace BTCPayServer.Controllers
{
if (redirectToInvoice)
{
return RedirectToAction("ViewPaymentRequest", new { Id = payReqId });
return RedirectToAction("ViewPaymentRequest", new { payReqId });
}
return BadRequest("Payment Request has already been settled.");
@ -207,7 +207,7 @@ namespace BTCPayServer.Controllers
{
if (redirectToInvoice)
{
return RedirectToAction("ViewPaymentRequest", new { Id = payReqId });
return RedirectToAction("ViewPaymentRequest", new { payReqId });
}
return BadRequest("Payment Request has expired");
@ -265,7 +265,7 @@ namespace BTCPayServer.Controllers
if (redirectToInvoice)
{
return RedirectToAction("Checkout", "UIInvoice", new { newInvoice.Id });
return RedirectToAction("Checkout", "UIInvoice", new { invoiceId = newInvoice.Id });
}
return Ok(newInvoice.Id);
@ -306,7 +306,7 @@ namespace BTCPayServer.Controllers
if (redirect)
{
TempData[WellKnownTempData.SuccessMessage] = "Payment cancelled";
return RedirectToAction(nameof(ViewPaymentRequest), new { Id = payReqId });
return RedirectToAction(nameof(ViewPaymentRequest), new { payReqId });
}
return Ok("Payment cancelled");