From 638c1ab751f2ba3124aad40b02eb2de2c3d1f013 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 28 Apr 2022 13:39:47 +1000 Subject: [PATCH] Cleanup --- app/Models/Client.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/app/Models/Client.php b/app/Models/Client.php index c92d598bf543..fd28df5e9c5c 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -431,29 +431,6 @@ class Client extends BaseModel implements HasLocalePreference */ public function getCreditCardGateway() :?CompanyGateway { - // $company_gateways = $this->getSetting('company_gateway_ids'); - - // /* It is very important to respect the order of the company_gateway_ids as they are ordered by priority*/ - // if (strlen($company_gateways) >= 1) { - // $transformed_ids = $this->transformKeys(explode(',', $company_gateways)); - // $gateways = $this->company - // ->company_gateways - // ->whereIn('id', $transformed_ids) - // ->sortby(function ($model) use ($transformed_ids) { - // return array_search($model->id, $transformed_ids); - // }); - // } else { - // $gateways = $this->company->company_gateways; - // } - - // foreach ($gateways as $gateway) { - // if (in_array(GatewayType::CREDIT_CARD, $gateway->driver($this)->gatewayTypeEnabled($gateway, GatewayType::CREDIT_CARD))) { - // return $gateway; - // } - // } - - // return null; - // $pms = $this->service()->getPaymentMethods(0); @@ -480,7 +457,6 @@ class Client extends BaseModel implements HasLocalePreference return null; - } //todo refactor this - it is only searching for existing tokens