0.06, add with_recurringInd flag
authorMark Wells <mark@freeside.biz>
Wed, 21 Dec 2016 23:09:31 +0000 (15:09 -0800)
committerMark Wells <mark@freeside.biz>
Wed, 21 Dec 2016 23:09:31 +0000 (15:09 -0800)
Changes
Paymentech.pm
debian/changelog
debian/control
debian/rules

diff --git a/Changes b/Changes
index 0f29d09..ed662f5 100644 (file)
--- 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
index e5af614..df652ed 100644 (file)
@@ -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, (
index 03881d5..607e19d 100644 (file)
@@ -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 <mark@freeside.biz>  Wed, 21 Dec 2016 15:07:01 -0800
+
 libbusiness-batchpayment-paymentech-perl (0.05) unstable; urgency=low
 
   * Initial Debian package release.
index 8951425..ddb1aed 100644 (file)
@@ -3,19 +3,17 @@ Section: perl
 Priority: optional
 Maintainer: Mark Wells <mark@freeside.biz>
 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)
index 2d33f6a..88ecce1 100755 (executable)
@@ -1,4 +1,6 @@
 #!/usr/bin/make -f
 
+override_dh_auto_test:
+
 %:
        dh $@