summaryrefslogtreecommitdiff
path: root/FS/FS/agent.pm
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-04-12 14:08:26 -0400
committerChristopher Burger <burgerc@freeside.biz>2018-06-15 17:42:07 -0400
commit65dbca228f4e21b3b3686859d816f1322965501b (patch)
tree49b82525dd40661507799aa043498d44f91b1258 /FS/FS/agent.pm
parent32f42da513a6aec0cfbdaa2941bb1e97437a2822 (diff)
RT# 80175 - readded the ability for payment gateway overrides to have an option to be for just ACH
Diffstat (limited to 'FS/FS/agent.pm')
-rw-r--r--FS/FS/agent.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index e70b971..bf389de 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 : '',