PHPackages                             pythagus/laravel-lydia - 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. [Payment Processing](/categories/payments)
4. /
5. pythagus/laravel-lydia

ActivePackage[Payment Processing](/categories/payments)

pythagus/laravel-lydia
======================

Package to use Lydia payment way with Laravel

v2.0.5(4y ago)085MITPHPPHP ^7.3|^8.0

Since Nov 20Pushed 4y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

Lydia payment
=============

[](#lydia-payment)

[Lydia](https://lydia-app.com/fr) is an online-payment solution. This package presents an implementation of this tool in an Object-Oriented view. This package is an overlay for Laravel. For any Lydia internal specification, please check the [Lydia package documentation](https://github.com/Pythagus/lydia).

Version
-------

[](#version)

This package works since Laravel 7.x. Please refer to the next table to check whether your PHP version is compatible with this package.

Package versionLaravel version1.x7.x, 8.xInstallation
------------

[](#installation)

You can install the package with [composer](https://getcomposer.org/) executing:

```
composer require pythagus/laravel-lydia
```

Usage
-----

[](#usage)

This is the features included with this package:

### Configuration

[](#configuration)

You can execute the following command to generate the `config/lydia.php` config file:

```
php artisan vendor:publish --tag=lydia-config
```

The generated config file searchs in the `.env` file the following arguments:

```
LYDIA_DEBUG=false
LYDIA_DEBUG_VENDOR_TOKEN="Your-Token"
LYDIA_DEBUG_PRIVATE_TOKEN="Your-Token"
LYDIA_PRODUCTION_VENDOR_TOKEN="Your-Token"
LYDIA_PRODUCTION_PRIVATE_TOKEN="Your-Token"
```

### Lydia Facade

[](#lydia-facade)

The `Pythagus/Lydia/Lydia` file overrides the basic Lydia facade to be more Laravel-friendly. If you want to change some things in this file, just extend this file and add in your `AppServiceProvider.register()` method:

```
use Pythagus\LaravelLydia\Lydia as OldLydia;

OldLydia::setInstance(new YourLydia()) ;
```

This facade uses a `$savePaymentCallback` attribute that should be set if you want your application fully working. This callable takes an argument (array) that should be saved in your database. This package is provided with a default model:

#### PaymentLydia model

[](#paymentlydia-model)

The `Pythagus/LaravelLydia/Models/PaymentLydia` model is a Lydia's data possible representation. You can extend this class to custom it, or don't use it at all.

#### CreatePaymentLydiaTable migration

[](#createpaymentlydiatable-migration)

The package is also provided with a default migration implementing the main Lydia's data. Please, check the [provided migration file](src/Database/CreatePaymentLydiaTable.php).

### Error handling

[](#error-handling)

This package is provided with a custom logger allowing you to have a list of the handled Lydia's exceptions. When an exception is raised, It will be added into a log file in `storage/logs/lydia/log-file.log`.

#### Before Laravel 8.x

[](#before-laravel-8x)

In your `App/Exceptions/Handler.php`, add the following lines:

```
use Pythagus\LaravelLydia\Log\LydiaLog;
use Pythagus\Lydia\Contracts\LydiaException;

public function render($request, Throwable $throwable) {
     if($throwable instanceof LydiaException) {
          LydiaLog::report($throwable) ;

          return redirect()->back()->withInput()->withErrors($throwable->getMessage()) ;
     }
}
```

**Note :** this only is an example of what you can do when a `LydiaException` is raised. You can do whatever you want regarding your application's expected behaviour.

#### Since Laravel 8.x

[](#since-laravel-8x)

In your `App/Exceptions/Handler.php`, add the following lines:

```
use Pythagus\LaravelLydia\Log\LydiaLog;

public function register() {
     $this->reportable(LydiaLog::reportableClosure()) ;
}
```

You can grapically manage a `LydiaException` using `$this->renderable()`. Please, check the [Laravel error handling](https://laravel.com/docs/8.x/errors).

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity63

Established project with proven stability

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 ~89 days

Recently: every ~11 days

Total

7

Last Release

1462d ago

Major Versions

v1.0 → v2.02022-03-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34168890?v=4)[Damien MOLINA](/maintainers/Pythagus)[@Pythagus](https://github.com/Pythagus)

### Embed Badge

![Health badge](/badges/pythagus-laravel-lydia/health.svg)

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

###  Alternatives

[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)[cybersource/rest-client-php

Client SDK for CyberSource REST APIs

39881.3k6](/packages/cybersource-rest-client-php)[duncanmcclean/simple-commerce

A simple, yet powerful e-commerce addon for Statamic.

16313.2k2](/packages/duncanmcclean-simple-commerce)[tsaiyihua/laravel-ecpay

ecpay library for laravel

6416.3k](/packages/tsaiyihua-laravel-ecpay)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)

PHPackages © 2026

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