cserepesmark/laravel-csomagpiac
最新稳定版本:1.2.0
Composer 安装命令:
composer require cserepesmark/laravel-csomagpiac
包简介
Csomagpiac API integration for Laravel
README 文档
README
This is a wrapper for the Csomagpiac API v1, which utilizes Laravel's built-in HTTP Requests class. The package manages authentication using a universal token. In its absence, it can also request the necessary token using a username + password combination. The token obtained in this manner is cached for faster access. The package supports switching between demo and production environments (demo vs. bestr).
API Documentation: Csomagpiac API v1
Installation
Requires
To get started with package, simply install it via Composer:
composer require cserepesmark/laravel-csomagpiac
Configuration
The packages support the use of either a universal token or a username and password. However, the package prioritizes the use of the universal token.
Configure your API credentials in .env
CSOMAGPIAC_TOKEN= CSOMAGPIAC_USERNAME= CSOMAGPIAC_PASSWORD=
or in config/csomagpiac.php file:
'token' => env('CSOMAGPIAC_TOKEN', null), 'username' => env('CSOMAGPIAC_USERNAME', null), 'password' => env('CSOMAGPIAC_PASSWORD', null),
You can also easily switch between environments in .env
CSOMAGPIAC_LIVE_ENV=
or in config/csomagpiac.php file:
'live_env' => env('CSOMAGPIAC_LIVE_ENV', false),
Usage
See /examples folder
Shipment
| ShipmentService method | API Name | API Endpoint |
|---|---|---|
| createShipment | new shipment | shipment/new |
| downloadShipmentLabel | download shipment label | shipment/download |
| deleteShipment | delete shipment | shipment/delete |
| listShipments | list of shipments | shipment/list |
| getShipmentStatus | shipment status | shipment/status |
| listShipmentHistories | shipment history | shipment/history |
| listAllStatuses | statuses | shipment/statuses |
MPL Close
| ShipmentService method | API Name | API Endpoint |
|---|---|---|
| handleMplClose | mplClose | mplclose |
| listMplCloses | mplClosesList | mplcloseslist |
| downloadMplClose | mplClosePdf | mplclosepdf |
Other
| ShipmentService method | API Name | API Endpoint |
|---|---|---|
| listPickupPoints | pickuppoints | pickuppoints |
| listLocations | pdpoints | locations/list |
| listServices | services | client/services |
| listLocationTypes | pdpointTypes | locations/types |
| listHandlers | handlers | handlers |
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-23