realtime_bop: don't pass an empty invoice_number to B:OP, omit the field entirely
authorivan <ivan>
Mon, 30 Oct 2006 12:39:16 +0000 (12:39 +0000)
committerivan <ivan>
Mon, 30 Oct 2006 12:39:16 +0000 (12:39 +0000)
FS/FS/cust_main.pm

index febeb13..e7d9272 100644 (file)
@@ -2518,6 +2518,9 @@ sub realtime_bop {
   $content{customer_ip} = $payip
     if length($payip);
 
+  $content{invoice_number} = $options{'invnum'}
+    if exists($options{'payip'}) && length($options{'invnum'});
+
   if ( $method eq 'CC' ) { 
 
     $content{card_number} = $payinfo;
@@ -2583,7 +2586,7 @@ sub realtime_bop {
     'action'         => $action1,
     'description'    => $options{'description'},
     'amount'         => $amount,
-    'invoice_number' => $options{'invnum'},
+    #'invoice_number' => $options{'invnum'},
     'customer_id'    => $self->custnum,
     'last_name'      => $paylast,
     'first_name'     => $payfirst,