Integrating SMSCountry into Laravel 6December 02, 2019
While working on one of my office projects, we had a scenario where user will be receiving SMS confirmation whenever they have placed an order. So, while we were searching for better SMS gateway partner, we stumbled upon SMScountry.
SMScountry is an enterprise communication solutions provider. It provides text & voice messaging and conference calling services.
Basically you have to create an account with them first, then you can login into their dashboard. SMScountry team will assign you Sender ID. Sender ID is something like the name of the number on which you will be receiving the SMS eg: VM-VFCARE for Vodafone, VK-YESBANK for Yesbank etc. Without sender ID you can't send SMS. After receiving Sender ID, navigate to Features > Templates section. Here you have to create the SMS template which will be approved by SMScountry team.
Integrating SMScountry is very simple and straight forward. You just have to perform a simple API call to their endpoint along with few params like username and password of your SMScountry, sender's phone number, your Sender ID, your message etc.
Please note that, message which you are going to send should adhere to the template that you have predefined on the dashboard template section. If it mismatches, then sms will not be sent.
Above I have used GuzzleHttp client for calling SMScountry end point and I'm verifying whether the response code is 200. Thats all it is required to integrate SMScountry into Laravel 6