buihai279 / sms-sdk
FPT SMS vendor custom by Diag, haibv custom
Installs: 319
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/buihai279/sms-sdk
Requires
- php: ^7.2.5 || ^8.0|| ^8.2
 - 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|^10.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: 2025-10-28 16:06:09 UTC
README
PHP Sdk for FPT Run:
composer require diagvn/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=
SMS_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);
}