[freeside-commits] branch FREESIDE_4_BRANCH updated. 8d92a5062e720da98dfe28cd0f0e10e308fc65dd

Christopher Burger burgerc at freeside.biz
Tue Jan 8 10:57:42 PST 2019


The branch, FREESIDE_4_BRANCH has been updated
       via  8d92a5062e720da98dfe28cd0f0e10e308fc65dd (commit)
       via  12c812ae620de69d30d6416312eee3b5bf59f780 (commit)
       via  9dfe24203bc286421066de0f85313e129a7e5b86 (commit)
       via  4ecafb8403a252d5a380c5feb07c93c7fe01b0c3 (commit)
       via  73774ffbdfe3d0aadfea9a6d980751197d199e58 (commit)
       via  c540df7c42e28bc2919141419757041532cb1b67 (commit)
       via  99a89d5e688a70208b961ff190c9d04747a0c0e0 (commit)
       via  483d7437c538aa548a8cd6ce2d9dc357c47322ba (commit)
      from  58d7653a1fbf24fc62d0b4a39bf61dc470f1ee04 (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 8d92a5062e720da98dfe28cd0f0e10e308fc65dd
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Jan 8 12:03:00 2019 -0500

    RT# 80175 - updated payment gateway override to not drop ACH overrides on upgrade

diff --git a/FS/FS/agent_payment_gateway.pm b/FS/FS/agent_payment_gateway.pm
index 6a7cc06d1..16979d859 100644
--- a/FS/FS/agent_payment_gateway.pm
+++ b/FS/FS/agent_payment_gateway.pm
@@ -119,10 +119,10 @@ sub _upgrade_data {
       'table' => 'agent_payment_gateway',
       'extra_sql' => ' WHERE taxclass IS NOT NULL AND taxclass != \'\'',
     });
-  die "Agent cardtype override no longer supported"
+  die "Non ACH (E-check) Agent cardtype override no longer supported"
     if qsearch({
       'table' => 'agent_payment_gateway',
-      'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\'',
+      'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\' AND cardtype != \'ACH\'',
     });
   return '';
 }

commit 12c812ae620de69d30d6416312eee3b5bf59f780
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Jun 26 09:51:37 2018 -0400

    RT# 80175 - restored ability to set override to ACH only.

diff --git a/httemplate/edit/agent_payment_gateway.html b/httemplate/edit/agent_payment_gateway.html
index 6d15164ac..38411f12e 100644
--- a/httemplate/edit/agent_payment_gateway.html
+++ b/httemplate/edit/agent_payment_gateway.html
@@ -18,9 +18,12 @@ Use gateway <SELECT NAME="gatewaynum">
 
   <OPTION VALUE="<% $payment_gateway->gatewaynum %>"><% $payment_gateway->gateway_module %> (<% $payment_gateway->gateway_username %>)
 % } 
-
 </SELECT>
-<BR><BR>
+<BR>
+
+<INPUT TYPE="checkbox" NAME="cardtype" VALUE="ACH"> for ACH only.
+<BR>
+<BR>
 
 <INPUT TYPE="submit" VALUE="Add gateway override">
 </FORM>

commit 9dfe24203bc286421066de0f85313e129a7e5b86
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Jun 18 10:16:37 2018 -0400

    RT# 80175 - changed gateway selection to select either ACH or NULL for echeck payments

diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index e1d9ccf1d..8aff96a8d 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -295,7 +295,7 @@ sub payment_gateway {
   }
 
   my $cardtype_search = "AND ( cardtype IS NULL OR cardtype <> 'ACH')";
-  $cardtype_search = "AND cardtype = 'ACH'" if $options{method} eq 'ECHECK';
+  $cardtype_search = "AND ( cardtype IS NULL OR cardtype = 'ACH' )" if $options{method} eq 'ECHECK';
 
   my $override =
       qsearchs({

commit 4ecafb8403a252d5a380c5feb07c93c7fe01b0c3
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Fri Jun 15 16:52:39 2018 -0400

    RT# 80175 - fixed error with ACH gateway not being selected.

diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index 810709357..e1d9ccf1d 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -294,7 +294,7 @@ sub payment_gateway {
     }
   }
 
-  my $cardtype_search = "AND cardtype != 'ACH'";
+  my $cardtype_search = "AND ( cardtype IS NULL OR cardtype <> 'ACH')";
   $cardtype_search = "AND cardtype = 'ACH'" if $options{method} eq 'ECHECK';
 
   my $override =

commit 73774ffbdfe3d0aadfea9a6d980751197d199e58
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Apr 16 16:44:16 2018 -0400

    RT# 80175 - fixed error in payment gateway where ACH cardtype was always selected.

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

commit c540df7c42e28bc2919141419757041532cb1b67
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
    
    Conflicts:
            FS/FS/agent.pm

diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index 8aff96a8d..bf389deac 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -294,15 +294,13 @@ sub payment_gateway {
     }
   }
 
-  my $cardtype_search = "AND ( cardtype IS NULL OR cardtype <> 'ACH')";
-  $cardtype_search = "AND ( cardtype IS NULL OR cardtype = 'ACH' )" if $options{method} eq 'ECHECK';
+  my $cardtype = '';
+  if ( $options{method} eq 'ECHECK' ) { $cardtype = 'ACH'; }
 
   my $override =
-      qsearchs({
-        "table" => 'agent_payment_gateway',
-        "hashref" => { agentnum => $self->agentnum, },
-        "extra_sql" => $cardtype_search,
-      });
+     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 : '',

commit 99a89d5e688a70208b961ff190c9d04747a0c0e0
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Jan 8 11:59:51 2019 -0500

    Revert "RT# - updated payment gateway override to not drop ACH overrides on upgrade"
    
    This reverts commit 8ea0bfff9308f4c13d170c45cbac6ba7a8a9e488.

diff --git a/FS/FS/agent_payment_gateway.pm b/FS/FS/agent_payment_gateway.pm
index 16979d859..6a7cc06d1 100644
--- a/FS/FS/agent_payment_gateway.pm
+++ b/FS/FS/agent_payment_gateway.pm
@@ -119,10 +119,10 @@ sub _upgrade_data {
       'table' => 'agent_payment_gateway',
       'extra_sql' => ' WHERE taxclass IS NOT NULL AND taxclass != \'\'',
     });
-  die "Non ACH (E-check) Agent cardtype override no longer supported"
+  die "Agent cardtype override no longer supported"
     if qsearch({
       'table' => 'agent_payment_gateway',
-      'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\' AND cardtype != \'ACH\'',
+      'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\'',
     });
   return '';
 }

commit 483d7437c538aa548a8cd6ce2d9dc357c47322ba
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Jan 8 10:24:01 2019 -0500

    RT# - updated payment gateway override to not drop ACH overrides on upgrade

diff --git a/FS/FS/agent_payment_gateway.pm b/FS/FS/agent_payment_gateway.pm
index 6a7cc06d1..16979d859 100644
--- a/FS/FS/agent_payment_gateway.pm
+++ b/FS/FS/agent_payment_gateway.pm
@@ -119,10 +119,10 @@ sub _upgrade_data {
       'table' => 'agent_payment_gateway',
       'extra_sql' => ' WHERE taxclass IS NOT NULL AND taxclass != \'\'',
     });
-  die "Agent cardtype override no longer supported"
+  die "Non ACH (E-check) Agent cardtype override no longer supported"
     if qsearch({
       'table' => 'agent_payment_gateway',
-      'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\'',
+      'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\' AND cardtype != \'ACH\'',
     });
   return '';
 }

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

Summary of changes:
 FS/FS/agent_payment_gateway.pm             | 4 ++--
 httemplate/edit/agent_payment_gateway.html | 7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list