=== modified file 'payment/uc_authorizenet/uc_authorizenet.install'
--- payment/uc_authorizenet/uc_authorizenet.install	2008-11-17 14:27:58 +0000
+++ payment/uc_authorizenet/uc_authorizenet.install	2008-12-05 05:07:23 +0000
@@ -6,6 +6,26 @@
  * Handles installing, uninstalling, and updating Authorize.net settings.
  */
 
+/**
+ * Implementation of hook_requirements().
+ */
+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;
+}
+
 function uc_authorizenet_uninstall() {
   // Delete related variables all at once.
   db_query("DELETE FROM {variable} WHERE name LIKE 'uc_authnet_%%'");

=== modified file 'payment/uc_authorizenet/uc_authorizenet.module'
--- payment/uc_authorizenet/uc_authorizenet.module	2008-11-07 19:57:31 +0000
+++ payment/uc_authorizenet/uc_authorizenet.module	2008-12-21 04:17:44 +0000
@@ -90,12 +90,6 @@
  * Callback for payment gateway settings.
  */
 function uc_authorizenet_settings_form() {
-  if (!function_exists('curl_init')) {
-    $form['curl_warning'] = array(
-      '#value' => '<div>'. t('The Authorize.net AIM service requires cURL.  Please talk to your system administrator to get this configured.') .'</div>',
-    );
-  }
-
   $login_data = _uc_authorizenet_login_data();
 
   $form['api_id_key'] = array(
@@ -200,11 +194,6 @@
 function uc_authorizenet_charge($order_id, $amount, $data) {
   global $user;
 
-  // Check for cURL support.
-  if (!_uc_authorizenet_curl_check()) {
-    return array('success' => FALSE);
-  }
-
   // Load the order.
   $order = uc_order_load($order_id);
 
@@ -436,11 +425,6 @@
  *   TRUE or FALSE indicating the success of the API request.
  */
 function uc_authorizenet_xml_api($server, $xml) {
-  // Check for cURL support.
-  if (!_uc_authorizenet_curl_check()) {
-    return FALSE;
-  }
-
   if ($server == 'production') {
     $post_url = 'https://api.authorize.net/xml/v1/request.api';
   }
@@ -863,17 +847,6 @@
   }
 }
 
-// Checks to see if cURL is enabled on the server.
-function _uc_authorizenet_curl_check() {
-  // Check to see if a known cURL function exists.
-  if (!function_exists('curl_init')) {
-    drupal_set_message(t('The Authorize.Net module requires cURL.  Please talk to your system administrator to get this configured.'));
-    return FALSE;
-  }
-
-  return TRUE;
-}
-
 // Parse an Authorize.Net XML API response; from sample PHP for ARB.
 function _uc_authorizenet_arb_parse_response($content) {
   // Find the elements in the XML and build the return array.

=== modified file 'payment/uc_cybersource/uc_cybersource.install'
--- payment/uc_cybersource/uc_cybersource.install	2008-11-17 14:27:58 +0000
+++ payment/uc_cybersource/uc_cybersource.install	2008-12-05 05:08:01 +0000
@@ -6,6 +6,44 @@
  * Handles installing, uninstalling, and updating CyberSource settings.
  */
 
+/**
+ * Implementation of hook_requirements().
+ */
+function uc_cybersource_requirements($phase) {
+  $t = get_t();
+  
+  $has_curl = function_exists('curl_init');
+  $has_dom = class_exists('DOMDocument');
+  $has_soap = class_exists('SoapClient');
+  $method = variable_get('uc_cybersource_method', 'post');
+  
+  // Using SOAP.
+  if ($method == 'soap') {
+    $requirements['uc_cybersource_soap_and_dom'] = array(
+      'title' => $t('SOAP and DOM'),
+      'value' => $has_soap && $has_dom ? $t('Enabled') : $t('Not found'),
+    );
+    if (!$has_soap || !$has_dom) {
+      $requirements['uc_cybersource_soap_and_dom']['severity'] = REQUIREMENT_ERROR;
+      $requirements['uc_cybersource_soap_and_dom']['description'] = $t("Cybersource's SOAP Toolkit API requires the PHP <a href='!soap_url'>SOAP</a> and <a href='!dom_url'>DOM</a> libraries.", array('!soap_url' => 'http://php.net/manual/en/soap.setup.php', '!dom_url' => 'http://php.net/manual/en/dom.setup.php'));
+    }
+  }
+  
+  // Using POST with cURL.
+  elseif ($method == 'post') {
+    $requirements['uc_cybersource_curl'] = array(
+      'title' => $t('cURL'),
+      'value' => $has_curl ? $t('Enabled') : $t('Not found'),
+    );
+    if (!$has_curl) {
+      $requirements['uc_cybersource_curl']['severity'] = REQUIREMENT_ERROR;
+      $requirements['uc_cybersource_curl']['description'] = $t("Cybersource's Silent Order POST requires the PHP <a href='!curl_url'>cURL</a> library.", array('!curl_url' => 'http://php.net/manual/en/curl.setup.php'));
+    }
+  }
+  
+  return $requirements;
+}
+
 function uc_cybersource_uninstall() {
   // Delete related variables all at once.
   db_query("DELETE FROM {variable} WHERE name LIKE 'uc_cybersource_%%' OR name LIKE 'cs_ship_from_%%'");

=== modified file 'payment/uc_cybersource/uc_cybersource.module'
--- payment/uc_cybersource/uc_cybersource.module	2008-12-17 22:37:57 +0000
+++ payment/uc_cybersource/uc_cybersource.module	2008-12-21 04:24:18 +0000
@@ -289,12 +289,6 @@
 }
 
 function _uc_cybersource_post_charge($order, $amount, $data, $cc_type, $country) {
-  // Check for cURL support.
-  if (!function_exists('curl_init')) {
-    drupal_set_message(t('Cybersource requires cURL.  Please talk to your system administrator to get this configured.'));
-    return array('success' => FALSE);
-  }
-
   // Include the HOP.php per the module instructions.
   $hop = drupal_get_path('module', 'uc_cybersource') .'/HOP.php';
   if (!file_exists($hop)) {
@@ -417,12 +411,6 @@
 
 // Handles the SOAP charge request and Ubercart order save.
 function _uc_cybersource_soap_charge($order, $amount, $data, $cc_type, $country) {
-  // Check for compatibility.
-  if (!class_exists('SoapClient') || !class_exists('DOMDocument')) {
-    drupal_set_message(t('CyberSource needs PHP to have the SOAP and DOM extensions enabled.  Please talk to your system administrator to get this configured.'));
-    return array('success' => FALSE);
-  }
-
   // Include the SOAP helper file.
   require_once(drupal_get_path('module', 'uc_cybersource') .'/uc_cybersource.soap.inc');
   global $user;
@@ -715,12 +703,6 @@
     return array();
   }
 
-  // Check for compatibility.
-  if (!class_exists('SoapClient') || !class_exists('DOMDocument')) {
-    drupal_set_message(t('CyberSource needs PHP to have the SOAP and DOM extensions enabled.  Please talk to your system administrator to get this configured.'));
-    return array();
-  }
-
   if (!is_object($order)) {
     return array();
   }

=== modified file 'payment/uc_google_checkout/uc_google_checkout.install'
--- payment/uc_google_checkout/uc_google_checkout.install	2008-11-26 21:39:30 +0000
+++ payment/uc_google_checkout/uc_google_checkout.install	2008-12-05 05:08:14 +0000
@@ -6,6 +6,25 @@
  * Install file for the Ubercart Google Checkout module.
  */
 
+/**
+ * Implementation of hook_requirements().
+ */
+function uc_google_checkout_requirements($phase) {
+  $t = get_t();
+  
+  $has_simplexml = class_exists('SimpleXMLElement');
+  $requirements['uc_gc_simplexml'] = array(
+    'title' => $t('SimpleXML'),
+    'value' => $has_simplexml ? $t('Enabled') : $t('Not found'),
+  );
+  if (!$has_simplexml) {
+    $requirements['uc_gc_simplexml']['severity'] = REQUIREMENT_ERROR;
+    $requirements['uc_gc_simplexml']['description'] = $t('Google Checkout requires the PHP <a href="!simplexml_url">SimpleXML</a> library.', array('!simplexml_url' => 'http://php.net/manual/en/simplexml.setup.php'));
+  }
+  
+  return $requirements;
+}
+
 function uc_google_checkout_schema() {
   $schema = array();
 

=== modified file 'payment/uc_paypal/uc_paypal.install'
--- payment/uc_paypal/uc_paypal.install	2008-11-05 17:42:29 +0000
+++ payment/uc_paypal/uc_paypal.install	2008-12-05 05:08:19 +0000
@@ -6,6 +6,29 @@
  * Installation file for PayPal, primarily for the logging of IPNs.
 
 /**
+ * Implementation of hook_requirements().
+ */
+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;
+}
+
+/**
  * Implementation of hook_schema().
  */
 function uc_paypal_schema() {

=== modified file 'payment/uc_paypal/uc_paypal.module'
--- payment/uc_paypal/uc_paypal.module	2008-12-17 22:37:57 +0000
+++ payment/uc_paypal/uc_paypal.module	2008-12-21 04:24:18 +0000
@@ -277,11 +277,6 @@
 function uc_paypal_wpp_charge($order_id, $amount, $data) {
   global $user;
 
-  if (!function_exists('curl_init')) {
-    drupal_set_message(t('PayPal Website Payments Pro requires curl for PHP.  Please talk to your system administrator to get this.'));
-    return array('success' => FALSE);
-  }
-
   $order = uc_order_load($order_id);
 
   list($desc, $subtotal) = _uc_paypal_product_details($order->products);
@@ -637,11 +632,6 @@
     return;
   }
 
-  if (!function_exists('curl_init')) {
-    drupal_set_message(t('PayPal Express Checkout requires curl for PHP.  Please talk to your system administrator to get this.'));
-    return;
-  }
-
   // Hack to allow the image button to submit.
   if (isset($_POST['submit_x'])) {
     $form['submit'] = array(

=== modified file 'shipping/uc_ups/uc_ups.install'
--- shipping/uc_ups/uc_ups.install	2008-11-07 20:19:07 +0000
+++ shipping/uc_ups/uc_ups.install	2008-12-05 05:08:30 +0000
@@ -6,6 +6,25 @@
  * Install hooks for uc_ups.module.
  */
 
+/**
+ * Implementation of hook_requirements().
+ */
+function uc_ups_requirements($phase) {
+  $t = get_t();
+  
+  $has_simplexml = class_exists('SimpleXMLElement');
+  $requirements['uc_ups_simplexml'] = array(
+    'title' => $t('SimpleXML'),
+    'value' => $has_simplexml ? $t('Enabled') : $t('Not found'),
+  );
+  if (!$has_simplexml) {
+    $requirements['uc_ups_simplexml']['severity'] = REQUIREMENT_ERROR;
+    $requirements['uc_ups_simplexml']['description'] = $t('UPS requires the PHP <a href="!simplexml_url">SimpleXML</a> library.', array('!simplexml_url' => 'http://php.net/manual/en/simplexml.setup.php'));
+  }
+  
+  return $requirements;
+}
+
 function uc_ups_schema() {
   $schema = array();
 

=== modified file 'shipping/uc_usps/uc_usps.install'
--- shipping/uc_usps/uc_usps.install	2008-12-03 19:11:21 +0000
+++ shipping/uc_usps/uc_usps.install	2008-12-21 04:24:18 +0000
@@ -6,6 +6,25 @@
  * Install hooks for uc_usps.module.
  */
 
+/**
+ * Implementation of hook_requirements().
+ */
+function uc_usps_requirements($phase) {
+  $t = get_t();
+  
+  $has_simplexml = class_exists('SimpleXMLElement');
+  $requirements['uc_usps_simplexml'] = array(
+    'title' => $t('SimpleXML'),
+    'value' => $has_simplexml ? $t('Enabled') : $t('Not found'),
+  );
+  if (!$has_simplexml) {
+    $requirements['uc_usps_simplexml']['severity'] = REQUIREMENT_ERROR;
+    $requirements['uc_usps_simplexml']['description'] = $t('USPS requires the PHP <a href="!simplexml_url">SimpleXML</a> library.', array('!simplexml_url' => 'http://php.net/manual/en/simplexml.setup.php'));
+  }
+  
+  return $requirements;
+}
+
 function uc_usps_schema() {
   $schema = array();
 

