beobeboi / sms-sdk
This package is abandoned and no longer maintained.
No replacement package was suggested.
FPT SMS vendor custom by Diag
dev-main
2023-06-18 09:30 UTC
Requires
- php: ^7.2.5 || ^8.0
- ext-json: *
- giggsey/libphonenumber-for-php: ^8.12
- guzzlehttp/guzzle: ^7.0.1
- illuminate/support: ^5.2|^6.0|^7.0|^8.0|^9.0
- nesbot/carbon: ^2.53.1
- psr/log: ^1.1 || ^2.0 || ^3.0
Requires (Dev)
- ext-curl: *
- bamarni/composer-bin-plugin: ^1.4.1
Suggests
- ext-curl: Required for CURL handler support
- ext-intl: Required for Internationalized Domain Name (IDN) support
- psr/log: Required for using the Log middleware
This package is auto-updated.
Last update: 2024-12-08 15:51:20 UTC
README
PHP Sdk for FPT Run:
composer require beobeboi/sms-sdk
2. Config
For Laravel, run:
php artisan vendor:publish --provider="DiagVN\\SmsServiceProvider"
Run
php artisan migrate
Add config to .env
FPT_BRAND_NAME=
FPT_CLIENT_ID=
FPT_CLIENT_SECRET=
FPT_MODE=
SMS_PROVIDER=
SMS_WHITELIST=
LOG_SMS=
SMS_PROVIDER: SMS service provider name
SMS_WHITELIST: List phone number was allowed to send SMS in test and dev enviroment
LOG_SMS: true/false, set enable log sms
3. Example
use DiagVN\SmsService;
try {
$service = app(SmsService::class);
$service->sendMessage(
+840909111111,
'Test Send SMS'
);
} catch (Exception $ex) {
report($ex);
}