rat.md/laravel-ebay-sdk
Composer 安装命令:
composer require rat.md/laravel-ebay-sdk
包简介
A Laravel eBay SDK for integrating with all eBay APIs, featuring OAuth authentication, webhook notifications, event handling, and practical utilities for common workflows.
关键字:
README 文档
README
Laravel is an accessible and powerful PHP web application framework with an expressive and elegant syntax.
eBay SDK for Laravel
Caution
This is an work-in-progress eBay SDK in an alpha stage. Not all APIs have been fully tested or can be tested due to user, marketplace, country restrictions, or sandbox limitations. While the SDK should be usable, breaking changes may occur at any time, including minor releases.
A Laravel SDK for integrating with eBay APIs, featuring OAuth authentication, webhook notifications, event handling, and practical utilities for common workflows. The SDK supports both Modern REST APIs and Traditional (XML/SOAP) eBay APIs and is designed to evolve alongside eBay’s platform.
- Documentation Page
- OAuth Authorize with eBay
- Receive eBay Platform Notifications
- Handle Marketplace Account Deletions
Features
- OAuth 2.0 authentication flow (authorization and callback).
- Support for Platform Notifications and Marketplace Account Deletions.
- Optional route and controller integration for OAuth, Marketplace and Webhooks.
- Support for Modern REST APIs and Traditional XML/SOAP APIs (XML-only).
- Dispatches Laravel events for all supported eBay notification types.
Requirements
- PHP ≥ 8.2
- Laravel ≥ 11 | ≥ 12 | ≥ 13
Tip
We strongly recommend a task-scheduling enabled and queue-based Laravel setup to handle performance-intensive processes and, most importantly, to process eBay webhook notifications in a compliant and reliable manner (See Configuration).
Installation
Install the package via composer:
composer require rat.md/laravel-ebay-sdk
Publish the configuration file with:
php artisan vendor:publish --tag="ebay-sdk-config"
Basic Usage
Visit the Documentation Page for more details
use Rat\eBaySDK\API\InventoryAPI\InventoryItem\GetInventoryItem; use Rat\eBaySDK\Client; $client = new Client(); $client->setRefreshToken($refreshToken); $response = $client->execute(new GetInventoryItem('MyCustomSKU'));
Testing
To run the test suite, you first need to provide your eBay Sandbox credentials. So, create an
.env.testing file in the package root directory with the following details:
EBAY_CLIENT_ID='<Your Sandbox Client ID>' EBAY_CLIENT_SECRET='<Your Sandbox Client Secret>' EBAY_REDIRECT_URI='<Your Sandbox Redirect URI>' EBAY_DEV_ID='<Your Sandbox Dev ID>' EBAY_API_ENVIRONMENT='sandbox' EBAY_CACHING=false EBAY_DEBUG=true EBAY_LOCALE='<Your-Language>' EBAY_COMPATIBILITY_LEVEL=1395 EBAY_SITE_ID=16
If you're unsure about your EBAY_SITE_ID refer to src/Enums/SiteCode.php
or the official documentation page at developer.ebay.com
Install the required composer dependencies using:
composer install
Now, generate a valid and working refresh token using Testbench:
./vendor/bin/testbench ebay:authorize --testing
This will output an authorization URL in the console.
- Open this URL in your browser
- Sign in using your Sandbox account (not your production one)
- Grant access for the requested scopes
- After successful authorization, you will be redirected to eBay's oAuth page
Once you see the success message, copy the full redirected URL and pass it back to the command (and Yes, the quotes matter. Especially on Windows, where everything breaks if you blink wrong.)
./vendor/bin/testbench ebay:authorize "https://auth2.ebay.com/..." --testing
If the .env.testing file exists, the command will automatically create or update your
PEST_EBAY_REFRESH_TOKEN=<token>, if not, the token will be printed to the console instead.
Once the refresh token is available, you can run the tests using:
./vendor/bin/pest
Changelog
We provide an aggregated list of eBay API changes on our documentation page as well as via RSS feeds.
For changes specific to this Laravel package, please refer to the CHANGELOG.
License
Published under MIT License
Copyright © 2024 - 2026 Sam @ rat.md
This software is not an official eBay product and is not associated with, sponsored by, or endorsed by eBay Inc.
rat.md/laravel-ebay-sdk 适用场景与选型建议
rat.md/laravel-ebay-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 01 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「sdk」 「laravel」 「ebay」 「http-client」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rat.md/laravel-ebay-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rat.md/laravel-ebay-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rat.md/laravel-ebay-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Alfabank REST API integration
Laravel package for Accurate Online API integration.
A lightweight plain-PHP framework for database-backed CRUD APIs.
Shared RCX Laravel DataTables UI and configuration helpers.
Boot a Laravel project on any machine with one command: app:serve installs missing tools (PHP, Node, Composer, Herd, Docker), creates .env, sets up the database, runs migrations, builds assets, starts a queue worker and serves via Herd, Sail or artisan serve; app:down cleanly stops everything it sta
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-08