From 25f3b49d729382bf08083ded466711e9d9a412af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 29 Jun 2021 12:25:52 +0200 Subject: [PATCH] Authorize.net: Checking if credit card is enabled --- app/PaymentDrivers/AuthorizePaymentDriver.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/AuthorizePaymentDriver.php b/app/PaymentDrivers/AuthorizePaymentDriver.php index c0a4e1fbf1..bb79b5ddc3 100644 --- a/app/PaymentDrivers/AuthorizePaymentDriver.php +++ b/app/PaymentDrivers/AuthorizePaymentDriver.php @@ -56,9 +56,11 @@ class AuthorizePaymentDriver extends BaseDriver */ public function gatewayTypes() :array { - $types = [ - GatewayType::CREDIT_CARD, - ]; + $types = []; + + if($this->company_gateway->fees_and_limits->{GatewayType::CREDIT_CARD}->is_enabled) { + $types[] = GatewayType::CREDIT_CARD; + } return $types; }