diff --git a/app/Loader.php b/app/Loader.php index 1d4e14d..ca0736b 100644 --- a/app/Loader.php +++ b/app/Loader.php @@ -123,9 +123,14 @@ private function getSPPToken(string $url): ?string */ public function registerGateways(array $methods): array { - return array_merge($methods, [ - Gateways\GatewayPro::get_instance(), - Gateways\GatewayLite::get_instance() - ]); + if (Helpers::exists()) { + $methods[] = Gateways\GatewayPro::get_instance(); + } + + if (Helpers::liteExists()) { + $methods[] = Gateways\GatewayLite::get_instance(); + } + + return $methods; } }