diff --git a/app/Models/GatewayType.php b/app/Models/GatewayType.php index 7e60467856ab..2cf245387bc2 100644 --- a/app/Models/GatewayType.php +++ b/app/Models/GatewayType.php @@ -22,16 +22,10 @@ class GatewayType extends StaticModel const BANK_TRANSFER = 2; const PAYPAL = 3; const CRYPTO = 4; - const DWOLLA = 5; - const CUSTOM1 = 6; - const ALIPAY = 7; - const SOFORT = 8; - const SEPA = 9; - const GOCARDLESS = 10; - const APPLE_PAY = 11; - const CUSTOM2 = 12; - const CUSTOM3 = 13; - const TOKEN = 'token'; + const CUSTOM = 5; + const ALIPAY = 6; + const SOFORT = 7; + const APPLE_PAY = 8; public function gateway() { diff --git a/app/PaymentDrivers/CheckoutComPaymentDriver.php b/app/PaymentDrivers/CheckoutComPaymentDriver.php index bf6b4aa42a30..4d854817df27 100644 --- a/app/PaymentDrivers/CheckoutComPaymentDriver.php +++ b/app/PaymentDrivers/CheckoutComPaymentDriver.php @@ -102,16 +102,11 @@ class CheckoutComPaymentDriver extends BaseDriver */ public function viewForType($gateway_type_id) { - + //currently only ever token or creditcard so no need for switches $this->payment_method = $gateway_type_id; - if ($gateway_type_id == GatewayType::CREDIT_CARD) { - return 'gateways.checkout.credit_card'; - } - - if ($gateway_type_id == GatewayType::TOKEN) { - return 'gateways.checkout.credit_card'; - } + return 'gateways.checkout.credit_card'; + } /** diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index 4d11d07b0295..9deed999d228 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -108,7 +108,6 @@ class StripePaymentDriver extends BaseDriver { $types = [ GatewayType::CREDIT_CARD, - //GatewayType::TOKEN, ]; if ($this->company_gateway->getSofortEnabled() && $this->invitation && $this->client() && isset($this->client()->country) && in_array($this->client()->country, ['AUT', 'BEL', 'DEU', 'ITA', 'NLD', 'ESP'])) { @@ -142,7 +141,6 @@ class StripePaymentDriver extends BaseDriver { switch ($gateway_type_id) { case GatewayType::CREDIT_CARD: - case GatewayType::TOKEN: return 'gateways.stripe.credit_card'; break; case GatewayType::SOFORT: