Index: payment/uc_credit/uc_credit.module
===================================================================
--- payment/uc_credit/uc_credit.module	(revision 1640)
+++ payment/uc_credit/uc_credit.module	(working copy)
@@ -372,7 +372,7 @@
 
   $path = base_path() . drupal_get_path('module', 'uc_credit');
   $title = t('Credit card:');
-  $cc_types = array('visa', 'mastercard', 'discover', 'amex');
+  $cc_types = array('visa', 'mastercard', 'discover', 'amex', 'laser', 'maestro', 'switch', 'solo', 'diners');
   foreach ($cc_types as $type) {
     if (variable_get('uc_credit_'. $type, TRUE)) {
       $title .= ' <img src="'. $path .'/images/'. $type .'.gif" style="position: relative; top: 5px;" />';
@@ -818,6 +818,31 @@
         '#title' => t('American Express'),
         '#default_value' => variable_get('uc_credit_amex', TRUE),
       );
+      $form['cc_types']['uc_credit_laser'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Laser'),
+        '#default_value' => variable_get('uc_credit_laser', TRUE),
+      );
+      $form['cc_types']['uc_credit_maestro'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Maestro'),
+        '#default_value' => variable_get('uc_credit_maestro', TRUE),
+      );
+      $form['cc_types']['uc_credit_switch'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Switch'),
+        '#default_value' => variable_get('uc_credit_switch', TRUE),
+      );
+      $form['cc_types']['uc_credit_solo'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Solo'),
+        '#default_value' => variable_get('uc_credit_solo', TRUE),
+      );
+      $form['cc_types']['uc_credit_diners'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Diners'),
+        '#default_value' => variable_get('uc_credit_diners', TRUE),
+      );
 
       // Form elements that deal with credit card messages to customers.
       $form['cc_messages'] = array(
@@ -1263,6 +1288,9 @@
 
   // Fail validation if it's non-numeric or an incorrect length.
   if (!is_numeric($cvv) || (count($digits) > 0 && !in_array(strlen($cvv), $digits))) {
+    if (variable_get('uc_credit_laser', TRUE) || variable_get('uc_credit_maestro', TRUE) || variable_get('uc_credit_switch', TRUE) || variable_get('uc_credit_solo', TRUE) || variable_get('uc_credit_diners', TRUE)) {
+      return TRUE;
+    }
     return FALSE;
   }
 
@@ -1275,10 +1303,10 @@
  */
 function _valid_card_number($number) {
   $id = substr($number, 0, 1);
-  if (($id == 3 && !variable_get('uc_credit_amex', TRUE)) ||
+  if (($id == 3 && !variable_get('uc_credit_amex', TRUE) && !variable_get('uc_credit_diners', TRUE)) ||
       ($id == 4 && !variable_get('uc_credit_visa', TRUE)) ||
       ($id == 5 && !variable_get('uc_credit_mastercard', TRUE)) ||
-      ($id == 6 && !variable_get('uc_credit_discover', TRUE)) ||
+      ($id == 6 && !variable_get('uc_credit_discover', TRUE) && !variable_get('uc_credit_laser', TRUE)) && !variable_get('uc_credit_maestro', TRUE) && !variable_get('uc_credit_switch', TRUE) && !variable_get('uc_credit_solo', TRUE) ||
       !ctype_digit($number)) {
     return FALSE;
   }
