/**
  * Gets payment method list for specified currency
  *
  * @param string $currency
  *
  * @return WebToPay_PaymentMethodList
  *
  * @throws WebToPayException
  */
 public function getPaymentMethodList($currency)
 {
     if (!isset($this->methodListCache[$currency])) {
         $xmlAsString = $this->webClient->get(WebToPay::XML_URL . $this->projectId . '/currency:' . $currency);
         $useInternalErrors = libxml_use_internal_errors(false);
         $rootNode = simplexml_load_string($xmlAsString);
         libxml_clear_errors();
         libxml_use_internal_errors($useInternalErrors);
         if (!$rootNode) {
             throw new WebToPayException('Unable to load XML from remote server');
         }
         $methodList = new WebToPay_PaymentMethodList($this->projectId, $currency);
         $methodList->fromXmlNode($rootNode);
         $this->methodListCache[$currency] = $methodList;
     }
     return $this->methodListCache[$currency];
 }