[freeside-commits] branch FREESIDE_3_BRANCH updated. dfe1fd273b486e5884fedd9acae61ee976bc02fc

Mark Wells mark at 420.am
Fri Jun 21 13:35:58 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  dfe1fd273b486e5884fedd9acae61ee976bc02fc (commit)
      from  720fde0db717507820acb6f1367e0428c61f3598 (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 dfe1fd273b486e5884fedd9acae61ee976bc02fc
Author: Mark Wells <mark at freeside.biz>
Date:   Fri Jun 21 13:35:36 2013 -0700

    clarify correct use of batchconfig-eft_canada, #16252

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index a285639..282fb11 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -3693,7 +3693,7 @@ and customer address. Include units.',
   {
     'key'         => 'batchconfig-eft_canada',
     'section'     => 'billing',
-    'description' => 'Configuration for EFT Canada batching, four lines: 1. SFTP username, 2. SFTP password, 3. Transaction code, 4. Number of days to delay process date.',
+    'description' => 'Configuration for EFT Canada batching, four lines: 1. SFTP username, 2. SFTP password, 3. Transaction code, 4. Number of days to delay process date.  If you are using separate per-agent batches (batch-spoolagent), you must set this option separately for each agent, as the global setting will be ignored.',
     'type'        => 'textarea',
     'per_agent'   => 1,
   },
diff --git a/FS/bin/freeside-eftca-download b/FS/bin/freeside-eftca-download
index d54a724..1b7653c 100755
--- a/FS/bin/freeside-eftca-download
+++ b/FS/bin/freeside-eftca-download
@@ -52,7 +52,7 @@ my $conf = new FS::Conf;
 
 my @agents;
 if ( $conf->exists('batch-spoolagent') ) {
-  @agents = qsearchs('agent', { 'disabled' => '' });
+  @agents = qsearch('agent', { 'disabled' => '' });
 } else {
   @agents = (1);
 }
@@ -62,11 +62,14 @@ foreach my $agent (@agents) {
   my @batchconf;
   if ( $conf->exists('batch-spoolagent') ) {
     @batchconf = $conf->config('batchconfig-eft_canada', $agent->agentnum, 1);
-    next unless $batchconf[0];
+    if ( !length($batchconf[0]) ) {
+      warn "agent '".$agent->agent."' has no batchconfig-eft_canada setting; skipped.\n";
+      next;
+    }
   } else {
     @batchconf = $conf->config('batchconfig-eft_canada');
   }
-  # BIN, terminalID, merchantID, username, password
+  # user, password, transaction code, delay days
   my $user = $batchconf[0] or die "no EFT Canada batch username configured\n";
   my $pass = $batchconf[1] or die "no EFT Canada batch password configured\n";
 

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

Summary of changes:
 FS/FS/Conf.pm                  |    2 +-
 FS/bin/freeside-eftca-download |    9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list