X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fagent.pm;h=c102e7be88b1b5106c6df005cc02dab8d476a7d7;hb=e2a9dcac3b97254fc0a64ce3e2bf1ce582ce8162;hp=fc234334d7dced7809d651fdfbb1f21874c9483b;hpb=4b05b20576ddb14577d59c87c8257c6804449410;p=freeside.git diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm index fc234334d..c102e7be8 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 => {