Fix exception on Payment Request (#672)

This commit is contained in:
nicolas.dorier
2019-03-11 16:06:27 +09:00
parent fafb02b0dc
commit c6ce676ad3
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<Version>1.0.3.82</Version> <Version>1.0.3.83</Version>
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn> <NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@@ -229,12 +229,12 @@ namespace BTCPayServer.Controllers
public async Task<IActionResult> PayPaymentRequest(string id, bool redirectToInvoice = true, public async Task<IActionResult> PayPaymentRequest(string id, bool redirectToInvoice = true,
decimal? amount = null, CancellationToken cancellationToken = default) 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) if (result == null)
{ {
return NotFound(); return NotFound();
} }
result.HubPath = PaymentRequestHub.GetHubPath(this.Request);
if (result.AmountDue <= 0) if (result.AmountDue <= 0)
{ {
if (redirectToInvoice) if (redirectToInvoice)