public function get($serviceName, array $attributes = array(), $methodName='factory')
    {
        $className = 'Braintree_' . ucfirst($serviceName);
        if(class_exists($className) && method_exists($className, $methodName)) {
            if($methodName=='factory') return $className::$methodName($attributes);
            else return $className::$methodName();
        } else {
            throw new InvalidServiceException('Invalid service ' . $serviceName);
        }
    }