Wallogit.com
2017 © Pedro PelĂĄez
Symfony2 bundle for gsms.lt provided services
GsmsBundle is a small bundle that can serve as a bridge between your Symfony framework and the GsmsPHPClient, (*1)
* Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( //... your existing bundles here new Evp\Bundle\GsmsBundle\EvpGsmsBundle(), ); }
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., (*2)
That's it, you are now ready to use GsmsBundle., (*3)
Once the bundle is installed the dependency container will contain evp_gsms.client service, which can be used to access the methods of GsmsPHPClient, (*4)
Use the client to send your first sms, (*5)
$response = $client->send('Your telephone number', 'Receiver telephone number', 'message');
And get the response from the server, (*6)
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., (*7)
If you have any further questions feel free to contact us:, (*8)
"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, (*9)