summaryrefslogtreecommitdiff
path: root/FS/FS/agent.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-11-11 21:02:01 -0600
committerJonathan Prykop <jonathan@freeside.biz>2016-11-29 05:05:08 -0600
commit5f2c60fc31d06443fb43b30f62a4d2789aad55cd (patch)
tree0ceb1207fa0e1a93b1be14e5591836ef4dd26d08 /FS/FS/agent.pm
parent9026d337602fd1f9c463de2a46db4f27c0d429f9 (diff)
71513: Card tokenization [removed selfservice-payment_gateway]
Diffstat (limited to 'FS/FS/agent.pm')
-rw-r--r--FS/FS/agent.pm16
1 files changed, 3 insertions, 13 deletions
diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index fc23433..c102e7b 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -265,24 +265,14 @@ sub payment_gateway {
my $conf = new FS::Conf;
if ( $options{thirdparty} ) {
- # still a kludge, but it gets the job done
- # and the 'cardtype' semantics don't really apply to thirdparty
- # gateways because we have to choose a gateway without ever
- # seeing the card number
- my $gatewaynum =
- $conf->config('selfservice-payment_gateway', $self->agentnum);
- my $gateway;
- $gateway = FS::payment_gateway->by_key($gatewaynum) if $gatewaynum;
- return $gateway if $gateway;
-
- # a little less kludgey than the above, and allows PayPal to coexist
- # with credit card gateways
+
+ # allows PayPal to coexist with credit card gateways
my $is_paypal = { op => '!=', value => 'PayPal' };
if ( uc($options{method}) eq 'PAYPAL' ) {
$is_paypal = 'PayPal';
}
- $gateway = qsearchs({
+ my $gateway = qsearchs({
table => 'payment_gateway',
addl_from => ' JOIN agent_payment_gateway USING (gatewaynum) ',
hashref => {