/**
  * Assemble all possible paths for the wanted template
  *
  * @param string $name template name
  *
  * @return array
  */
 private function _templatePaths($name)
 {
     $basepaths = array();
     try {
         $basepaths[] = $this->_config->get('paths/extra_templates');
     } catch (KiTT_MissingConfigurationException $e) {
     }
     $basepaths[] = $this->_vfs->join($this->_config->get('paths/kitt'), 'html');
     $paths = array();
     foreach ($basepaths as $index => $basepath) {
         $paths[] = $this->_vfs->join($basepath, strtolower($this->_locale->getCountryCode()), $name);
         $paths[] = $this->_vfs->join($basepath, $name);
     }
     return $paths;
 }
 /**
  * Configure a Klarna object for a specific country
  *
  * @param KiTT_Locale $locale Country code
  * @param int         $eid    Merchant id
  * @param string      $secret Merchant secret
  *
  * @throws InvalidArgumentException
  *
  * @return Klarna
  */
 public static function configureKlarna(KiTT_Locale $locale, $eid, $secret)
 {
     $country = $locale->getCountryCode();
     if ($country === null) {
         throw new InvalidArgumentException("country must be a valid Klarna country ({$country})");
     }
     $country = strtoupper($country);
     self::configuration()->set("sales_countries/{$country}", array('eid' => $eid, 'secret' => $secret, 'country' => $locale->getCountry(), 'currency' => $locale->getCurrency(), 'language' => $locale->getLanguage()));
 }