When you use the credit card terminal (i.e. through the "Process card" link on an order's viewing page), optional fields such as "Issue number" and "Start date" do not appear, even if you have configured them as such. After some research I believe this is a result of the branching in theme_uc_payment_method_credit_form(). Since I'm not against head I've provided the changes I've made here -- anyone fancy rolling a patch / reviewing it?

Apologies if this is by design by the way, but I can't see a reason why it would be.

Changes to uc_credit.module, in theme_uc_payment_method_credit_form():

$output .= '<tr><td class="oet-label">'. t('Card Number:') .'</td><td>'
             . drupal_render($form['cc_number']) .'</td></tr>';
+    if (variable_get('uc_credit_start_enabled', FALSE)) {
+      $output .= '<tr><td class="oet-label">'. t('Start Date:') .'</td><td>'
+               . drupal_render($form['cc_start_month']) .' '. drupal_render($form['cc_start_year'])
+                .' '. t('(if present)') .'</td></tr>';
+    }
    $output .= '<tr><td class="oet-label">'. t('Expiration Date:') .'</td><td>'
$output .= '<tr><td class="oet-label">'. t('Expiration Date:') .'</td><td>'
             . drupal_render($form['cc_exp_month']) .' '
             . drupal_render($form['cc_exp_year']) .'</td></tr>';
+    if (variable_get('uc_credit_issue_enabled', FALSE)) {
+      $output .= '<tr><td class="oet-label">'. t('Issue Number:') .'</td><td>'
+               . drupal_render($form['cc_issue']) .' '. t('(if present)') .'</td></tr>';
+    }
    if (variable_get('uc_credit_cvv_enabled', TRUE)) {

Thanks,
lunaris

Comments

rszrama’s picture

Status: Needs review » Fixed
StatusFileSize
new1.28 KB

Committed to both branches, thanks. Patch attached.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.