PHPackages                             eoc/ebay-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. eoc/ebay-laravel

ActiveLibrary[API Development](/categories/api)

eoc/ebay-laravel
================

This package is wrapper for php Ebay sdk for laravel to automate all the configurations and make the skd ready to use.

v1.1.1(4y ago)049MITPHPPHP &gt;=5.5

Since Oct 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/areghunanyan/ebay-laravel)[ Packagist](https://packagist.org/packages/eoc/ebay-laravel)[ RSS](/packages/eoc-ebay-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Ebay Laravel
============

[](#ebay-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/cc4bfcf57fed4b802ac95036a81f3d08a69c72ffe0722d732b5b3cc724d4d2c8/68747470733a2f2f706f7365722e707567782e6f72672f656f632f656261792d6c61726176656c2f76)](//packagist.org/packages/eoc/ebay-laravel)[![Total Downloads](https://camo.githubusercontent.com/f6421e8c53bd1ac31bd748b6e91a67938460c28ba89ec1abf7025480780884e4/68747470733a2f2f706f7365722e707567782e6f72672f656f632f656261792d6c61726176656c2f646f776e6c6f616473)](//packagist.org/packages/eoc/ebay-laravel)[![Monthly Downloads](https://camo.githubusercontent.com/96c5c8958c47c962ce292088c6c8f18ebe099a4752da897230ce5ad2b4ecb21f/68747470733a2f2f706f7365722e707567782e6f72672f656f632f656261792d6c61726176656c2f642f6d6f6e74686c79)](//packagist.org/packages/eoc/ebay-laravel)[![License](https://camo.githubusercontent.com/c45bc6506cde1d5904459da3230f49590c700ac04fee947eea0b2be5f5c51266/68747470733a2f2f706f7365722e707567782e6f72672f656f632f656261792d6c61726176656c2f6c6963656e7365)](//packagist.org/packages/eoc/ebay-laravel)

This package is based on [Ebay SDK](https://packagist.org/packages/eoc/ebay-laravel-sdk) written by Areg Hunanyan. This package will organize all the configuration according to laravel and make you use the SDK with out doing any exceptional work or configurations.

Getting Started
---------------

[](#getting-started)

Follow the instruction to install and use this package.

### Prerequisites

[](#prerequisites)

This is package use \[**Ebay Laravel SDK**\]

### Installing

[](#installing)

Add Ebay-Laravel to your composer file via the composer require command:

```
$ composer require eoc/ebay-laravel
```

Or add it to `composer.json` manually:

```
"require": {
    "eoc/ebay-laravel": "^1.1.1"
}
```

Register the service provider by adding it to the providers key in config/app.php. Also register the facade by adding it to the aliases key in config/app.php.

**Laravel 5.1 or greater**

```
'providers' => [
    ...
    Hkonnet\LaravelEbay\EbayServiceProvider::class,
],

'aliases' => [
    ...
    'Ebay' => Hkonnet\LaravelEbay\Facade\Ebay::class,
]
```

**Laravel 5**

```
'providers' => [
    ...
    'Hkonnet\LaravelEbay\EbayServiceProvider',
],

'aliases' => [
    ...
    'Ebay' => 'Hkonnet\LaravelEbay\Facade\Ebay',
]
```

Next to get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish --provider="Hkonnet\LaravelEbay\EbayServiceProvider"
```

This will create a config/ebay.php file in your app that you can modify to set your configuration.

\###Configuration After installation, you will need to add your ebay settings. Following is the code you will find in config/ebay.php, which you should update accordingly.

```
return [
    'mode' => env('EBAY_MODE', 'sandbox'),

    'siteId' => env('EBAY_SITE_ID','0'),

    'sandbox' => [
        'credentials' => [
            'devId' => env('EBAY_SANDBOX_DEV_ID'),
            'appId' => env('EBAY_SANDBOX_APP_ID'),
            'certId' => env('EBAY_SANDBOX_CERT_ID'),
        ],
        'authToken' => env('EBAY_SANDBOX_AUTH_TOKEN'),
        'oauthUserToken' => env('EBAY_SANDBOX_OAUTH_USER_TOKEN'),
    ],
    'production' => [
        'credentials' => [
            'devId' => env('EBAY_PROD_DEV_ID'),
            'appId' => env('EBAY_PROD_APP_ID'),
            'certId' => env('EBAY_PROD_CERT_ID'),
        ],
        'authToken' => env('EBAY_PROD_AUTH_TOKEN'),
        'oauthUserToken' => env('EBAY_PROD_OAUTH_USER_TOKEN'),
    ]
];
```

Usage
-----

[](#usage)

Following are few examples for using this package.

### Ex 1: Get the official eBay time

[](#ex-1-get-the-official-ebay-time)

Following are the two ways you can do it

**Method 1:**

```
use \Hkonnet\LaravelEbay\EbayServices;
use \DTS\eBaySDK\Shopping\Types;

// Create the service object.
$ebay_service = new EbayServices();
$service = $ebay_service->createShopping();

// Create the request object.
$request = new Types\GeteBayTimeRequestType();

// Send the request to the service operation.
$response = $service->geteBayTime($request);

// Output the result of calling the service operation.
printf("The official eBay time is: %s\n", $response->Timestamp->format('H:i (\G\M\T) \o\n l jS Y'));
```

**Method 2:**

> **Tip:** If you prefer to use **DTS** library class you need to pass the configuration.

```
use \DTS\eBaySDK\Shopping\Services;
use \DTS\eBaySDK\Shopping\Types;

$config = Ebay::getConfig();

// Create the service object.
$service = new Services\ShoppingService($config);

// Create the request object.
$request = new Types\GeteBayTimeRequestType();

// Send the request to the service operation.
$response = $service->geteBayTime($request);

// Output the result of calling the service operation.
printf("The official eBay time is: %s\n", $response->Timestamp->format('H:i (\G\M\T) \o\n l jS Y'));
```

### Ex 2: Find items by keyword

[](#ex-2-find-items-by-keyword)

This example will call the findItemsByKeywords operation

**Method 1:**

```
use \Hkonnet\LaravelEbay\EbayServices;
use \DTS\eBaySDK\Finding\Types;

// Create the service object.
    $ebay_service = new EbayServices();
    $service = $ebay_service->createFinding();

// Assign the keywords.
    $request = new Types\FindItemsByKeywordsRequest();
    $request->keywords = 'Harry Potter';

// Ask for the first 25 items.
    $request->paginationInput = new Types\PaginationInput();
    $request->paginationInput->entriesPerPage = 25;
    $request->paginationInput->pageNumber = 1;

// Ask for the results to be sorted from high to low price.
    $request->sortOrder = 'CurrentPriceHighest';

    $response = $service->findItemsByKeywords($request);

    // Output the response from the API.
    if ($response->ack !== 'Success') {
        foreach ($response->errorMessage->error as $error) {
            printf("Error: %s ", $error->message);
        }
    } else {
        foreach ($response->searchResult->item as $item) {
            printf("(%s) %s:%.2f ", $item->itemId, $item->title, $item->sellingStatus->currentPrice->value);
        }
    }
```

**Method 2:**

```
use DTS\eBaySDK\Finding\Services\FindingService;
use \DTS\eBaySDK\Finding\Types;

// Create the service object.
    $config = Ebay::getConfig();
    $service = new FindingService($config);

// Assign the keywords.
    $request = new Types\FindItemsByKeywordsRequest();
    $request->keywords = 'Harry Potter';

// Ask for the first 25 items.
    $request->paginationInput = new Types\PaginationInput();
    $request->paginationInput->entriesPerPage = 25;
    $request->paginationInput->pageNumber = 1;

// Ask for the results to be sorted from high to low price.
    $request->sortOrder = 'CurrentPriceHighest';

    $response = $service->findItemsByKeywords($request);

    // Output the response from the API.
    if ($response->ack !== 'Success') {
        foreach ($response->errorMessage->error as $error) {
            printf("Error: %s ", $error->message);
        }
    } else {
        foreach ($response->searchResult->item as $item) {
            printf("(%s) %s:%.2f ", $item->itemId, $item->title, $item->sellingStatus->currentPrice->value);
        }
    }
```

### Ex 3. Get my ebay selling

[](#ex-3-get-my-ebay-selling)

```
use \DTS\eBaySDK\Constants;
use \DTS\eBaySDK\Trading\Types;
use \DTS\eBaySDK\Trading\Enums;
use \Hkonnet\LaravelEbay\EbayServices;

/**
 * Create the service object.
 */
$ebay_service = new EbayServices();
$service = $ebay_service->createTrading();

/**
 * Create the request object.
 */
$request = new Types\GetMyeBaySellingRequestType();

/**
 * An user token is required when using the Trading service.
 */
$request->RequesterCredentials = new Types\CustomSecurityHeaderType();
$authToken = Ebay::getAuthToken();
$request->RequesterCredentials->eBayAuthToken = $authToken;

/**
 * Request that eBay returns the list of actively selling items.
 * We want 10 items per page and they should be sorted in descending order by the current price.
 */
$request->ActiveList = new Types\ItemListCustomizationType();
$request->ActiveList->Include = true;
$request->ActiveList->Pagination = new Types\PaginationType();
$request->ActiveList->Pagination->EntriesPerPage = 10;
$request->ActiveList->Sort = Enums\ItemSortTypeCodeType::C_CURRENT_PRICE_DESCENDING;
$pageNum = 1;

do {
    $request->ActiveList->Pagination->PageNumber = $pageNum;

    /**
     * Send the request.
     */
    $response = $service->getMyeBaySelling($request);

    /**
     * Output the result of calling the service operation.
     */
    echo "==================\nResults for page $pageNum\n==================\n";
    if (isset($response->Errors)) {
        foreach ($response->Errors as $error) {
            printf(
                "%s: %s\n%s\n\n",
                $error->SeverityCode === Enums\SeverityCodeType::C_ERROR ? 'Error' : 'Warning',
                $error->ShortMessage,
                $error->LongMessage
            );
        }
    }
    if ($response->Ack !== 'Failure' && isset($response->ActiveList)) {
        foreach ($response->ActiveList->ItemArray->Item as $item) {
            printf(
                "(%s) %s: %s %.2f\n",
                $item->ItemID,
                $item->Title,
                $item->SellingStatus->CurrentPrice->currencyID,
                $item->SellingStatus->CurrentPrice->value
            );
        }
    }
    $pageNum += 1;
} while (isset($response->ActiveList) && $pageNum ActiveList->PaginationResult->TotalNumberOfPages);
```

> **Note:**
>
> - Follow above examples but read the Important note below.

Important Note
--------------

[](#important-note)

Using method 1 in both examples we did

```
use \Hkonnet\LaravelEbay\EbayServices;
// Create the service object.
$ebay_service = new EbayServices();
$service = $ebay_service->createFinding();
```

to get service object..

Following methods are available to create services using `EbayServices` class.

- createAccount(array $args = \[\])
- createAnalytics(array $args = \[\])
- createBrowse(array $args = \[\])
- createBulkDataExchange(array $args = \[\])
- createBusinessPoliciesManagement(array $args = \[\])
- createFeedback(array $args = \[\])
- createFileTransfer(array $args = \[\])
- createFinding(array $args = \[\])
- createFulfillment(array $args = \[\])
- createHalfFinding(array $args = \[\])
- createInventory(array $args = \[\])
- createMarketing(array $args = \[\])
- createMerchandising(array $args = \[\])
- createMetadata(array $args = \[\])
- createOrder(array $args = \[\])
- createPostOrder(array $args = \[\])
- createProduct(array $args = \[\])
- createProductMetadata(array $args = \[\])
- createRelatedItemsManagement(array $args = \[\])
- createResolutionCaseManagement(array $args = \[\])
- createReturnManagement(array $args = \[\])
- createShopping(array $args = \[\])
- createTrading(array $args = \[\])

These services methods can be used to get appropriate service object to perform operations on Ebay.

Author
------

[](#author)

- **Areg Hunanyan** - *Initial work*

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1675d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/32f8ee4eb6b5179e1d07b9c8b1204ac61b2e9e1723100e2865f3f22b7559a86a?d=identicon)[Areg](/maintainers/Areg)

---

Top Contributors

[![areghunanyan](https://avatars.githubusercontent.com/u/5212315?v=4)](https://github.com/areghunanyan "areghunanyan (2 commits)")

---

Tags

phpapilaravelsdklaravel5ebay

### Embed Badge

![Health badge](/badges/eoc-ebay-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/eoc-ebay-laravel/health.svg)](https://phpackages.com/packages/eoc-ebay-laravel)
```

###  Alternatives

[hkonnet/laravel-ebay

This package is wrapper for php Ebay sdk for laravel to automate all the configurations and make the skd ready to use.

3952.6k](/packages/hkonnet-laravel-ebay)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
