diff --git a/src/Traits/PayPalRequest.php b/src/Traits/PayPalRequest.php index 28950e07..b3b542b4 100644 --- a/src/Traits/PayPalRequest.php +++ b/src/Traits/PayPalRequest.php @@ -180,11 +180,8 @@ public function getRequestHeader(string $key): string */ private function setConfig(array $config): void { - if (empty($config) && function_exists('config') && !empty(config('paypal'))) { - $api_config = config('paypal'); - } else { - $api_config = $config; - } + $api_config = empty($config) && function_exists('config') && !empty(config('paypal')) ? + config('paypal') : $config; // Set Api Credentials $this->setApiCredentials($api_config);