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();
|
$config = ($config && is_array($config)) ? $config : PayPalConfigManager::getInstance()->getConfigHashmap();
|
||||||
if (array_key_exists("cache.enabled", $config)) {
|
if (array_key_exists("cache.enabled", $config)) {
|
||||||
$value = $config['cache.enabled'];
|
$value = $config['cache.enabled'];
|
||||||
return (trim($value) == 'true') ? true : false;
|
return (trim($value) == true || trim($value) == 'true') ? true : false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ function getApiContext($clientId, $clientSecret)
|
|||||||
'log.FileName' => '../PayPal.log',
|
'log.FileName' => '../PayPal.log',
|
||||||
'log.LogLevel' => 'FINE',
|
'log.LogLevel' => 'FINE',
|
||||||
'validation.level' => 'log',
|
'validation.level' => 'log',
|
||||||
'cache.enabled' => 'true',
|
'cache.enabled' => true,
|
||||||
// 'http.headers.PayPal-Partner-Attribution-Id' => '123123123'
|
// 'http.headers.PayPal-Partner-Attribution-Id' => '123123123'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user