public function send($verifyPeer = true)
{
$this->buildRequest();
$url = ($this->testMode ? $this->testUrl : $this->liveUrl) . rawurlencode($this->request);
$options = array(CURLOPT_HEADER => false);
if (!$verifyPeer) {
$options[CURLOPT_SSL_VERIFYPEER] = false;
}
$curl = new Curl($url, $options);
$curl->execute();
$this->response = simplexml_load_string($curl->getBody());
if (isset($this->response->Package)) {
$this->responseCode = 1;
foreach ($this->response->Package->Postage as $rate) {
$this->rates[str_replace(array('<', '>'), array('<', '>'), (string) $rate->MailService)] = (string) $rate->Rate;
}
$this->rates = array_reverse($this->rates, true);
} else {
if (isset($this->response->Number)) {
$this->responseCode = (string) $this->response->Number;
$this->responseMessage = (string) $this->response->Description;
} else {
$this->responseCode = 0;
}
}
}