[freeside-commits] branch master updated. 56501725dadae47e0592a7d0652afce526784b60

Christopher Burger burgerc at freeside.biz
Thu Apr 12 11:08:55 PDT 2018


The branch, master has been updated
       via  56501725dadae47e0592a7d0652afce526784b60 (commit)
      from  574262f14977b5acab2fc09fa2aaaa74eefb210b (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 56501725dadae47e0592a7d0652afce526784b60
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Thu Apr 12 14:08:26 2018 -0400

    RT# 80175 - readded the ability for payment gateway overrides to have an option to be for just ACH

diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index e70b9716a..bf389deac 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -294,7 +294,13 @@ sub payment_gateway {
     }
   }
 
-  my $override = qsearchs('agent_payment_gateway', { agentnum => $self->agentnum } );
+  my $cardtype = '';
+  if ( $options{method} eq 'ECHECK' ) { $cardtype = 'ACH'; }
+
+  my $override =
+     qsearchs('agent_payment_gateway', { agentnum => $self->agentnum,
+                                         cardtype => $cardtype,      } )
+  || qsearchs('agent_payment_gateway', { agentnum => $self->agentnum } );
 
   my $payment_gateway = FS::payment_gateway->by_key_or_default(
     gatewaynum => $override ? $override->gatewaynum : '',

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

Summary of changes:
 FS/FS/agent.pm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list