PHPackages                             bahiazul/redsys-virtual-pos - 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. bahiazul/redsys-virtual-pos

ActiveLibrary[Payment Processing](/categories/payments)

bahiazul/redsys-virtual-pos
===========================

Redsys Virtual POS is an unofficial standalone PHP library to handle payments through the spanish payment service Redsys.

v0.5.0(5y ago)43155[2 issues](https://github.com/bahiazul/redsys-virtual-pos/issues)MITPHPPHP &gt;=5.4.0 &lt;8.0

Since Oct 20Pushed 5y ago2 watchersCompare

[ Source](https://github.com/bahiazul/redsys-virtual-pos)[ Packagist](https://packagist.org/packages/bahiazul/redsys-virtual-pos)[ RSS](/packages/bahiazul-redsys-virtual-pos/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (22)Used By (0)

Redsys Virtual POS
==================

[](#redsys-virtual-pos)

[![Build Status](https://camo.githubusercontent.com/6d5f7b93bc9f7b1bd8fb2dd5a425cb884a34ac9e11e35ebf904094404382bfaf/68747470733a2f2f7472617669732d63692e636f6d2f62616869617a756c2f7265647379732d7669727475616c2d706f732e706e673f6272616e63683d6d6173746572)](https://travis-ci.com/bahiazul/redsys-virtual-pos)[![Latest Stable Version](https://camo.githubusercontent.com/6c986ecd967bd4e72174819bcf04500d02e674658e3bae54f3dda99c8ad6d3db/68747470733a2f2f706f7365722e707567782e6f72672f62616869617a756c2f7265647379732d7669727475616c2d706f732f762f737461626c65)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)[![Total Downloads](https://camo.githubusercontent.com/89ec08248d887da3ffdfe250c5296b5996d84614c12f4504471a6bcff0fc24f9/68747470733a2f2f706f7365722e707567782e6f72672f62616869617a756c2f7265647379732d7669727475616c2d706f732f646f776e6c6f616473)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)[![Latest Unstable Version](https://camo.githubusercontent.com/5bbdea1cd1315d45fd9c47fe2d3383837b93743d4689d1236b07c8d172ff3a27/68747470733a2f2f706f7365722e707567782e6f72672f62616869617a756c2f7265647379732d7669727475616c2d706f732f762f756e737461626c65)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)[![License](https://camo.githubusercontent.com/62553cbcedc8b1dad3d8a8f3a633c14d454793d80fd2cbf7f443b9949313b692/68747470733a2f2f706f7365722e707567782e6f72672f62616869617a756c2f7265647379732d7669727475616c2d706f732f6c6963656e7365)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)

**Redsys Virtual POS** is an *unofficial* standalone PHP library to handle payments through the spanish payment service Redsys.

> **NOTE:** This library its still under development and its functionality is subject to change.

Prerequisites
-------------

[](#prerequisites)

- PHP &gt;=5.4.0 &lt;8.0

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

[](#installation)

Installation is recommended through [Composer](https://getcomposer.org/).

```
$ composer require bahiazul/redsys-virtual-pos

```

Sample
------

[](#sample)

Go to the `sample` folder an run the following command in a terminal to start PHP's built-in web server:

```
# install dependencies
$ composer install

# start the server
$ php -S 0.0.0.0:8000

```

Then open your browser and go to [here](http://localhost:8000/).

If you want to test the online (async) response, replace `localhost` with your public IP or hostname, making sure that your machine is accesible through the port 8000 (you can use another port if you want).

Usage
-----

[](#usage)

Basic usage:

```
use Bahiazul\RedsysVirtualPos\Message\WebRequest;
use Bahiazul\RedsysVirtualPos\Field\Currency;
use Bahiazul\RedsysVirtualPos\Field\TransactionType;

$secret       = 'Mk9m98IfEblmPfrpsawt7BmxObt98Jev';
$merchantCode = '999008881';
$terminal     = '871';

// The Environment object holds connection details
$env = new Bahiazul\RedsysVirtualPos\Environment\DevelopmentEnvironment();
$env->setSecret($secret);

// Setup the Parameters for the Request
$params['Amount']             = '145'; // €1,45
$params['Order']              = strval(time());
$params['MerchantCode']       = $merchantCode;
$params['Currency']           = Currency::EUR;
$params['TransactionType']    = TransactionType::STANDARD;
$params['Terminal']           = $terminal;
$params['MerchantName']       = 'Test Store';                        // optional
$params['ProductDescription'] = 'Product Description';               // optional
$params['UrlOk']              = 'http://localhost:8000/success.php'; // optional
$params['UrlKo']              = 'http://localhost:8000/failure.php'; // optional

// Generate the Request
$webRequest = new WebRequest($env);
$webRequest->setParams($params);

// Generate the form
$submitBtn = "";
$wrForm = $webRequest->getForm([], $submitBtn);

// Render the HTML form w/ Submit button
echo $wrForm;
```

See `sample/index.php` and `sample/response.php` for more detailed examples.

Test
----

[](#test)

Run the following command in a terminal:

```
# install dependencies
$ composer install

# run the tests
$ phpunit

```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md)

Authors
-------

[](#authors)

- [Javier Zapata](https://javi.io) ([Twitter](https://twitter.com/jzfgo))

License
-------

[](#license)

MIT

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Recently: every ~3 days

Total

21

Last Release

1864d ago

PHP version history (2 changes)v0.1.0PHP &gt;= 5.4.0

v0.4.7PHP &gt;=5.4.0 &lt;8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68104976?v=4)[Bahiazul Resort Fuerteventura](/maintainers/bahiazul)[@bahiazul](https://github.com/bahiazul)

---

Top Contributors

[![jzfgo](https://avatars.githubusercontent.com/u/79468?v=4)](https://github.com/jzfgo "jzfgo (91 commits)")

---

Tags

composerhandle-paymentslibrarypackagephpposredsysredsys-virtual-posstandalonestandalone-php-librarytpvunofficialwebxmlhtmlpaymentpossermeparedsystpvrefundvirtualpasarelalacaixasabadellpagodevolucionbbva

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bahiazul-redsys-virtual-pos/health.svg)

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

###  Alternatives

[sermepa/sermepa

Pasarela de pago Redsys, Sermepa

207395.1k7](/packages/sermepa-sermepa)[ssheduardo/redsys-laravel

Package redsys for laravel

100129.5k1](/packages/ssheduardo-redsys-laravel)[commerceredsys/sermepa

Payment gateway library for spanish banks that use Sermepa/Redsýs systems.

1062.0k](/packages/commerceredsys-sermepa)

PHPackages © 2026

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