public static function requiredFields($gateway)
    {
        $fields = array();

        $requiredFields = self::getConfigSetting($gateway, 'required_fields');

        if (is_array($requiredFields)) {
            $fields = $requiredFields;
        }

        //always require the following for on-site gateways (and not manual)
        if (!self::isOffsite($gateway) && !self::isManual($gateway)) {
            $fields = array_merge(
                $fields,
                array('name', 'number', 'expiryMonth', 'expiryYear', 'cvv')
            );
        }

        return array_unique($fields);
    }