2017 © Pedro Peláez
 

yii2-extension yii2-lacaixa

Yii2 lacaixa module to integrate the payment gateway (TPV Virtual) Redsys to be integrated into virtual web shops that have been developed under Yii2.

image

kholmatov/yii2-lacaixa

Yii2 lacaixa module to integrate the payment gateway (TPV Virtual) Redsys to be integrated into virtual web shops that have been developed under Yii2.

  • Monday, September 25, 2017
  • by kholmatov
  • Repository
  • 1 Watchers
  • 1 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 lacaixa Module

Yii2 lacaixa module to integrate the payment gateway (TPV Virtual) Redsys to be integrated into virtual web shops that have been developed under Yii2., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist kholmatov/yii2-lacaixa "*"

or add, (*4)

"kholmatov/yii2-lacaixa": "*"

to the require section of your composer.json file., (*5)

Usage

Setting configuration file kholmatov/yii2-lacaixa/config.php, (*6)

Once the extension is installed, simply use it in your code by :, (*7)

<?= \kholmatov\lacaixa\RedsysWDG::getFormData($DS_MERCHANT_ORDER,$DS_MERCHANT_AMOUNT,$languageCode,$ProductDescription); ?>

or get result on Json format:, (*8)

<?= \kholmatov\lacaixa\RedsysWDG::getFormDataJson($DS_MERCHANT_ORDER,$DS_MERCHANT_AMOUNT,$languageCode,$ProductDescription); ?>

Put this example code in any controller script for testing success url in action (URLOK):, (*9)

```php, (*10)

...

public function actionOk(){
    $get = Yii::$app->request->get();
    if(isset($get) && isset($get['Ds_SignatureVersion']) && isset($get['Ds_MerchantParameters']) && isset($get['Ds_Signature'])):

        $rs = \kholmatov\lacaixa\RedsysWDG::checkData($get['Ds_SignatureVersion'],$get['Ds_MerchantParameters'],$get['Ds_Signature']);
        if($rs){
            $rsParam = \kholmatov\lacaixa\RedsysWDG::decodeData($get['Ds_MerchantParameters']);
            $myParam = json_decode($rsParam,true);
            print_r($myParam);
              ....
           }
    endif;

    //return $this->redirect(array('/'));
}

...

```, (*11)

Put this example code in any controller script for testing cancel or error url in action (URLKO):, (*12)

```php, (*13)

...

public function actionKo(){
   $get = Yii::$app->request->get();
      if(isset($get) && isset($get['Ds_SignatureVersion']) && isset($get['Ds_MerchantParameters']) && isset($get['Ds_Signature'])):
        $rs = \kholmatov\lacaixa\RedsysWDG::checkData($get['Ds_SignatureVersion'],$get['Ds_MerchantParameters'],$get['Ds_Signature']);
        if($rs){
                   $rsParam = RedsysWDG::decodeData($get['Ds_MerchantParameters']);
                   $myParam = json_decode($rsParam,true);
                   print_r($myParam);
                  ... 
        }
      endif;

      //return $this->redirect(array('/'));
}

...

```

The Versions

25/09 2017

dev-master

9999999-dev

Yii2 lacaixa module to integrate the payment gateway (TPV Virtual) Redsys to be integrated into virtual web shops that have been developed under Yii2.

  Sources   Download

GPL-3.0+

The Requires

 

by Erkin Kholmatov

extension yii2 module redsys lacaixa kholmatov