1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Update customer for stripe

This commit is contained in:
David Bomba 2022-08-04 13:23:49 +10:00
parent 12febeadfe
commit adcdd69177

View File

@ -53,13 +53,14 @@ class UpdateCustomer implements ShouldQueue
public function handle() public function handle()
{ {
if($this->company->id !== config('ninja.ninja_default_company_id'))
return;
MultiDB::findAndSetDbByCompanyKey($this->company_key); MultiDB::findAndSetDbByCompanyKey($this->company_key);
$company = Company::where('company_key', $this->company_key)->first(); $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); $company_gateway = CompanyGateway::find($this->company_gateway_id);
$stripe = $company_gateway->driver()->init(); $stripe = $company_gateway->driver()->init();