public function send($verifyPeer = true)
{
$this->buildRateRequest();
$options = array(CURLOPT_POST => true, CURLOPT_POSTFIELDS => $this->accessRequest . $this->rateRequest, CURLOPT_HEADER => false);
if (!$verifyPeer) {
$options[CURLOPT_SSL_VERIFYPEER] = false;
}
$curl = new Curl($this->url, $options);
$curl->execute();
$this->response = simplexml_load_string($curl->getBody());
$this->responseCode = (int) $this->response->Response->ResponseStatusCode;
if ($this->responseCode == 1) {
$this->responseMessage = (string) $this->response->Response->ResponseStatusDescription;
foreach ($this->response->RatedShipment as $rate) {
$this->rates[self::$services[(string) $rate->Service->Code]] = (string) $rate->TotalCharges->MonetaryValue;
}
} else {
$this->responseCode = (string) $this->response->Response->Error->ErrorCode;
$this->responseMessage = (string) $this->response->Response->Error->ErrorDescription;
}
}