Beispiel #1
0
 /**
  * Reply
  */
 public function reply($requestId, $mobile, $message, $cost = 0, $messageId = null, $adjustCost = true)
 {
     // Create message
     $message = $this->createMessage(['id' => $messageId, 'mobile' => $mobile, 'message' => $message, 'request_id' => $requestId, 'cost' => $cost]);
     // Return sender response
     return Loader::sender($this->config)->reply($message, $adjustCost);
 }
Beispiel #2
0
 /**
  * Handle message
  */
 public function message($callback)
 {
     // If there's a message
     if ($this->hasMessage()) {
         // Execute callback passing the message
         $this->success = Utilities::executeCallback($callback, [$this->message, Loader::sender($this->config)]);
     }
     // Return self
     return $this;
 }