I can tell from that code snippet that you are using the AuthnetAIM class that I wrote. To make it so this class never sends over the CVV parameter when it is null
change this line:
$this->params['x_card_code'] = str_pad((int) $cvv, 3, "0", STR_PAD_LEFT);
to this:
if (!is_null($cvv))
{
$this->params['x_card_code'] = str_pad((int) $cvv, 3, "0", STR_PAD_LEFT);
}