[freeside-commits] branch master updated. b3ecc63dba7b5739467c342a8f861a94b9b1ee29
Christopher Burger
burgerc at freeside.biz
Mon Apr 16 13:46:15 PDT 2018
The branch, master has been updated
via b3ecc63dba7b5739467c342a8f861a94b9b1ee29 (commit)
via fb747f8161b7ec9d3092c5796f373c1b6a373764 (commit)
from bfd03694e81b9bc09b24d288adde0a038fc93288 (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 b3ecc63dba7b5739467c342a8f861a94b9b1ee29
Merge: fb747f816 bfd03694e
Author: Christopher Burger <burgerc at freeside.biz>
Date: Mon Apr 16 16:45:24 2018 -0400
Merge branch 'master' of ssh://git.freeside.biz/home/git/freeside
commit fb747f8161b7ec9d3092c5796f373c1b6a373764
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 : '',
-----------------------------------------------------------------------
Summary of changes:
FS/FS/agent.pm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list