private function loadConfig($config) {
        if(isset($config['moduleConf']['API_USERNAME']) && 
                isset($config['moduleConf']['API_PASSWORD']) && 
                isset($config['moduleConf']['API_SIGNATURE']) &&
                isset($config['moduleConf']['API_ENDPOINT']) &&
                isset($config['moduleConf']['version']) &&
                isset($config['moduleConf']['paypal_url']) && 
                isset($config['moduleConf']['command_url'])){
            $this->setAPI_USERNAME($config['moduleConf']['API_USERNAME']);
            $this->setAPI_PASSWORD($config['moduleConf']['API_PASSWORD']);
            $this->setAPI_SIGNATURE($config['moduleConf']['API_SIGNATURE']);
            $this->setAPI_ENDPOINT($config['moduleConf']['API_ENDPOINT']);
            $this->setVersion($config['moduleConf']['version']);
            $this->setPaypal_url($config['moduleConf']['paypal_url']);
            $this->setCommand_url($config['moduleConf']['command_url']);
        }
        else{
            throw new PaypalException('Missing values in config file.');
        }
    }