justinjunkes / laravel-gateway-api
Unofficial laravel package for GatewayApi
dev-master
2022-09-02 16:46 UTC
Requires
- php: ^7.1|^8.0
- guzzlehttp/oauth-subscriber: ^0.6
- illuminate/support: ^6.0|^7.0|^8.0|^9.0
This package is not auto-updated.
Last update: 2024-04-27 22:44:05 UTC
README
Unofficial package for Gateway Api
Installation
composer require loafer/laravel-gateway-api
Publish config file
php artisan vendor:publish --provider=Loafer\GatewayApi\GatewayApiServiceProvider
Specify api key and secret in .env
GATEWAY_API_KEY=key
GATEWAY_API_SECRET=secret
Sender Name
You can easily specify the sender's name:
In .env
GATEWAY_SENDER="Milky Way"
On the fly
GatewayApi::setSenderName('Elon Musk')
->sendSimpleSMS('test message', [+380987654321])
By default, the sender's name is the name of the app
Up to 11 alphanumeric characters or 15 digits
Callback Url
You can easily specify the callback url:
On the fly
GatewayApi::setCallbackUrl('https://test-dev.com/callbacks/sms')
->sendSimpleSMS('test message', [+380987654321])
By default, the callback url is null