Download the PHP package sol-parts/symfony-alphasms-notifier without Composer
On this page you can find all versions of the php package sol-parts/symfony-alphasms-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package symfony-alphasms-notifier
Symfony AlphaSMS Notifier
Provides AlphaSMS integration for Symfony Notifier. The package supports SMS, Viber with SMS fallback, account balance checks, and delivery-status webhooks.
Installation
Standalone usage
The transport can be used without the Symfony Full Stack Framework:
Checking the balance
Symfony Full Stack Framework
Add the AlphaSMS DSN to your environment:
Register the transport factory:
Configure the texter transport:
Where:
API_KEYis your AlphaSMS API key;FROMis your registered sender name.
URL-encode the API key and sender name if they contain characters reserved in a URI.
Inject Symfony's TexterInterface to send a message:
Message options
Use AlphaSmsOptions to configure an AlphaSMS message:
To try Viber first and fall back to SMS when delivery is unavailable, enable
viber_if_possible() and add the Viber options you need:
The transport derives the AlphaSMS viber_type from the options actually set,
so a plain text Viber message is a single call:
AlphaSMS accepts only viber_lifetime for the viber+sms type, so
sms_lifetime() is ignored while viber_if_possible(true) is set.
Delivery-status webhook
Register the AlphaSMS request parser:
Configure the webhook routing and use your AlphaSMS API key as the signing secret:
The resulting endpoint is /webhook/alpha_sms. Add a consumer for the parsed
SMS events:
Resources
All versions of symfony-alphasms-notifier with dependencies
symfony/http-client Version ^6.4|^7.0
symfony/http-foundation Version ^6.4|^7.0
symfony/notifier Version ^7.3
symfony/remote-event Version ^6.4|^7.0
symfony/webhook Version ^6.4|^7.0