function uc_paypal_requirements in Ubercart 6.2
Same name and namespace in other branches
- 7.3 payment/uc_paypal/uc_paypal.install \uc_paypal_requirements()
@file Installation file for PayPal, primarily for the logging of IPNs.
Implements hook_requirements().
File
- payment/
uc_paypal/ uc_paypal.install, line 10 - Installation file for PayPal, primarily for the logging of IPNs.
Code
function uc_paypal_requirements($phase) {
$t = get_t();
$has_curl = function_exists('curl_init');
// PayPal WPP requires cURL.
if (variable_get('uc_pg_paypal_wpp_enabled', TRUE)) {
$requirements['uc_paypal_curl'] = array(
'title' => $t('cURL'),
'value' => $has_curl ? $t('Enabled') : $t('Not found'),
);
if (!$has_curl) {
$requirements['uc_paypal_curl']['severity'] = REQUIREMENT_ERROR;
$requirements['uc_paypal_curl']['description'] = $t("PayPal WPP requires the PHP <a href='!curl_url'>cURL</a> library.", array(
'!curl_url' => 'http://php.net/manual/en/curl.setup.php',
));
}
}
return $requirements;
}