fix: 🐛 Give Config Method the extension name
This commit is contained in:
parent
45aaac4189
commit
eb122a99f2
|
@ -176,7 +176,7 @@ function getPaypalClientSecret()
|
||||||
{
|
{
|
||||||
return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") : config("SETTINGS::PAYMENTS:PAYPAL:SECRET");
|
return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") : config("SETTINGS::PAYMENTS:PAYPAL:SECRET");
|
||||||
}
|
}
|
||||||
function getConfig()
|
function getPayPalConfig()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"name" => "PayPal",
|
"name" => "PayPal",
|
||||||
|
|
|
@ -16,11 +16,11 @@ class ExtensionHelper
|
||||||
$config = include_once $extension;
|
$config = include_once $extension;
|
||||||
|
|
||||||
// Check if the getConfig function exists
|
// Check if the getConfig function exists
|
||||||
if (!function_exists('getConfig')) {
|
if (!function_exists('get' . $extensionName . 'Config')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = call_user_func('getConfig');
|
$config = call_user_func('get' . $extensionName . 'Config');
|
||||||
|
|
||||||
// Check if the getConfig function returned an array
|
// Check if the getConfig function returned an array
|
||||||
if (!is_array($config)) {
|
if (!is_array($config)) {
|
||||||
|
|
Loading…
Reference in a new issue