X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fagent_payment_gateway.pm;h=16979d859de28977cfcc65fea31c40662f8eccbe;hp=e71ed2118651c0a7e7051340e0383f4ffab55cb8;hb=dc83512c36dc6bea2585abada4f88d714c600e55;hpb=32072dbf59a054529f5304574c0f56f9567d14d0 diff --git a/FS/FS/agent_payment_gateway.pm b/FS/FS/agent_payment_gateway.pm index e71ed2118..16979d859 100644 --- a/FS/FS/agent_payment_gateway.pm +++ b/FS/FS/agent_payment_gateway.pm @@ -1,5 +1,6 @@ package FS::agent_payment_gateway; use base qw(FS::Record); +use FS::Record qw( qsearch ); use strict; @@ -111,6 +112,21 @@ sub check { $self->SUPER::check; } +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