function uc_authorizenet_requirements in Ubercart 6.2
Same name and namespace in other branches
- 7.3 payment/uc_authorizenet/uc_authorizenet.install \uc_authorizenet_requirements()
Implements hook_requirements().
File
- payment/
uc_authorizenet/ uc_authorizenet.install, line 11 - Handles installing, uninstalling, and updating Authorize.net settings.
Code
function uc_authorizenet_requirements($phase) {
$t = get_t();
$has_curl = function_exists('curl_init');
$requirements['uc_authorizenet_curl'] = array(
'title' => $t('cURL'),
'value' => $has_curl ? $t('Enabled') : $t('Not found'),
);
if (!$has_curl) {
$requirements['uc_authorizenet_curl']['severity'] = REQUIREMENT_ERROR;
$requirements['uc_authorizenet_curl']['description'] = $t("Authorize.net requires the PHP <a href='!curl_url'>cURL</a> library.", array(
'!curl_url' => 'http://php.net/manual/en/curl.setup.php',
));
}
return $requirements;
}