X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fagent_payment_gateway.pm;h=16979d859de28977cfcc65fea31c40662f8eccbe;hp=bd99d0ccd0cb39a939fed237510cdbadd04a6fa6;hb=dc83512c36dc6bea2585abada4f88d714c600e55;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/FS/FS/agent_payment_gateway.pm b/FS/FS/agent_payment_gateway.pm index bd99d0ccd..16979d859 100644 --- a/FS/FS/agent_payment_gateway.pm +++ b/FS/FS/agent_payment_gateway.pm @@ -1,11 +1,8 @@ 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 @@ -115,15 +112,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 "Non ACH (E-check) Agent cardtype override no longer supported" + if qsearch({ + 'table' => 'agent_payment_gateway', + 'extra_sql' => ' WHERE cardtype IS NOT NULL AND cardtype != \'\' AND cardtype != \'ACH\'', + }); + return ''; } +=item payment_gateway + =back =head1 BUGS