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();