mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Make sure the invoiceEvent is from a payment request.
This commit is contained in:
@@ -116,9 +116,9 @@ namespace BTCPayServer.PaymentRequest
|
||||
{
|
||||
if (evt is InvoiceEvent invoiceEvent)
|
||||
{
|
||||
var paymentRequestId =
|
||||
PaymentRequestRepository.GetPaymentRequestIdFromOrderId(invoiceEvent.Invoice.OrderId);
|
||||
|
||||
var paymentRequestId = PaymentRequestRepository.GetPaymentRequestIdFromOrderId(invoiceEvent.Invoice.OrderId);
|
||||
if (paymentRequestId == null)
|
||||
return;
|
||||
if (invoiceEvent.Name == InvoiceEvent.ReceivedPayment)
|
||||
{
|
||||
await _PaymentRequestService.UpdatePaymentRequestStateIfNeeded(paymentRequestId);
|
||||
|
||||
Reference in New Issue
Block a user