From fb4a4ac126cbbf0bc79e6afe7cabf111658ed230 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 28 Mar 2023 07:36:22 +1100 Subject: [PATCH] Update payment notifications --- app/Listeners/Payment/PaymentNotification.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/Listeners/Payment/PaymentNotification.php b/app/Listeners/Payment/PaymentNotification.php index 5f581f88b3f8..b1b7c82eef12 100644 --- a/app/Listeners/Payment/PaymentNotification.php +++ b/app/Listeners/Payment/PaymentNotification.php @@ -39,7 +39,6 @@ class PaymentNotification implements ShouldQueue * Handle the event. * * @param object $event - * @return bool */ public function handle($event) { @@ -51,6 +50,15 @@ class PaymentNotification implements ShouldQueue $payment = $event->payment; + + /*Google Analytics Track Revenue*/ + if (isset($payment->company->google_analytics_key)) { + $this->trackRevenue($event); + } + + if($payment->is_manual) + return; + /*User notifications*/ foreach ($payment->company->company_users as $company_user) { $user = $company_user->user; @@ -80,10 +88,6 @@ class PaymentNotification implements ShouldQueue } } - /*Google Analytics Track Revenue*/ - if (isset($payment->company->google_analytics_key)) { - $this->trackRevenue($event); - } } private function trackRevenue($event)