forked from LiveCarta/PayPal-PHP-SDK
Authorization Cache to use both boolean and string in configuration
- both true and 'true' will enable authorization cache
This commit is contained in:
@@ -85,7 +85,7 @@ abstract class AuthorizationCache
|
||||
$config = ($config && is_array($config)) ? $config : PayPalConfigManager::getInstance()->getConfigHashmap();
|
||||
if (array_key_exists("cache.enabled", $config)) {
|
||||
$value = $config['cache.enabled'];
|
||||
return (trim($value) == 'true') ? true : false;
|
||||
return (trim($value) == true || trim($value) == 'true') ? true : false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ function getApiContext($clientId, $clientSecret)
|
||||
'log.FileName' => '../PayPal.log',
|
||||
'log.LogLevel' => 'FINE',
|
||||
'validation.level' => 'log',
|
||||
'cache.enabled' => 'true',
|
||||
'cache.enabled' => true,
|
||||
// 'http.headers.PayPal-Partner-Attribution-Id' => '123123123'
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user