evp / gsms-bundle
Symfony bundle for gsms.lt provided services
Installs: 12 864
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 3
Open Issues: 0
Requires
- evp/gsms-php-client: *
- symfony/symfony: ^3.4 || ^4.4 || ^5.0
This package is not auto-updated.
Last update: 2024-11-05 13:05:42 UTC
README
What is GsmsBundle?
GsmsBundle is a small bundle that can serve as a bridge between your Symfony framework and the GsmsPHPClient
Sections
Requirements
- An active gsms.lt account
Installation
- Composer:
composer require evp/gsms-bundle
- Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( //... your existing bundles here new Evp\Bundle\GsmsBundle\EvpGsmsBundle(), ); }
- Configure your app/config/config.yml
evp_gsms: credentials: username: your_username password: your_password from: my_phone_number callback_uri: "http://example.com/callback"
Don't forget to replace your_username, your_password other parameters with the actual values.
from
and callback_uri
parameters are optional.
That's it, you are now ready to use GsmsBundle.
Code samples
Once the bundle is installed the dependency container will contain evp_gsms.client service, which can be used to access the methods of GsmsPHPClient
Use the client to send your first sms
$response = $client->send('Your telephone number', 'Receiver telephone number', 'message');
And get the response from the server
if ($response->isSuccessful()) { // Do something when the sms has been sent } else { // Do something when the sms has not been sent $lastResponse = $client->getLastResponse(); }
Please refer to the Evp_Gsms_Client documentation for additional information.
Contacts
If you have any further questions feel free to contact us:
"Paysera LT", UAB
Pilaitės pr. 16
LT-04352 Vilnius
El. paštas: pagalba@gsms.lt
Tel. +370 (5) 2 03 27 19
Faksas +370 (5) 2 63 91 79