mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 22:11:48 +01:00
Make sure the invoiceEvent is from a payment request.
This commit is contained in:
parent
d818baa6d1
commit
5bccd07d7d
2 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -35,7 +35,6 @@ namespace BTCPayServer.PaymentRequest
|
|||
public async Task UpdatePaymentRequestStateIfNeeded(string id)
|
||||
{
|
||||
var pr = await _PaymentRequestRepository.FindPaymentRequest(id, null);
|
||||
|
||||
await UpdatePaymentRequestStateIfNeeded(pr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue