/** * Returns new country instance with only those payment methods, which are returns or not iban number after payment * * @param boolean $isIban * * @return WebToPay_PaymentMethodCountry */ public function filterForIban($isIban = true) { $country = new WebToPay_PaymentMethodCountry($this->countryCode, $this->titleTranslations, $this->defaultLanguage); foreach ($this->getGroups() as $group) { $group = $group->filterForIban($isIban); if (!$group->isEmpty()) { $country->addGroup($group); } } return $country; }
/** * Adds new country to payment methods. If some other country with same code was registered earlier, overwrites it. * Returns added country instance * * @param WebToPay_PaymentMethodCountry $country * * @return WebToPay_PaymentMethodCountry */ public function addCountry(WebToPay_PaymentMethodCountry $country) { return $this->countries[$country->getCode()] = $country; }