PHPackages                             berarma/cakephp-sermepa - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. berarma/cakephp-sermepa

AbandonedArchivedCakephp-plugin[Utility &amp; Helpers](/categories/utility)

berarma/cakephp-sermepa
=======================

CakePHP Sermepa Plugin

1221PHP

Since Dec 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/berarma/cakephp-sermepa)[ Packagist](https://packagist.org/packages/berarma/cakephp-sermepa)[ RSS](/packages/berarma-cakephp-sermepa/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/cc67308cd81de24884a7b73e8a524bf2320091169f262565316915f30ea33e4f/68747470733a2f2f7472617669732d63692e6f72672f62657261726d612f63616b657068702d7365726d6570612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/berarma/cakephp-sermepa) [![Coverage Status](https://camo.githubusercontent.com/e6855737e7813f9813b7731ab4623e4e9e560a84f32c277748aa4985747fe14a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f62657261726d612f63616b657068702d7365726d6570612f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/berarma/cakephp-sermepa?branch=master)

CakePHP Sermepa Plugin
======================

[](#cakephp-sermepa-plugin)

**NOTICE: This plugin has been discontinued. The new version is available at .**

With this plugin is possible to do online payments using the Sermepa/Redsýs TPV service.

Requirements
------------

[](#requirements)

- CakePHP 2.x

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

[](#installation)

- Copy or clone the files to `app/Plugin/Sermepa`
- Load the plugin in `app/Config/bootstrap.php`, use `CakePlugin::loadAll();`or `CakePlugin::load('Sermepa');`

### Using Composer

[](#using-composer)

Ensure `require` is present in `composer.json`, you can add it with the following command:

```
php composer.phar require berarma/cakephp-sermepa

```

Use
---

[](#use)

Create your configuration like this:

```
$config = array(
    'Sermepa' => array(
      'serviceUrl' => 'https://sis-t.redsys.es:25443/sis/realizarPago', // Testing
      // Use 'https://sis.redsys.es/sis/realizarPago' for the real environment
      'extendedSignature' => false,
      'merchantName' => 'Merchant Name',
      'merchantCode' => '000000001',
      'secretKey' => 'QWERTYASDF0123456789',
      'terminal' => '001',
      'currency' => '978',
      'consumerLanguage' => '1',
      'merchantUrl' => 'http://example.com/get_notification',
    )
  );
```

Setting things up in the Controller:

```
public $components = array('Sermepa');
public $helpers = array('Sermepa');
```

Initiating a transaction in the Controller:

```
$this->Sermepa->createTransaction($orderId, $amount, '0');
```

Rendering the form that sends the user to the TPV in the View:

```
