Skip to content

Commit

Permalink
added condition for gateway starts
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBeycan committed Mar 16, 2024
1 parent ef22410 commit 7d099a1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 7d099a1

Please sign in to comment.