定制 rat.md/laravel-ebay-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 Logo

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.

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.

  1. Open this URL in your browser
  2. Sign in using your Sandbox account (not your production one)
  3. Grant access for the requested scopes
  4. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 rat.md/laravel-ebay-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 22
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-08