Skip to content

Commit

Permalink
Refactor setCOnfig method.
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive committed Sep 12, 2023
1 parent 15a205c commit c3e2390
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Traits/PayPalRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c3e2390

Please sign in to comment.