Пример #1
0
 /**
  * @param string $number
  * @param string $message
  * @param null|string $fromName
  * @param int $status_report_req
  * @return SmsSendResponse
  */
 public function sendText($number, $message, $fromName = null, $status_report_req = 0)
 {
     $fromName = $fromName !== null ? $fromName : $this->defaultFromName;
     $number = PhoneNumber::prefixFilter($number);
     $response = $this->nexmoClient->sendTextMessage($fromName, $number, $message, $status_report_req);
     return SmsSendResponse::createFromResponse($response);
 }
Пример #2
0
 /**
  * @param string $number
  * @param string $pin
  * @param int $client_ref
  * @return SmsSendResponse
  */
 public function send2fa($number, $pin, $client_ref = false)
 {
     $number = PhoneNumber::prefixFilter($number);
     $response = $this->nexmoClient->send2faMessage($number, $pin, $client_ref);
     return SmsSendResponse::createFromResponse($response);
 }