diff --git a/src/Octopush/Api/Client.php b/src/Octopush/Api/Client.php index 28f41da..067c4e4 100644 --- a/src/Octopush/Api/Client.php +++ b/src/Octopush/Api/Client.php @@ -70,6 +70,13 @@ class Client */ private $requestMode = self::REQUEST_MODE_REAL; + /** + * Allows you to choose transactional mode. + * + * @var bool + */ + private $transactional = false; + /** * Lists the key fields of the application you want to add in the sha1 hash. * @@ -123,6 +130,11 @@ public function setRequestKeys($requestKeys) $this->requestKeys = $requestKeys; } + public function setTransactional() + { + $this->transactional=true; + } + /** * Sends a simple SMS. * @@ -144,6 +156,10 @@ public function send($smsText) 'request_mode' => $this->requestMode, ]; + if ($this->transactional) { + $data['transactional'] = 1; + } + if ($this->withReplies) { $data['with_replies'] = 1; }