[freeside-commits] branch FREESIDE_4_BRANCH updated. 19e69d1b833894aa23a1143398b0b334151f8ba2

Ivan ivan at 420.am
Tue Jan 26 10:46:58 PST 2016


The branch, FREESIDE_4_BRANCH has been updated
       via  19e69d1b833894aa23a1143398b0b334151f8ba2 (commit)
      from  9e6e0864d74ecd372e4d3b30c9829dcf083980f5 (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 19e69d1b833894aa23a1143398b0b334151f8ba2
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Jan 26 10:46:57 2016 -0800

    import customers with echeck payment info, RT#39863

diff --git a/FS/FS/cust_main/Import.pm b/FS/FS/cust_main/Import.pm
index a243b27..b5fb274 100644
--- a/FS/FS/cust_main/Import.pm
+++ b/FS/FS/cust_main/Import.pm
@@ -400,11 +400,23 @@ sub batch_import {
     }
 
     if ( defined $cust_main{'payinfo'} && length $cust_main{'payinfo'} ) {
-      $cust_main{'payby'} = 'CARD';
-      if ($cust_main{'payinfo'} =~ /\s*([AD]?)(.*)\s*$/) {
-        $cust_main{'payby'} = 'DCRD' if $1 eq 'D';
-        $cust_main{'payinfo'} = $2;
+
+      if ( $cust_main{'payinfo'} =~ /^\s*(\d+\@[\d\.]+)\s*$/ ) {
+
+        $cust_main{'payby'}   = 'CHEK';
+        $cust_main{'payinfo'} = $1;
+
+      } else {
+
+        $cust_main{'payby'} = 'CARD';
+
+        if ($cust_main{'payinfo'} =~ /^\s*([AD]?)(.*)\s*$/) {
+          $cust_main{'payby'} = 'DCRD' if $1 eq 'D';
+          $cust_main{'payinfo'} = $2;
+        }
+
       }
+
     }
 
     $cust_main{$_} = parse_datetime($cust_main{$_})

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

Summary of changes:
 FS/FS/cust_main/Import.pm |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list