diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2013-07-02 11:57:03 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2013-07-02 11:57:03 -0700 |
| commit | 3564f619654c5cbf22fc2acbe7eff0c08308e859 (patch) | |
| tree | ab2f7e2426d40fbab94ff6f5e35873c1e99f383b /FS/bin | |
| parent | fb4a7232c2d703e0a6b8743521b77ae292bb1df8 (diff) | |
| parent | 23db52e232596d87b97561f5f76f11668cbe33bd (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
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 d54a724ab..1b7653cb3 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"; |
