diff options
author | Mark Wells <mark@freeside.biz> | 2013-06-21 13:35:52 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-06-21 13:35:52 -0700 |
commit | 9cccdd3ae700bd7221799ac42e241979d656f5e5 (patch) | |
tree | 67a6529fbe56d1b68015a25f17c998694d8b6dbc /FS/bin | |
parent | 81451a5988a5985a26101e2bb469679888c53e8f (diff) |
clarify correct use of batchconfig-eft_canada, #16252
Diffstat (limited to 'FS/bin')
-rwxr-xr-x | FS/bin/freeside-eftca-download | 9 |
1 files changed, 6 insertions, 3 deletions
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"; |