[freeside-commits] branch master updated. b7ef80d945a1d5919e6f25437cf765e6355e5cb5

Jonathan Prykop jonathan at 420.am
Tue Mar 31 11:57:10 PDT 2015


The branch, master has been updated
       via  b7ef80d945a1d5919e6f25437cf765e6355e5cb5 (commit)
       via  892ffefd1fda5aea9c6a3fe980613a3ab2e976b9 (commit)
      from  92b6628c08e4478e48b6f250320a3e3e93262ec2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b7ef80d945a1d5919e6f25437cf765e6355e5cb5
Merge: 892ffef 92b6628
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Mar 31 13:56:41 2015 -0500

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit 892ffefd1fda5aea9c6a3fe980613a3ab2e976b9
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Mar 31 13:55:54 2015 -0500

    #33286: Direct Debit by BillBuddy for Bank Accounts

diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index a048d3e..a21e97c 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -2616,6 +2616,7 @@ sub tables_hashref {
         'download',       @date_type,     '', '', 
         'upload',         @date_type,     '', '', 
         'title',   'varchar', 'NULL',255, '', '',
+        'processor_id',   'varchar', 'NULL',255, '', '',
       ],
       'primary_key'  => 'batchnum',
       'unique'       => [],
diff --git a/FS/FS/pay_batch.pm b/FS/FS/pay_batch.pm
index 449ea22..a7628f6 100644
--- a/FS/FS/pay_batch.pm
+++ b/FS/FS/pay_batch.pm
@@ -558,7 +558,14 @@ sub import_from_gateway {
 
   my $processor = $gateway->batch_processor(%proc_opt);
 
-  my @batches = $processor->receive;
+  my @processor_ids = map { $_->processor_id } 
+                        qsearch({
+                          'table' => 'pay_batch',
+                          'hashref' => { 'status' => 'I' },
+                          'extra_sql' => q( AND processor_id != '' AND processor_id IS NOT NULL)
+                        });
+
+  my @batches = $processor->receive(@processor_ids);
 
   my $num = 0;
 
@@ -1044,6 +1051,11 @@ sub export_to_gateway {
   );
   $processor->submit($batch);
 
+  if ($batch->processor_id) {
+    $self->set('processor_id',$batch->processor_id);
+    $self->replace;
+  }
+
   $dbh->commit or die $dbh->errstr if $oldAutoCommit;
   '';
 }
diff --git a/httemplate/edit/payment_gateway.html b/httemplate/edit/payment_gateway.html
index 97976df..156910f 100644
--- a/httemplate/edit/payment_gateway.html
+++ b/httemplate/edit/payment_gateway.html
@@ -103,6 +103,7 @@ my %modules = (
     'KeyBank',
     'Paymentech',
     'TD_EFT',
+    'BillBuddy',
   ],
 );
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Schema.pm                      |    1 +
 FS/FS/pay_batch.pm                   |   14 +++++++++++++-
 httemplate/edit/payment_gateway.html |    1 +
 3 files changed, 15 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list