From c9f46ecbe418226cdc9649598120611e1d729c72 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 21 Dec 2016 15:09:31 -0800 Subject: [PATCH] 0.06, add with_recurringInd flag --- Changes | 3 +++ Paymentech.pm | 19 +++++++++++++++---- debian/changelog | 6 ++++++ debian/control | 14 ++++++-------- debian/rules | 2 ++ 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/Changes b/Changes index 0f29d09..ed662f5 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Business-BatchPayment-Paymentech +0.06 Wed Dec 21 15:08:00 PST 2016 + - Add with_recurringInd option to control use of recurring indicator. + 0.05 Tue Jan 26 15:51:53 PST 2016 - enforce field lengths in raw bytes - support recurring_billing flag diff --git a/Paymentech.pm b/Paymentech.pm index e5af614..df652ed 100644 --- a/Paymentech.pm +++ b/Paymentech.pm @@ -26,6 +26,7 @@ my $processor = Business::BatchPayment->processor('Paymentech', industryType => 'EC' login => 'TESTUSER', password => 'MYPASS', + with_recurringInd => 1, ); my $result = $processor->submit(@items); @@ -51,6 +52,8 @@ unzip programs. Unlikely to work on non-Unix systems. =item industryType - your 2-letter industry type code +=item with_recurringInd - enable the recurring charge indicator field + =back =cut @@ -74,6 +77,12 @@ has [ qw(merchantID terminalID bin industryType login password) ] => ( required => 1, ); +has 'with_recurringInd' => ( + is => 'ro', + isa => 'Bool', + default => 0, +); + has 'fileDateTime' => ( is => 'ro', isa => 'Str', @@ -169,10 +178,12 @@ sub format_item { } 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' ); + if ( $self->with_recurringInd ) { + 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, ( diff --git a/debian/changelog b/debian/changelog index 03881d5..607e19d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libbusiness-batchpayment-paymentech-perl (0.06) unstable; urgency=medium + + * Add with_recurringInd option to control use of recurring indicator. + + -- Mark Wells Wed, 21 Dec 2016 15:07:01 -0800 + libbusiness-batchpayment-paymentech-perl (0.05) unstable; urgency=low * Initial Debian package release. diff --git a/debian/control b/debian/control index 8951425..ddb1aed 100644 --- a/debian/control +++ b/debian/control @@ -3,19 +3,17 @@ Section: perl Priority: optional Maintainer: Mark Wells Build-Depends: debhelper (>= 9) -Build-Depends-Indep: libbusiness-batchpayment-perl (>= 0.03), - libmoose-perl (>= 1.09), - libxml-writer-perl, - libxml-simple-perl, - libdatetime-perl, - perl +Build-Depends-Indep: perl Standards-Version: 3.9.5 Homepage: https://metacpan.org/release/Business-BatchPayment-Paymentech Package: libbusiness-batchpayment-paymentech-perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, - libbusiness-batchpayment-perl, +Depends: + libbusiness-batchpayment-perl (>= 0.03), + libxml-writer-perl, + libxml-simple-perl, + libdatetime-perl, libmoose-perl (>= 1.09) Description: Chase Paymentech XML batch format. (no description was found) diff --git a/debian/rules b/debian/rules index 2d33f6a..88ecce1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,6 @@ #!/usr/bin/make -f +override_dh_auto_test: + %: dh $@ -- 2.11.0