X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fagent_payment_gateway.pm;h=4991c19122d2192eba78038c2b11d3f7f51370ce;hb=cdcb49048123ab536a9ae1dcba2e5d31d0159b0d;hp=bd99d0ccd0cb39a939fed237510cdbadd04a6fa6;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/FS/FS/agent_payment_gateway.pm b/FS/FS/agent_payment_gateway.pm index bd99d0ccd..4991c1912 100644 --- a/FS/FS/agent_payment_gateway.pm +++ b/FS/FS/agent_payment_gateway.pm @@ -1,11 +1,7 @@ package FS::agent_payment_gateway; +use base qw(FS::Record); use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); -use FS::payment_gateway; - -@ISA = qw(FS::Record); =head1 NAME @@ -115,15 +111,23 @@ sub check { $self->SUPER::check; } -=item payment_gateway - -=cut - -sub payment_gateway { - my $self = shift; - qsearchs('payment_gateway', { 'gatewaynum' => $self->gatewaynum } ); +sub _upgrade_data { + # to simplify tokenization upgrades + die "Agent taxclass override no longer supported" + if qsearch({ + 'table' => 'agent_payment_gateway', + 'extra_sql' => ' WHERE taxclass IS NOT NULL AND taxclass != \'\'', + }); + die "Agent cardtype override no longer supported" + if qsearch({ + 'table' => 'agent_payment_gateway', + 'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\'', + }); + return ''; } +=item payment_gateway + =back =head1 BUGS