A Laravel-optimized PHP client library for Sendeo API integration.
This library simplifies communication with Sendeo API, providing methods for tracking, canceling deliveries, and more.
To install this package, run the following command in your Laravel project:
composer require orhanozyalcin/sendeo-client-laravel
This package uses Laravel's Package Discovery, so no manual configuration is required. However, ensure the following is properly set up:
After installing the package, publish the configuration file to your Laravel project:
php artisan vendor:publish --tag=sendeo_config
- The
SendeoServiceProvider
is automatically registered.
- The
Sendeo
alias is automatically added for easy usage.
### Example .env Configuration
# Live
SENDEO_API_ID=YourProductionApiID
SENDEO_API_PASSWORD=YourProductionApiPassword
SENDEO_API_URL=https://api.sendeo.com.tr
# Test
SENDEO_API_TEST_URL=https://api-dev.sendeo.com.tr
SENDEO_TEST_MODE=true
You can interact with the Sendeo API using the Sendeo
facade:
use Sendeo;
use SendeoClientLaravel\Models\TrackDelivery;
// Example: Track a delivery
$trackDelivery = new TrackDelivery('TRACK123456', 'REF123456');
$response = Sendeo::trackDelivery('auth-token', $trackDelivery);
dd($response);
Alternatively, you can resolve the SendeoClient
service from the container:
use SendeoClientLaravel\Models\CancelDelivery;
$sendeoClient = app('sendeo-client');
// Example: Cancel a delivery
$cancelDelivery = new CancelDelivery('TRACK123456', 'REF123456');
$response = $sendeoClient->cancelDelivery('auth-token', $cancelDelivery);
dd($response);
// Usage: web.php or api.php file in Laravel
// use SendeoClientLaravel\Models\SendeoTestRoutes;
// SendeoTestRoutes::routes();
use SendeoClientLaravel\Models\LoginAES;
$loginUser = new LoginAES('TestUserName', 'TestPassWord');
$response = Sendeo::login($loginUser);
use SendeoClientLaravel\Models\TrackDelivery;
$trackDelivery = new TrackDelivery('TRACK123456', 'REF123456');
$response = Sendeo::trackDelivery('auth-token', $trackDelivery);
use SendeoClientLaravel\Models\CancelDelivery;
$cancelDelivery = new CancelDelivery('TRACK123456', 'REF123456');
$response = Sendeo::cancelDelivery('auth-token', $cancelDelivery);
Coming Soon!
- PHP: ^8.0
- Laravel: ^9.0 | ^10.0
- Sendeo API Access
Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.
This package is licensed under the MIT License. See the LICENSE file for more details.
Orhan Özyalçın
[email protected]