codeofsolomon/laravel-saby-api
最新稳定版本:v1.0.0
Composer 安装命令:
composer require codeofsolomon/laravel-saby-api
包简介
Unofficial Laravel SDK for the Saby API
README 文档
README
Unofficial Laravel SDK for the Saby API.
Requirements
- PHP 8.2 or higher
- Laravel 10.x, 11.x, or 12.x
- Composer
- Guzzle HTTP 7.9+
- PSR HTTP Client & PSR HTTP Message
Installation
Install via Composer:
composer require codeofsolomon/laravel-saby-api
This package will be auto-discovered by Laravel via the service provider configured in composer.json.
Publishing Configuration
Publish the configuration file with:
php artisan vendor:publish --tag=saby-api-config
This creates a config/saby-api.php file.
Configuration
In your .env file, add the following:
SABY_APP_CLIENT_ID=your-client-id SABY_APP_SECRET=your-app-secret SABY_SECRET_KEY=your-secret-key SABY_BASE_URI=https://api.sbis.ru/retail/ SABY_AUTH_URL=https://online.sbis.ru/oauth/service/ SABY_CLOUD_TIMEOUT=20.0 SABY_TOKEN_TTL=3540 SABY_CACHE_STORE=null
You can customize other settings in config/saby-api.php:
<?php return [ 'app_client_id' => env('SABY_APP_CLIENT_ID'), 'app_secret' => env('SABY_APP_SECRET'), 'secret_key' => env('SABY_SECRET_KEY'), 'base_uri' => env('SABY_BASE_URI', 'https://api.sbis.ru/retail/'), 'auth_url' => env('SABY_AUTH_URL'.'https://online.sbis.ru/oauth/service/'), 'timeout' => env('SABY_CLOUD_TIMEOUT', 20.0), 'token_cache_ttl' => env('SABY_TOKEN_TTL', 60 * 59), // 59 мин 'cache_store' => env('SABY_CACHE_STORE', null), // null → driver по-умолчанию ];
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This package is open-sourced under the MIT license. See the LICENSE file for details.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-16