package FS::agent_payment_gateway;
+use base qw(FS::Record);
+use FS::Record qw( qsearch );
use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearch qsearchs );
-use FS::payment_gateway;
-
-@ISA = qw(FS::Record);
=head1 NAME
$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