File tree Expand file tree Collapse file tree
src/Utopia/Messaging/Adapter/SMS
tests/Messaging/Adapter/SMS Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,4 +34,4 @@ FAST2SMS_SENDER_ID=
3434FAST2SMS_MESSAGE_ID =
3535FAST2SMS_TO =
3636INFORU_API_TOKEN =
37- INFORU_SENDER =
37+ INFORU_SENDER_ID =
Original file line number Diff line number Diff line change 5050 FAST2SMS_MESSAGE_ID : ${{ secrets.FAST2SMS_MESSAGE_ID }}
5151 FAST2SMS_TO : ${{ secrets.FAST2SMS_TO }}
5252 INFORU_API_TOKEN : ${{ secrets.INFORU_API_TOKEN }}
53- INFORU_SENDER : ${{ secrets.INFORU_SENDER }}
53+ INFORU_SENDER_ID : ${{ secrets.INFORU_SENDER_ID }}
5454 run : |
5555 docker compose up -d --build
5656 sleep 5
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ services:
4343 - FAST2SMS_MESSAGE_ID
4444 - FAST2SMS_TO
4545 - INFORU_API_TOKEN
46- - INFORU_SENDER
46+ - INFORU_SENDER_ID
4747
4848 maildev :
4949 image : appwrite/mailcatcher:1.0.0
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ class Inforu extends SMSAdapter
1414
1515 /**
1616 * @param string $apiToken Inforu API token
17- * @param string $sender Sender name/number
17+ * @param string $senderId Sender ID
1818 */
1919 public function __construct (
2020 private string $ apiToken ,
21- private string $ sender
21+ private string $ senderId
2222 ) {
2323 }
2424
@@ -60,7 +60,7 @@ protected function process(SMSMessage $message): array
6060 'Message ' => $ message ->getContent (),
6161 'Recipients ' => $ recipients ,
6262 'Settings ' => [
63- 'Sender ' => $ this ->sender ,
63+ 'Sender ' => $ this ->senderId ,
6464 ],
6565 ],
6666 ],
Original file line number Diff line number Diff line change @@ -15,13 +15,12 @@ public function testSendSMS(): void
1515 {
1616 $ sender = new Inforu (
1717 apiToken: \getenv ('INFORU_API_TOKEN ' ),
18- sender : \getenv ('INFORU_SENDER ' )
18+ senderId : \getenv ('INFORU_SENDER_ID ' )
1919 );
2020
2121 $ message = new SMS (
2222 to: ['0541234567 ' ],
2323 content: 'Test Content ' ,
24- from: '+987654321 '
2524 );
2625
2726 $ response = $ sender ->send ($ message );
You can’t perform that action at this time.
0 commit comments