summaryrefslogtreecommitdiff
path: root/FS/FS/pay_batch.pm
diff options
context:
space:
mode:
authorjeff <jeff>2007-03-21 04:01:52 +0000
committerjeff <jeff>2007-03-21 04:01:52 +0000
commitfa81e2694906ade89f6b7260c621cd86f10cdba0 (patch)
tree791588e5290d964ee029a07cd20a307caf10fa76 /FS/FS/pay_batch.pm
parent8591b5a157a2ee24c1467718eb0ce731a388f5c1 (diff)
ticket 1436, ACH export format, return processing and autopost
Diffstat (limited to 'FS/FS/pay_batch.pm')
-rw-r--r--FS/FS/pay_batch.pm36
1 files changed, 35 insertions, 1 deletions
diff --git a/FS/FS/pay_batch.pm b/FS/FS/pay_batch.pm
index add4da9e0..5a06ba603 100644
--- a/FS/FS/pay_batch.pm
+++ b/FS/FS/pay_batch.pm
@@ -146,7 +146,7 @@ Options are:
I<filehandle> - open filehandle of results file.
-I<format> - "csv-td_canada_trust-merchant_pc_batch", "csv-chase_canada-E-xactBatch" or "PAP"
+I<format> - "csv-td_canada_trust-merchant_pc_batch", "csv-chase_canada-E-xactBatch", "ach-spiritone", or "PAP"
=cut
@@ -334,6 +334,40 @@ sub import_results {
0;
};
+ }elsif ( $format eq 'ach-spiritone' ) {
+
+ $filetype = "CSV";
+
+ @fields = (
+ '', # Name
+ 'paybatchnum', # ID: Invoice number of the transaction
+ 'aba', # ABA Number for the transaction
+ 'payinfo', # Bank Account Number for the transaction
+ '', # Transaction Type: 27 - debit
+ 'paid', # Amount: Amount of the transaction. Dollars and cents
+ # with decimal entered.
+ '', # Default Transaction Type
+ '', # Default Amount: Dollars and cents with decimal entered.
+ );
+
+ $end_condition = sub {
+ '';
+ };
+
+ $hook = sub {
+ my $hash = shift;
+ $hash->{'_date'} = time; # got a better one?
+ $hash->{'payinfo'} = $hash->{'payinfo'} . '@' . $hash->{'aba'};
+ };
+
+ $approved_condition = sub {
+ 1;
+ };
+
+ $declined_condition = sub {
+ 0;
+ };
+
} else {
return "Unknown format $format";