/** * 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($this->urlBuilder->buildForPaymentsMethodList($this->projectId, $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]; }
/** * Builds the full request url for a repeated request (including the protocol and the domain) * * @param string $orderId order id of repeated request * @return string */ public function buildRepeatRequestUrlFromOrderId($orderId) { $request = $this->buildRepeatRequest($orderId); return $this->urlBuilder->buildForRequest($request); }