File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/Symfony/Component/Notifier/Bridge/LightSms Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,18 @@ protected function doSend(MessageInterface $message): SentMessage
132
132
if (isset ($ content ['error ' ])) {
133
133
throw new TransportException ('Unable to send the SMS: ' .$ this ->errorCodes [$ content ['error ' ]], $ response );
134
134
}
135
+
136
+
137
+ $ phone = preg_replace ("/[^\d]/ " , "" , $ message ->getPhone ());
138
+
139
+ if ($ content [$ phone ]['error ' ] == 32 ) {
140
+ throw new TransportException ('Unable to send the SMS: ' .$ this ->errorCodes [$ content ['error ' ]], $ response );
141
+ }
142
+
143
+ if ($ content [$ phone ]['error ' ] == 0 ) {
144
+ $ sentMessage = new SentMessage ($ message , (string ) $ this );
145
+ $ sentMessage ->setMessageId ($ content [$ phone ]['id_sms ' ]);
146
+ }
135
147
}
136
148
137
149
private function getSignature (): string
You can’t perform that action at this time.
0 commit comments