[freeside-commits] freeside/FS/FS/pay_batch td_canada_trust.pm, 1.1, 1.2 paymentech.pm, 1.7, 1.8 chase_canada.pm, 1.1, 1.2
Mark Wells
mark at wavetail.420.am
Thu Nov 11 19:21:33 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/pay_batch
In directory wavetail.420.am:/tmp/cvs-serv19093/pay_batch
Modified Files:
td_canada_trust.pm paymentech.pm chase_canada.pm
Log Message:
better support for batch-increment_expiration, RT#10453
Index: paymentech.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/pay_batch/paymentech.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- paymentech.pm 21 Sep 2010 05:54:24 -0000 1.7
+++ paymentech.pm 12 Nov 2010 03:21:31 -0000 1.8
@@ -107,7 +107,7 @@
terminalID => $terminalID,
($_->payby eq 'CARD') ? (
ccAccountNum => $_->payinfo,
- ccExp => time2str('%m%y', str2time($_->exp))
+ ccExp => $_->expmmyy,
) : (
ecpCheckRT => ($_->payinfo =~ /@(\d+)/),
ecpCheckDDA => ($_->payinfo =~ /(\d+)@/),
Index: chase_canada.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/pay_batch/chase_canada.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- chase_canada.pm 25 Sep 2009 02:30:20 -0000 1.1
+++ chase_canada.pm 12 Nov 2010 03:21:31 -0000 1.2
@@ -73,7 +73,7 @@
'00',
$cust_pay_batch->payinfo,
$cust_pay_batch->amount,
- expdate($cust_pay_batch->exp),
+ $cust_pay_batch->expmmyy,
'',
''
);
@@ -86,19 +86,4 @@
sprintf('%02d/%02d/%02d', $date[5] % 100, $date[4] + 1, $date[3]);
}
-sub expdate {
- my $exp = shift;
- $exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
- my ($mon, $y) = ($2, $1);
- if($conf->exists('batch-increment_expiration')) {
- my ($curmon, $curyear) = (localtime(time))[4,5];
- $curmon++;
- $curyear -= 100;
- $y++ while $y < $curyear || ($y == $curyear && $mon < $curmon);
- }
- $mon = "0$mon" if $mon =~ /^\d$/;
- $y = "0$y" if $y =~ /^\d$/;
- return "$mon$y";
-}
-
1;
Index: td_canada_trust.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/pay_batch/td_canada_trust.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- td_canada_trust.pm 25 Sep 2009 02:30:20 -0000 1.1
+++ td_canada_trust.pm 12 Nov 2010 03:21:31 -0000 1.2
@@ -77,7 +77,7 @@
'',
'',
$cust_pay_batch->payinfo,
- expdate($cust_pay_batch->exp),
+ $cust_pay_batch->expmmyy,
$cust_pay_batch->amount,
$cust_pay_batch->paybatchnum
);
@@ -85,20 +85,6 @@
# no footer
);
-sub expdate {
- my $exp = shift;
- $exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
- my ($mon, $y) = ($2, $1);
- if($conf->exists('batch-increment_expiration')) {
- my ($curmon, $curyear) = (localtime(time))[4,5];
- $curmon++;
- $curyear -= 100;
- $y++ while $y < $curyear || ($y == $curyear && $mon < $curmon);
- }
- $mon = "0$mon" if $mon =~ /^\d$/;
- $y = "0$y" if $y =~ /^\d$/;
- return "$mon$y";
-}
1;
More information about the freeside-commits
mailing list