summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes5
-rw-r--r--Paymentech.pm20
-rw-r--r--debian/changelog2
-rw-r--r--debian/control5
-rw-r--r--debian/source/format2
5 files changed, 23 insertions, 11 deletions
diff --git a/Changes b/Changes
index dccdee5..0f29d09 100644
--- a/Changes
+++ b/Changes
@@ -1,7 +1,10 @@
Revision history for Business-BatchPayment-Paymentech
-0.05 unreleased
+0.05 Tue Jan 26 15:51:53 PST 2016
- enforce field lengths in raw bytes
+ - support recurring_billing flag
+ - support failure_status
+ - fix credit card expiration dates
0.04 unreleased
- make filenames unique when sending multiple batches
diff --git a/Paymentech.pm b/Paymentech.pm
index 9eec935..e5af614 100644
--- a/Paymentech.pm
+++ b/Paymentech.pm
@@ -152,12 +152,13 @@ sub format_item {
terminalID => $self->terminalID,
);
if ($item->payment_type eq 'CC') {
+ my $expiration = $item->expiration;
+ $expiration =~ s/\D//g;
push @order, (
ccAccountNum => $item->card_number,
- ccExp => $item->expiration,
+ ccExp => $expiration,
);
- }
- elsif ( $item->payment_type eq 'ECHECK' ) {
+ } elsif ( $item->payment_type eq 'ECHECK' ) {
push @order, (
cardBrand => 'EC',
ecpCheckRT => $item->routing_code,
@@ -165,10 +166,15 @@ sub format_item {
ecpBankAcctType => $BankAcctType{ $item->account_type },
ecpDelvMethod => 'A',
);
- }
- else {
+ } else {
die "payment type ".$item->type." not supported";
}
+ if ( $item->recurring_billing eq 'F' ) {
+ push @order, ( recurringInd => 'RF' );
+ } elsif ( $item->recurring_billing eq 'S' ) {
+ push @order, ( recurringInd => 'RS' );
+ } # else don't send recurringInd at all
+
push @order, (
avsZip => $item->zip,
avsAddress1 => bytes_substr($item->address, 0, 30),
@@ -294,10 +300,10 @@ sub parse_item {
sub bytes_substr {
my ($string, $offset, $length, $repl) = @_;
my $bytes = substr(
- Encode::encode('utf8', $string),
+ Encode::encode('utf8', $string || ''),
$offset,
$length,
- Encode::encode('utf8', $repl)
+ Encode::encode('utf8', $repl || '')
);
return Encode::decode('utf8', $bytes, Encode::FB_QUIET);
}
diff --git a/debian/changelog b/debian/changelog
index 5c8b561..03881d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libbusiness-batchpayment-paymentech-perl (0.01-1) unstable; urgency=low
+libbusiness-batchpayment-paymentech-perl (0.05) unstable; urgency=low
* Initial Debian package release.
diff --git a/debian/control b/debian/control
index 85d1abe..8951425 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,11 @@ Section: perl
Priority: optional
Maintainer: Mark Wells <mark@freeside.biz>
Build-Depends: debhelper (>= 9)
-Build-Depends-Indep: libbusiness-batchpayment-perl,
+Build-Depends-Indep: libbusiness-batchpayment-perl (>= 0.03),
libmoose-perl (>= 1.09),
+ libxml-writer-perl,
+ libxml-simple-perl,
+ libdatetime-perl,
perl
Standards-Version: 3.9.5
Homepage: https://metacpan.org/release/Business-BatchPayment-Paymentech
diff --git a/debian/source/format b/debian/source/format
index af745b3..89ae9db 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-3.0 (git)
+3.0 (native)