From 2079b3e4ba9787b4cfc7c45e0a433a218816db84 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 16 May 2021 17:06:04 +1000 Subject: [PATCH] Fixes for custom payment methods - and their fees and limits object --- app/Services/Client/PaymentMethod.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/Client/PaymentMethod.php b/app/Services/Client/PaymentMethod.php index 930369787f..2c2a6f899f 100644 --- a/app/Services/Client/PaymentMethod.php +++ b/app/Services/Client/PaymentMethod.php @@ -165,10 +165,10 @@ class PaymentMethod foreach ($gateway->driver($this->client)->gatewayTypes() as $type) { - if (isset($gateway->fees_and_limits) && is_object($gateway->fees_and_limits) && property_exists($gateway->fees_and_limits, $type)) { + if (isset($gateway->fees_and_limits) && is_object($gateway->fees_and_limits) && property_exists($gateway->fees_and_limits, GatewayType::CREDIT_CARD)) { if ($this->validGatewayForAmount($gateway->fees_and_limits->{GatewayType::CREDIT_CARD}, $this->amount)) - $this->payment_methods[] = [$gateway->id => $type]; + $this->payment_methods[] = [$gateway->id => GatewayType::CREDIT_CARD]; } else { $this->payment_methods[] = [$gateway->id => NULL];