public function send($verifyPeer = true)
{
if (!$this->validate()) {
throw new Exception('The required transaction data has not been set.');
}
$url = $this->test ? $this->testUrl : $this->liveUrl;
$options = array(CURLOPT_HEADER => false, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $this->buildPostString());
if (!$verifyPeer) {
$options[CURLOPT_SSL_VERIFYPEER] = false;
}
$curl = new Curl($url, $options);
$this->response = $curl->execute();
$this->responseCodes = $this->parseResponseCodes();
$this->responseCode = $this->responseCodes['UMerrorcode'];
$this->message = $this->responseCodes['UMerror'];
switch ($this->responseCodes['UMstatus']) {
case 'Approved':
$this->approved = true;
break;
case 'Declined':
$this->declined = true;
break;
case 'Error':
$this->error = true;
break;
}
}