PHPackages                             enriconardo/laravel-ecommerce-layer - 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. [Framework](/categories/framework)
4. /
5. enriconardo/laravel-ecommerce-layer

ActiveLibrary[Framework](/categories/framework)

enriconardo/laravel-ecommerce-layer
===================================

A layer of ecommerce functionalities for Laravel

0102PHP

Since May 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/enriconardo/laravel-ecommerce-layer)[ Packagist](https://packagist.org/packages/enriconardo/laravel-ecommerce-layer)[ RSS](/packages/enriconardo-laravel-ecommerce-layer/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

Laravel Ecommerce Layer
=======================

[](#laravel-ecommerce-layer)

This is a work in progress project.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require enriconardo/laravel-ecommerce-layer:dev-master
```

### Enable Subscriptions handler

[](#enable-subscriptions-handler)

If you decide to use subscriptions, in order to regularly check the subscriptions status and automatically renew or cancel them, you have to schedule the proper task in the file `app\Console\Kernel.php` of your application:

```
protected function schedule(Schedule $schedule): void
{
    // You can schedule with the frequency you like
    $schedule->job(new \EcommerceLayer\Jobs\RenewSubscriptions)->hourly();
}
```

Usage
-----

[](#usage)

### Publish configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="EcommerceLayer\Providers\ServiceProvider" --tag=config
```

### Using a payment gateway in your code

[](#using-a-payment-gateway-in-your-code)

```
/** @var \EcommerceLayer\Gateways\GatewayProviderInterface $gateway */
$gateway = gateway('your_gateway_identifier');
```

Authentication
--------------

[](#authentication)

Laravel Ecommerce Layer doesn't implement an authentication flow, this should be a responsability of the main application where it is installed.

In order to set an authentication guard, add the right middleware to the group of middlewares attached to the Laravel Ecommerce Layer routes by updating the configuration file. First of all publish the configuration file, like reported [here](#publish-configuration), then change the following attribute:

```
# File config/ecommerce-layer.php

'http' => [
    'routes' => [
        'middlewares' => [
            'api', // Don't remove this unless it is really necessary
            'your-custom-middleware' // E.g: auth:api
        ],
    ]
],
```

Adding custom payment gateway
-----------------------------

[](#adding-custom-payment-gateway)

A gateway package is composed by a set of classes:

- A *Main class* which extends `\EcommerceLayer\Gateways\GatewayProviderInterface`
- A *Payment service* class which extends `\EcommerceLayer\Gateways\PaymentServiceInterface`
- A *Customer service* class which extends `\EcommerceLayer\Gateways\CustomerServiceInterface`

In order to enable the gateway, just add the following line of code in the `register` function of one of your service provider:

```
/**
* Register the application services.
*/
public function register()
{
    // ...

    // Enable the gateways
    $this->app->make(GatewayProviderFactory::class)->enableGateway(new YourMainClass);

    // ...
}
```

`YourMainClass` is your actual *Main class* described before.

Then you need to add a proper record in the database, to do this just type the following command:

```
php artisan ecommerce-layer:gateway:create {name} {identifier}
```

Where `name` is a label for your Gateway (eg: Stripe) and `identifier` is a value for the system to distinguish it from others (eg: your-identifier). Do not use spaces.

ISO standards
-------------

[](#iso-standards)

ISO standards for currencies, countries, languages and HTTP status codes are handled by PHP enums of the `prinsfrank/standards` package. Check it on [Github](https://github.com/PrinsFrank/standards).

In the *Laravel Ecommerce Layer*, the ISO standards used are:

- **ISO4217\_Alpha\_3** for currencies (three letters)
- **ISO3166\_1\_Alpha\_2** for countries (two letters)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

To Do
-----

[](#to-do)

- Adding discounts management
- Tax management
- Shipping

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/da4414213604d43e1c75be0de893b2d6b79a4b7f744b2db288f2cbd1bcef193b?d=identicon)[Stairmaster50](/maintainers/Stairmaster50)

### Embed Badge

![Health badge](/badges/enriconardo-laravel-ecommerce-layer/health.svg)

```
[![Health](https://phpackages.com/badges/enriconardo-laravel-ecommerce-layer/health.svg)](https://phpackages.com/packages/enriconardo-laravel-ecommerce-layer)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M298](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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