dropday-io/laravel
Composer 安装命令:
composer require dropday-io/laravel
包简介
Laravel integration for Dropday dropshipping fulfillment.
README 文档
README
Official Laravel package for the Dropday API — GitHub · API docs
Send orders to dropshipping suppliers and track fulfillment status from your Laravel application.
Dropday is an order automation platform that connects your store to dropshipping suppliers. You push an order through the API; Dropday routes it to the right supplier, handles the fulfillment flow, and keeps you updated on the status.
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
Installation
composer require dropday-io/laravel
The service provider and Dropday facade are registered automatically via Laravel's package auto-discovery.
Publish the config file:
php artisan vendor:publish --provider="Dropday\Dropday\DropdayServiceProvider"
Configuration
Add your credentials to .env:
DROPDAY_API_KEY=your-api-key DROPDAY_ACCOUNT_ID=your-account-id
Both values are available in your Dropday account settings. If you don't have an account yet, sign up at dropday.io.
The config also exposes DROPDAY_BASE_URL if you need to point at a staging endpoint.
Usage
You can use the facade or dependency injection.
Facade
use Dropday\Dropday\Facades\Dropday; $order = Dropday::createOrder([ 'external_id' => 'your-internal-order-id', 'shipping_address' => [ 'first_name' => 'Jane', 'last_name' => 'Doe', 'address1' => '123 Main St', 'city' => 'Amsterdam', 'country' => 'NL', 'postcode' => '1234AB', ], 'products' => [ ['sku' => 'PROD-001', 'quantity' => 1], ], ]);
Dependency injection
use Dropday\Dropday\Dropday; class OrderController extends Controller { public function __construct(protected Dropday $dropday) {} public function store(Request $request): JsonResponse { $result = $this->dropday->createOrder($request->validated()); return response()->json($result); } }
Available methods
// Submit a new order for fulfillment Dropday::createOrder(array $data): array // List orders, optionally filtered Dropday::getOrders(array $filters = []): array // Retrieve a single order by its Dropday reference ID Dropday::getOrder(string $reference): array
Filter keys for getOrders: statuses, per_page, page, date_from, date_to, external_id, source.
Duplicate orders: if you submit an order with an external_id that already exists, Dropday returns HTTP 200 with "Order already exists" in the message key rather than an error.
For full request/response shapes, see the Dropday API docs.
Test mode
Pass "test" => true in any order payload during development. Dropday will process the order through the full validation flow but skip actual supplier routing.
Dropday::createOrder([ 'external_id' => 'test-order-001', 'test' => true, // ... ]);
Error handling
| Situation | Behaviour |
|---|---|
| Validation failure (422) | Throws Dropday\Dropday\Exceptions\DropdayException |
| Any other HTTP error | Throws Illuminate\Http\Client\RequestException |
Duplicate external_id |
Returns 200; check $result['message'] |
use Dropday\Dropday\Exceptions\DropdayException; use Illuminate\Http\Client\RequestException; try { $order = Dropday::createOrder($data); } catch (DropdayException $e) { // HTTP 422 — validation error } catch (RequestException $e) { // Network or server error }
Testing
Use Laravel's Http::fake() to mock Dropday responses without hitting the real API:
use Illuminate\Support\Facades\Http; Http::fake([ '*/orders' => Http::response(['id' => 'ORD-1', 'status' => 'pending'], 200), ]); $result = Dropday::createOrder(['external_id' => 'test-1', 'test' => true]); expect($result['status'])->toBe('pending');
Get started with Dropday
- Create a Dropday account
- Copy your API key and account ID from the account settings
- Add them to your
.envand start sending orders
Browse the full API reference for available fields, order statuses, and webhook events.
Changelog
See CHANGELOG.md for a full history of changes.
License
MIT
dropday-io/laravel 适用场景与选型建议
dropday-io/laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「ecommerce」 「api」 「fulfillment」 「laravel」 「Dropshipping」 「dropday」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dropday-io/laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dropday-io/laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dropday-io/laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Linker Cloud Fulfillment Platform API Client library
Magento 2 Twisto payment gateway
Nevogate Payment Gateway SDK
Dealing with payments through the Egyptian payment gateway PayMob
A PSR-7 compatible library for making CRUD API endpoints
A PHP (and Laravel) package to interface with the Snipcart api.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 42
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-06