RT# 80898 - added config option to allow for the changing of the name for credit...
[freeside.git] / FS / FS / cust_main / Import.pm
index 0734c0e..9624529 100644 (file)
@@ -410,6 +410,8 @@ sub batch_import {
 
       if ( $cust_main{'payinfo'} =~ /^\s*(\d+\@[\d\.]+)\s*$/ ) {
 
+        delete $cust_main{'payinfo'};
+
         $cust_payby = new FS::cust_payby {
           'payby'   => 'CHEK',
           'payinfo' => $1,
@@ -417,9 +419,14 @@ sub batch_import {
 
       } elsif ($cust_main{'payinfo'} =~ /^\s*([AD]?)(.*)\s*$/) {
 
+        delete $cust_main{'payinfo'};
+
         $cust_payby = new FS::cust_payby {
           'payby'   => ($1 eq 'D') ? 'DCRD' : 'CARD',
           'payinfo' => $2,
+          'paycvv'  => delete $cust_main{'paycvv'},
+          'paydate' => delete $cust_main{'paydate'},
+          'payname' => $cust_main{'first'}. ' '. $cust_main{'last'},
         };
 
       }