PHPackages                             egorsmkv-packagist/yii2-perfect-money - 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. egorsmkv-packagist/yii2-perfect-money

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

egorsmkv-packagist/yii2-perfect-money
=====================================

PerfectMoney component for Yii2

v1.0.0(8y ago)023MITPHPPHP &gt;=5.4.0

Since Nov 12Pushed 8y agoCompare

[ Source](https://github.com/egorsmkv/yii2-perfect-money)[ Packagist](https://packagist.org/packages/egorsmkv-packagist/yii2-perfect-money)[ Docs](https://github.com/egorsmkv/yii2-perfect-money)[ RSS](/packages/egorsmkv-packagist-yii2-perfect-money/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

PerfectMoney component for Yii2
===============================

[](#perfectmoney-component-for-yii2)

Payment gateway and api client for [PerfectMoney](http://yiidreamteam.com/link/perfect-money) service.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist yii-dream-team/yii2-perfect-money "dev-master"

```

or add

```
"yii-dream-team/yii2-perfect-money": "dev-master"

```

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

Usage
-----

[](#usage)

### Component configuration

[](#component-configuration)

Configure `pm` component in the `components` section of your application.

```
'pm' => [
    'class' => '\yiidreamteam\perfectmoney\Api',
    'accountId' => '1234567',
    'accountPassword' => 'xxxxxxxxx',
    'walletNumber' => 'U1234567',
    'merchantName' => 'My Merchant',
    'alternateSecret' => 'X00O8cT08pOEZTJdFmSiAwxyu',
    'resultUrl' => ['/perfect-money/result'],
    'successUrl' => ['/site/payment-success'],
    'failureUrl' => ['/site/payment-failure'],
],

```

### Redirecting to the payment system

[](#redirecting-to-the-payment-system)

To redirect user to PerfectMoney site you need to create the page with RedirectForm widget. User will redirected right after page load.

```

```

### Gateway controller

[](#gateway-controller)

You will need to create controller that will handle result requests from PerfectMoney service. Sample controller code:

```
