Fixes for google analytics

This commit is contained in:
David Bomba 2021-08-19 09:14:53 +10:00
parent 59c9287ec5
commit df42c16be7

View File

@ -80,7 +80,7 @@ class PaymentNotification implements ShouldQueue
private function trackRevenue($event)
{
$payment = $event->payment;
$invoice = $payment->invoice;
$invoice = $payment->invoices()->exists() ? $payment->invoices->first() : false;
$company = $payment->company;
$analytics_id = $company->google_analytics_key;