$i++;
# The 1464 byte format supports up to 5 payments per line,
# but we're only going to send 1.
+
+ ## set to D for debit by default, then override to what cust_pay_batch has as payments may not have paycode.
+ my $debitorcredit = 'D';
+ $debitorcredit = $cust_pay_batch->paycode unless !$cust_pay_batch->paycode;
+
my $control = join('',
- 'D', # for 'debit'
+ $debitorcredit, # D for 'debit' or C for Credit
sprintf("%09u", $i), #record number
$opt{'origid'},
$opt{'fcn'},
},
);
+sub _upgrade_gateway {
+ my $conf = FS::Conf->new;
+ my @batchconfig = $conf->config('batchconfig-td_eft1464');
+ my %options;
+ @options{ qw(originator datacentre short_name long_name return_branch
+ return_account cpa_code) } = @batchconfig;
+ ( 'TD_EFT', %options );
+}
+
1;