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

ActiveLibrary

descom/redsys
=============

A PHP package to platform Redsys

1.9.0(1y ago)010.5k↓33.3%[1 PRs](https://github.com/descom-es/redsys/pulls)1MITPHPPHP ^8.3CI passing

Since Sep 6Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/descom-es/redsys)[ Packagist](https://packagist.org/packages/descom/redsys)[ Docs](https://github.com/descom/redsys)[ RSS](/packages/descom-redsys/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (24)Used By (1)

Redsys
======

[](#redsys)

A PHP package to platform Redsys

[![tests](https://github.com/descom-es/redsys/actions/workflows/test.yml/badge.svg)](https://github.com/descom-es/redsys/actions/workflows/test.yml)[![analyse](https://github.com/descom-es/redsys/actions/workflows/analyse.yml/badge.svg)](https://github.com/descom-es/redsys/actions/workflows/analyse.yml)[![Fix Styles](https://github.com/descom-es/redsys/actions/workflows/fix_style.yml/badge.svg)](https://github.com/descom-es/redsys/actions/workflows/fix_style.yml)

Install
-------

[](#install)

Via Composer

```
composer require descom/redsys
```

Usage
-----

[](#usage)

### Generate Redirect From to payment

[](#generate-redirect-from-to-payment)

```
use Descom\Redsys\Redsys;

$redsys = Redsys::sandbox([
    'code' => 999008881,
    'terminal' => 1,
    'signatureKey' => 'sq7HjrUOBfKmC576ILgskD5srU870gJ7',
]);

$orderId = '123456';
$amount = 12.05;

echo $redsys
    ->redirect()
    ->generateRedirectPayment($orderId, $amount, 'http://localhost:8000')
    // ->description('description about the order products') optional DS_MERCHANT_PRODUCTDESCRIPTION
    // ->merchantName('rename merchant name') optional DS_MERCHANT_MERCHANTNAME
    // ->data('internal data, to read in response') optional DS_MERCHANT_MERCHANTDATA
    // ->merchantPaymethods('z') // optional payment with Bizum
    ->redirect();
```

### Capture payment notification

[](#capture-payment-notification)

```
use Descom\Redsys\Redsys;

$redsys = Redsys::sandbox([
    'code' => 999008881,
    'terminal' => 1,
    'signatureKey' => 'sq7HjrUOBfKmC576ILgskD5srU870gJ7',
]);

$response = $redsys->redirect()->capturePaymentNotification($_POST);

if (! $response->successful()) {
    $orderId = $response->orderId;
    $errorCode = $response->errorCode;
    $responseCode = $response->responseCode;
    // $responseData = $response->toArray();

    throw new \Exception("Error processing payment [$orderId]  [$errorCode]", $responseCode);
}

$orderId = $response->orderId;
$authorizationCode = $response->authorizationCode;
$amount = $response->amount;

//
```

Testing
-------

[](#testing)

```
composer test
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance56

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~45 days

Total

22

Last Release

404d ago

PHP version history (3 changes)v1.0.0PHP ^8.0

1.5.1PHP ^8.2

1.9.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25681494?v=4)[Cesar Garcia](/maintainers/cesargb)[@cesargb](https://github.com/cesargb)

---

Top Contributors

[![cesargb](https://avatars.githubusercontent.com/u/25681494?v=4)](https://github.com/cesargb "cesargb (44 commits)")[![llorensjj](https://avatars.githubusercontent.com/u/7073372?v=4)](https://github.com/llorensjj "llorensjj (2 commits)")

---

Tags

laravel

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[deeplcom/deepl-php

Official DeepL API Client Library

2616.2M66](/packages/deeplcom-deepl-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)

PHPackages © 2026

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