Include invoices with payment webhooks
This commit is contained in:
parent
15a00b3b73
commit
9330f51a86
1 changed files with 3 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ class PaymentObserver
|
|||
->where('event_id', Webhook::EVENT_CREATE_PAYMENT)
|
||||
->exists();
|
||||
|
||||
if($payment->invoices()->exists())
|
||||
$payment->load('invoices');
|
||||
|
||||
if ($subscriptions) {
|
||||
WebhookHandler::dispatch(Webhook::EVENT_CREATE_PAYMENT, $payment, $payment->company);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue