File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ class Client
7070 */
7171 private $ requestMode = self ::REQUEST_MODE_REAL ;
7272
73+ /**
74+ * Allows you to choose transactional mode.
75+ *
76+ * @var bool
77+ */
78+ private $ transactional = false ;
79+
7380 /**
7481 * Lists the key fields of the application you want to add in the sha1 hash.
7582 *
@@ -123,6 +130,11 @@ public function setRequestKeys($requestKeys)
123130 $ this ->requestKeys = $ requestKeys ;
124131 }
125132
133+ public function setTransactional ()
134+ {
135+ $ this ->transactional =true ;
136+ }
137+
126138 /**
127139 * Sends a simple SMS.
128140 *
@@ -144,6 +156,10 @@ public function send($smsText)
144156 'request_mode ' => $ this ->requestMode ,
145157 ];
146158
159+ if ($ this ->transactional ) {
160+ $ data ['transactional ' ] = 1 ;
161+ }
162+
147163 if ($ this ->withReplies ) {
148164 $ data ['with_replies ' ] = 1 ;
149165 }
You can’t perform that action at this time.
0 commit comments