/** * Gets the default currency id for the asigned country */ function get_default_currency($country_id = null) { $mp = new MPShop(); $url = "https://api.mercadolibre.com/sites/" . $country_id; $header = array('Accept: application/json'); $mp_site = $mp->DoPost(null, $url, $header, '200', 'none', 'get'); return $mp_site["default_currency_id"]; }
public function GetMethods($country_id = null) { $mp = new MPShop(); $url = "https://api.mercadolibre.com/sites/" . $country_id . "/payment_methods"; $header = array('Accept: application/json'); $methods = $mp->DoPost(null, $url, $header, '200', 'none', 'get'); return $methods; }