{
'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,
},
my @agents;
if ( $conf->exists('batch-spoolagent') ) {
- @agents = qsearchs('agent', { 'disabled' => '' });
+ @agents = qsearch('agent', { 'disabled' => '' });
} else {
@agents = (1);
}
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";