function fn_qwintry_get_country_data($country, $shipping_id) { $result = fn_qwintry_send_api_request("countries-list?country=" . $country, array(), fn_get_shipping_params($shipping_id)); if (!$result && !$result->success && empty($result->result) && empty($result->result->{$country})) { return false; } foreach ($result->result->{$country} as $key => $row) { if (empty($row) || !is_string($row)) { continue; } $data[] = array('header' => __('qwintry_' . $key), 'content' => $row, 'bold' => in_array($key, array('lazy_workflow'))); } return empty($data) ? false : $data; }
/** * Process simple request to shipping service server * * @return string Server response */ public function getSimpleRates() { $data = $this->getRequestData(); $response = fn_qwintry_send_api_request($data['url'], $data['data'], $this->_shipping_info['service_params']); return $response; }