diff --git a/app/Extensions/PaymentGateways/PayPal/index.php b/app/Extensions/PaymentGateways/PayPal/index.php index 3cee4748..56314c66 100644 --- a/app/Extensions/PaymentGateways/PayPal/index.php +++ b/app/Extensions/PaymentGateways/PayPal/index.php @@ -176,7 +176,7 @@ function getPaypalClientSecret() { return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") : config("SETTINGS::PAYMENTS:PAYPAL:SECRET"); } -function getConfig() +function getPayPalConfig() { return [ "name" => "PayPal", diff --git a/app/Helpers/ExtensionHelper.php b/app/Helpers/ExtensionHelper.php index d302f248..884b9f2f 100644 --- a/app/Helpers/ExtensionHelper.php +++ b/app/Helpers/ExtensionHelper.php @@ -16,11 +16,11 @@ class ExtensionHelper $config = include_once $extension; // Check if the getConfig function exists - if (!function_exists('getConfig')) { + if (!function_exists('get' . $extensionName . 'Config')) { return null; } - $config = call_user_func('getConfig'); + $config = call_user_func('get' . $extensionName . 'Config'); // Check if the getConfig function returned an array if (!is_array($config)) { @@ -44,4 +44,4 @@ class ExtensionHelper return $config['payMethod']; } -} \ No newline at end of file +}