diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index 0dba4820f..fd95777be 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -2,7 +2,7 @@ Exe netcoreapp2.1 - 1.0.3.82 + 1.0.3.83 NU1701,CA1816,CA1308,CA1810,CA2208 diff --git a/BTCPayServer/Controllers/PaymentRequestController.cs b/BTCPayServer/Controllers/PaymentRequestController.cs index d47765123..a17f1421b 100644 --- a/BTCPayServer/Controllers/PaymentRequestController.cs +++ b/BTCPayServer/Controllers/PaymentRequestController.cs @@ -229,12 +229,12 @@ namespace BTCPayServer.Controllers public async Task PayPaymentRequest(string id, bool redirectToInvoice = true, decimal? amount = null, CancellationToken cancellationToken = default) { - var result = ((await ViewPaymentRequest(id)) as ViewResult)?.Model as ViewPaymentRequestViewModel; + var result = await _PaymentRequestService.GetPaymentRequest(id, GetUserId()); if (result == null) { return NotFound(); } - + result.HubPath = PaymentRequestHub.GetHubPath(this.Request); if (result.AmountDue <= 0) { if (redirectToInvoice)