1 package FS::pay_batch::chase_canada;
4 use vars qw(@ISA %import_info %export_info $name);
5 use Time::Local 'timelocal';
11 $name = 'csv-chase_canada-E-xactBatch';
36 $hash->{'paid'} = sprintf("%.2f", $hash->{'paid'} );
37 $hash->{'_date'} = time;
38 $hash->{'payinfo'} = $cpb->{'payinfo'}
39 if( substr($hash->{'payinfo'}, -4) eq substr($cpb->{'payinfo'}, -4) );
43 $hash->{'etgcode'} eq '00' && $hash->{'result'} eq 'Approved';
47 $hash->{'etgcode'} ne '00' || $hash->{'result'} eq 'Declined';
54 ($origid) = $conf->config("batchconfig-$name");
57 my $pay_batch = shift;
58 sprintf( '$$E-xactBatchFileV1.0$$%s:%03u$$%s',
59 sdate($pay_batch->download),
64 my ($cust_pay_batch, $pay_batch) = @_;
65 my $payname = $cust_pay_batch->payname;
69 $cust_pay_batch->paybatchnum,
70 $cust_pay_batch->custnum,
71 $cust_pay_batch->invnum,
74 $cust_pay_batch->payinfo,
75 $cust_pay_batch->amount,
76 $cust_pay_batch->expmmyy,
85 my (@date) = localtime(shift);
86 sprintf('%02d/%02d/%02d', $date[5] % 100, $date[4] + 1, $date[3]);