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

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);
}