[freeside-commits] branch FREESIDE_4_BRANCH updated. 2ba25f8bd8dedf4ec194727b9669508946032aba

Ivan ivan at 420.am
Fri Aug 25 10:40:33 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  2ba25f8bd8dedf4ec194727b9669508946032aba (commit)
      from  fd1fe8f72b25a60966f9a2a05943d312c7240df4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2ba25f8bd8dedf4ec194727b9669508946032aba
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Aug 25 10:40:30 2017 -0700

    fix 4.x cust_payby vs legacy customer import, RT#77221

diff --git a/FS/FS/cust_main/Import.pm b/FS/FS/cust_main/Import.pm
index 0734c0e..9624529 100644
--- a/FS/FS/cust_main/Import.pm
+++ b/FS/FS/cust_main/Import.pm
@@ -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'},
         };
 
       }

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_main/Import.pm |    7 +++++++
 1 file changed, 7 insertions(+)




More information about the freeside-commits mailing list