mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 19:34:39 -04:00
Include invoices with payment webhooks
This commit is contained in:
parent
15a00b3b73
commit
9330f51a86
@ -29,6 +29,9 @@ class PaymentObserver
|
|||||||
->where('event_id', Webhook::EVENT_CREATE_PAYMENT)
|
->where('event_id', Webhook::EVENT_CREATE_PAYMENT)
|
||||||
->exists();
|
->exists();
|
||||||
|
|
||||||
|
if($payment->invoices()->exists())
|
||||||
|
$payment->load('invoices');
|
||||||
|
|
||||||
if ($subscriptions) {
|
if ($subscriptions) {
|
||||||
WebhookHandler::dispatch(Webhook::EVENT_CREATE_PAYMENT, $payment, $payment->company);
|
WebhookHandler::dispatch(Webhook::EVENT_CREATE_PAYMENT, $payment, $payment->company);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user