hopeofiran/avanak-laravel
最新稳定版本:v1.7.4
Composer 安装命令:
composer require hopeofiran/avanak-laravel
包简介
This package helps us to use Avanak services.
README 文档
README
This package helps us to use Avanak services.
installation
To install from
composeruse the following command
composer require hopeofiran/avanak-laravel
configuration .env file
add account information into
.envfile
AVANAK_USERNAME=your_username AVANAK_PASSWORD=your_password
to change default configuration
to access config file and change default configuration use following command
php artisan vendor:publish --provider=hopeofiran\avanak\Providers\AvanakProvider
or you can set config with
config($keys[,$value])method
$credit = \hopeofiran\avanak\Facades\AvanakFacade::config('username', "{$your_username}") ->config('password', "{$your_password}") ->getCredit();
OR
$credit = \hopeofiran\avanak\Facades\AvanakFacade::config(['username'=>"{$your_username}", 'password' => "{$your_password}"]) ->getCredit();
also you can modify
avanakserver address withbaseUrl($url)method
$credit = \hopeofiran\avanak\Facades\AvanakFacade::baseUrl("$avanak_new_address") ->getCredit();
How to use this package
CreateCampaign method
to create campaign use createCampaign() method
$title = 'example title'; $numbers = ['0912×××6789', '0911×××1111']; $maxTryCount = 2; $minuteBetweenTries = 1; $start = now()->addMicros(5); $end = now()->endOfDay(); $messageId = 123456789; $campaign = \hopeofiran\avanak\Facades\AvanakFacade::createCampaign($title, $numbers, $maxTryCount, $minuteBetweenTries, $start, $end, $messageId);
response
{
"CreateCampaignResult": 123456789
}
QuickSend method
to quick send message use
quickSend()method
$number = '0912×××6789'; $messageId = 123456789; $response = \hopeofiran\avanak\Facades\AvanakFacade::quickSend($number, $messageId);
response
{
"QuickSendResult": 123456789
}
统计信息
- 总下载量: 956
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-06