softon / sms

Simple SMS Gateway Package for sending short text messages from your Application. Facade for Laravel 5(Updated to work with Laravel 5.5).Currently supported Gateways Clickatell, MVaayoo, Gupshup, SmsAchariya, SmsCountry, SmsLane, Nexmo, Mocker / Any HTTP/s based Gateways are supported by Custom Gateway. Log gateway can be used for testing.
http://softon.github.io/sms/
MIT License
45 stars 27 forks source link

Specify custom gateway for sending SMS #1

Closed Amegatron closed 9 years ago

Amegatron commented 9 years ago

Hi! Pretty nice package, but for me at a glance it lacks opportunity to specify my own custom gateway for sending SMS. This could be achieved in two ways from user-side: 1) Specify Gateway class directly in config. In this case the package core should check, whether specified value in config is of predefined gateways (it should have an internal array of supported gateways out of the box and just check whether supplied gateway string is in this array). The problem here is how to specify gateway's credentials. 2) Have a public Facade method which should be called prior to sending SMS, somthing like this:

$gw = new \App\Sms\MyCustomGateway("my_user_id", "my_secret");
Sms::setGateway($gw);
Sms::send("Code: 4356", "79111234567");

Hope you'll find this issue useful and implement as soon as you have time :)

Good luck and Regards, Amegatron.

softon commented 9 years ago

Hi Amegatron,

Its a great idea to have a custom gateway. we will do the needfull.

softon commented 9 years ago

Latest Release includes Custom Gateway. Pls do provide your suggestion.

Regards