PHPackages                             ligrila/redsys - 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. ligrila/redsys

ActiveLibrary

ligrila/redsys
==============

BBVA Redsys Payment API implementation with new SHA2 HMAC-256 algorithm

1.1.0(10y ago)130MITPHP

Since Nov 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Ligrila/ligrila_redsys)[ Packagist](https://packagist.org/packages/ligrila/redsys)[ RSS](/packages/ligrila-redsys/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Redsys php implementation
=========================

[](#redsys-php-implementation)

BBVA Redsys Payment API implementation with new SHA2 HMAC-256 algorithm

Install
=======

[](#install)

```
composer require ligrila/redsys
```

Checkout Example
================

[](#checkout-example)

```
use Ligrila\Payment\Redsys;
use Ligrila\Payment\RedsysConfig;
use Ligrila\Payment\RedsysOrder;

$checkoutUrl = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$responseUrl = dirname($checkoutUrl).'/response.php';
$successUrl = dirname($checkoutUrl).'/success.php';
$errorUrl = dirname($checkoutUrl).'/error.php';

$config = new RedsysConfig(
    array(
        'debug' => true,
        'autoRedirect' => false,
        'checkoutLoading' => 'Click on checkout button',
        'checkoutText' => 'Checkout',
        'Ds_Merchant_MerchantCode' => '111111111',
        'Ds_Merchant_Terminal' => '2',
        'Ds_Merchant_Password' => 'password',
        'Ds_Merchant_MerchantURL' => $responseUrl,
        'Ds_Merchant_UrlOK' => $successUrl,
        'Ds_Merchant_UrlKO' => $errorUrl,

    )
);

$order = new RedsysOrder();
    $order->setAmount(100)
    ->setCurrency('GBP')  // ISO 4217 Code
    ->setProductDescription('product1');

$redsys = new Redsys($config);

$html = $redsys->checkout($order);

echo $html;
```

Parse Response Example
======================

[](#parse-response-example)

```
use Ligrila\Payment\Redsys;
use Ligrila\Payment\RedsysConfig;

$config = new RedsysConfig(
    array(
        'debug' => true,
        'autoRedirect' => false,
        'checkoutLoading' => 'Click on checkout button',
        'checkoutText' => 'Checkout',
        'Ds_Merchant_MerchantCode' => '111111',
        'Ds_Merchant_Terminal' => '2',
        'Ds_Merchant_Password' => 'password'

    )
);

$redsys = new Redsys($config);

$result = $redsys->parseResponse();

if ($result['accepted']) {
    //payment accepted
} else {
    //payment refused
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 73.3% 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

3820d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/165fe3564dcd919dd0ab85e468bc76bcfa483ff3d0ba2486db22058748fd081b?d=identicon)[ligrila](/maintainers/ligrila)

---

Top Contributors

[![leandroligrila](https://avatars.githubusercontent.com/u/121796777?v=4)](https://github.com/leandroligrila "leandroligrila (11 commits)")[![lopezlean](https://avatars.githubusercontent.com/u/64272?v=4)](https://github.com/lopezlean "lopezlean (4 commits)")

### Embed Badge

![Health badge](/badges/ligrila-redsys/health.svg)

```
[![Health](https://phpackages.com/badges/ligrila-redsys/health.svg)](https://phpackages.com/packages/ligrila-redsys)
```

PHPackages © 2026

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