PHPackages                             macklus/yii2-ceca-tpv - 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. macklus/yii2-ceca-tpv

ActiveYii2-extension[Payment Processing](/categories/payments)

macklus/yii2-ceca-tpv
=====================

Manage payment form generator from CECA TPV

1.0.0(9y ago)0138—0%GPL-3.0+PHP

Since May 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/macklus/yii2-ceca-tpv)[ Packagist](https://packagist.org/packages/macklus/yii2-ceca-tpv)[ RSS](/packages/macklus-yii2-ceca-tpv/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

CECA Tpv plugin
===============

[](#ceca-tpv-plugin)

Manage payment form generator from CECA TPV

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist macklus/yii2-ceca-tpv "*"

```

or add

```
"macklus/yii2-ceca-tpv": "*"

```

to the require section of your `composer.json` file.

Configure
---------

[](#configure)

Configure tpv component, using:

```
'tpv' => [
            'class' => 'macklus\CECATpv\Tpv',
            'mode' => 'prod',
            'debug' => [
                'AcquirerBIN' => '0000XXXXXX',
                'MerchantID' => '0XXXXXXXX',
                'TerminalID' => '0000000X',
                'Exp' => 'X',
                'URL_OK' => '',
                'URL_NOK' => '',
                'Key' => 'XXXXXXXX',
            ],
            'prod' => [
                'AcquirerBIN' => '0000XXXXXX',
                'MerchantID' => '0XXXXXXXX',
                'TerminalID' => '0000000X',
                'Exp' => 'X',
                'URL_OK' => '',
                'URL_NOK' => '',
                'Key' => 'XXXXXXXX',
            ],
        ],
```

The **mode** variable define usage mode, so far:

1. **prod:** production mode
2. **debug:** debug mode

Generate the payment form
-------------------------

[](#generate-the-payment-form)

You can generate the payment form using next code in your view:

```

```

- **Num\_operation:** Alphanumeric code who identifies this order
- **Importe:** The total amount of payment
- **TipoMoneda:** Coin
- **Idioma:** Language
- **showButton:** if true, the form include submit button. If false, you should submit it througt javascript. Remember that form id is always ceca-tpv-form

Handle TPV response
-------------------

[](#handle-tpv-response)

Once you have been pay, TPV should POST payment info (if you configure it). To handle that, you should use in your action:

```
