/** * Sends answer by sms ID get from callback. Answer can be send only if it was not provided * when responding to callback * * @param integer $smsId * @param string $text * * @throws WebToPayException */ public function sendAnswer($smsId, $text) { $content = $this->webClient->get($this->urlBuilder->buildForSmsAnswer(), array('id' => $smsId, 'msg' => $text, 'transaction' => md5($this->password . '|' . $smsId))); if (strpos($content, 'OK') !== 0) { throw new WebToPayException(sprintf('Error: %s', $content), WebToPayException::E_SMS_ANSWER); } }