2017 © Pedro PelĂĄez
 

cakephp-plugin cakephp-sermepa

CakePHP Sermepa Plugin

image

berarma/cakephp-sermepa

CakePHP Sermepa Plugin

  • Tuesday, June 28, 2016
  • by berarma
  • Repository
  • 1 Watchers
  • 1 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status Coverage Status, (*1)

CakePHP Sermepa Plugin

NOTICE: This plugin has been discontinued. The new version is available at https://github.com/berarma/cakephp-redsys., (*2)

With this plugin is possible to do online payments using the Sermepa/RedsĂœs TPV service., (*3)

Requirements

  • CakePHP 2.x

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

Ensure require is present in composer.json, you can add it with the following command:, (*4)

php composer.phar require berarma/cakephp-sermepa

Use

Create your configuration like this:, (*5)

$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:, (*6)

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

Initiating a transaction in the Controller:, (*7)

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

Rendering the form that sends the user to the TPV in the View:, (*8)

<?php echo $this->Sermepa->renderForm(array('id' => 'sermepa_form', 'target' => '_blank')); ?>
<?php echo $this->Html->scriptBlock('$( "#sermepa_form" ).submit();'); ?>

Getting a notification in the Controller:, (*9)

$notification = $this->Sermepa->getNotification();

See the Test files to find more use examples., (*10)

License

This plugin is licensed under the GPL v2 license. Most common uses of this plugin won't constitute a derived work, thus, you may use it and include it in your app independently of the license you've choosen for your code as long as the plugin itself is still distributed with its original license. But using this plugin from another plugin that provides modified or improved functionality may constitute a derived work and thus require you to use the same license for your plugin., (*11)

The Versions

28/06 2016

dev-master

9999999-dev https://github.com/berarma/cakephp-sermepa

CakePHP Sermepa Plugin

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Bernat Arlandis

cakephp payments card tpv servired sermepa