2017 © Pedro Peláez
 

yii2-extension yii2-omnikassa

Yii2 component for Rabobank omnikassa payments

image

edofre/yii2-omnikassa

Yii2 component for Rabobank omnikassa payments

  • Saturday, February 4, 2017
  • by edofre
  • Repository
  • 1 Watchers
  • 1 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Yii2 omnikassa component

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock, (*1)

Installation

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

To install, either run, (*3)

$ php composer.phar require edofre/yii2-omnikassa "V1.0.5"

or add, (*4)

"edofre/yii2-omnikassa": "V1.0.5"

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

Usage

Add the components to the configuration, the following configuration is the test environment for omnikassa

return [
    ...
    'components'          => [
        'omniKassa'    => [
            'class'                => '\edofre\omnikassa\OmniKassa',
            'automaticResponse'    => false,
            'currencyCode'         => '978',
            'interfaceVersion'     => 'HP_1.0',
            'keyVersion'           => '1',
            'merchantId'           => '002020000000001',
            'paymentMeanBrandList' => 'IDEAL,VISA,MASTERCARD,MAESTRO',
            'secretKey'            => '002020000000001_KEY1',
            'testMode'             => true,
            'url'                  => 'https://payment-webinit.simu.omnikassa.rabobank.nl/paymentServlet',
        ],
        ...
    ],
    ...
];

Create the PaymentRequest object and create a form

$paymentRequest = new \edofre\omnikassa\PaymentRequest([
    'amount'               => 12354, // Amount in cents, 12345 = 123,45
    'orderId'              => 'your-order-id',
    'normalReturnUrl'      => \yii\helpers\Url::to(['site/return'], true),
    'transactionReference' => "your-transaction-reference",
]);
Yii::$app->omniKassa->prepareRequest($paymentRequest);

```HTML+PHP , (*6)

= \yii\helpers\Html::submitButton('Click here to make your payment', ['class' => 'btn btn-success']) ?>

### Create the controller action you specified in the PaymentRequest and process the request ```php public function actionReturn() { $response = Yii::$app->omniKassa->processRequest(); var_dump($response->attributes); var_dump('Pending', $response->isPending); var_dump('Successful', $response->isSuccessful); var_dump('Failure', $response->isFailure); }

Don't forgot to disable CSRF protection for this action as it is an external action

public function beforeAction($action)
{
    if ($action->id == 'return') {
        $this->enableCsrfValidation = false;
    }

    return parent::beforeAction($action);
}

The Versions

04/02 2017

dev-master

9999999-dev https://github.com/edofre/yii2-omnikassa

Yii2 component for Rabobank omnikassa payments

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Edo Freriks

rabobank omnikassa

24/12 2016

v1.0.5.x-dev

1.0.5.9999999-dev https://github.com/edofre/yii2-omnikassa

Yii2 component for Rabobank omnikassa payments

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Edo Freriks

rabobank omnikassa

24/12 2016

V1.0.5

1.0.5.0 https://github.com/edofre/yii2-omnikassa

Yii2 component for Rabobank omnikassa payments

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Edo Freriks

rabobank omnikassa

11/06 2016

V1.0.4

1.0.4.0 https://github.com/edofre/yii2-omnikassa

Yii2 component for Rabobank omnikassa payments

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Edo Freriks

rabobank omnikassa