/** * Check the currency * * @param Cart $cart * @return boolean */ public function checkCurrency($cart) { $currency_order = new Currency((int) $cart->id_currency); return PagSeguroCurrencies::checkCurrencyAvailabilityByIsoCode($currency_order->iso_code); }
/** * plgVmDisplayListFEPayment * This event is fired to display the pluginmethods in the cart (edit shipment/payment) for example * * @param object $cart Cart object * @param integer $selected ID of the method selected * @return boolean True on succes, false on failures, null when this plugin was not selected. * On errors, JError::raiseWarning (or JError::raiseError) must be used to set a message. * * @author Valerie Isaksen * @author Max Milbers */ public function plgVmDisplayListFEPayment(VirtueMartCart $cart, $selected = 0, &$htmlIn) { if (PagSeguroCurrencies::checkCurrencyAvailabilityByIsoCode(shopFunctions::getCurrencyByID($cart->pricesCurrency, 'currency_code_3'))) { return $this->displayListFE($cart, $selected, $htmlIn); } return false; }