move credit card transaction results out of paybatch and into real fields, #18548
[freeside.git] / httemplate / search / elements / cust_pay_or_refund.html
index b052491..eeef0c0 100755 (executable)
@@ -330,6 +330,16 @@ if ( $cgi->param('magic') ) {
       push @search, "$table.payinfo = '$1'";
     }
 
+    if ( $cgi->param('ccpay') =~ /^([\w-:]+)$/ ) {
+      # I think that's all the characters we need to allow.
+      # To avoid confusion, this parameter searches both auth and order_number.
+      push @search, "($table.auth LIKE '$1%') OR ($table.order_number LIKE '$1%')";
+      push @fields, 'auth', 'order_number';
+      push @header, 'Auth #', 'Transaction #';
+      $align .= 'rr';
+
+    }
+
     if ( $cgi->param('usernum') =~ /^(\d+)$/ ) {
       push @search, "$table.usernum = $1";
     }