Skip to content

Commit

Permalink
set email from form to payment request
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukks committed Apr 11, 2024
1 parent 0f6294f commit 0bc41d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BTCPayServer/Controllers/UIPaymentRequestController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ public async Task<IActionResult> ViewPaymentRequestForm(string payReqId, FormVie
if (FormDataService.Validate(form, ModelState))
{
prBlob.FormResponse = FormDataService.GetValues(form);
if(string.IsNullOrEmpty(prBlob.Email) && form.GetFieldByFullName("buyerEmail") is { } emailField)
{
prBlob.Email = emailField.Value;
}
result.SetBlob(prBlob);
await _PaymentRequestRepository.CreateOrUpdatePaymentRequest(result);
return RedirectToAction("PayPaymentRequest", new { payReqId });
Expand Down

0 comments on commit 0bc41d9

Please sign in to comment.