Fix: Form in Payment Requests was not setting its values to the invoices metadata (#4907)

This commit is contained in:
Nicolas Dorier
2023-04-24 18:04:46 +09:00
committed by GitHub
parent c3c8cc21ff
commit 39b76c08de
4 changed files with 24 additions and 18 deletions

View File

@@ -277,7 +277,6 @@ namespace BTCPayServer.Controllers
return BadRequest("Payment Request cannot be paid as it has been archived");
}
if (!result.FormSubmitted && !string.IsNullOrEmpty(result.FormId))
{
var formData = await FormDataService.GetForm(result.FormId);
@@ -322,7 +321,8 @@ namespace BTCPayServer.Controllers
try
{
var store = await _storeRepository.FindStore(result.StoreId);
var newInvoice = await _InvoiceController.CreatePaymentRequestInvoice(result, amount, store, Request, cancellationToken);
var prData = await _PaymentRequestRepository.FindPaymentRequest(result.Id, null);
var newInvoice = await _InvoiceController.CreatePaymentRequestInvoice(prData, amount, result.AmountDue, store, Request, cancellationToken);
if (redirectToInvoice)
{
return RedirectToAction("Checkout", "UIInvoice", new { invoiceId = newInvoice.Id });