From adcdd6917745f3b3708060d19b080b321e684dbd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 4 Aug 2022 13:23:49 +1000 Subject: [PATCH] Update customer for stripe --- app/PaymentDrivers/Stripe/Jobs/UpdateCustomer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/PaymentDrivers/Stripe/Jobs/UpdateCustomer.php b/app/PaymentDrivers/Stripe/Jobs/UpdateCustomer.php index 46c8646f56..47f349283d 100644 --- a/app/PaymentDrivers/Stripe/Jobs/UpdateCustomer.php +++ b/app/PaymentDrivers/Stripe/Jobs/UpdateCustomer.php @@ -53,13 +53,14 @@ class UpdateCustomer implements ShouldQueue public function handle() { - if($this->company->id !== config('ninja.ninja_default_company_id')) - return; MultiDB::findAndSetDbByCompanyKey($this->company_key); $company = Company::where('company_key', $this->company_key)->first(); + if($company->id !== config('ninja.ninja_default_company_id')) + return; + $company_gateway = CompanyGateway::find($this->company_gateway_id); $stripe = $company_gateway->driver()->init();