/** * Set the currency for all products. Must match site curency. * TODO set currency for entire site in central location * * @param Array $currency */ public static function set_allowed_currency(array $currency) { if (count($currency) && array_key_exists(Payment::site_currency(), $currency)) { self::$allowed_currency = $currency; } else { user_error("Cannot set allowed currency. Currency must match: " . Payment::site_currency(), E_USER_WARNING); //TODO return meaningful error to browser in case error not shown return; } }