PHPackages                             mk990/omnipay-perfectmoney - 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. mk990/omnipay-perfectmoney

ActiveLibrary[Payment Processing](/categories/payments)

mk990/omnipay-perfectmoney
==========================

Perfect Money gateway for Omnipay payment processing library

v3.0.1(5y ago)125MITPHPPHP ^7.2

Since Jan 25Pushed 5y agoCompare

[ Source](https://github.com/mk990/omnipay-perfectmoney)[ Packagist](https://packagist.org/packages/mk990/omnipay-perfectmoney)[ RSS](/packages/mk990-omnipay-perfectmoney/feed)WikiDiscussions master Synced 3d ago

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

omnipay-perfectMoney
====================

[](#omnipay-perfectmoney)

[![Build Status](https://camo.githubusercontent.com/a43455268886a06c8b98a8921056732c464bf3125d8211d2833e53c19caea0d3/68747470733a2f2f7472617669732d63692e636f6d2f6d6b3939302f6f6d6e697061792d706572666563746d6f6e65792e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/github/mk990/omnipay-perfectmoney)[![Codacy Badge](https://camo.githubusercontent.com/6d8719099716ee09976c94f83525bd61dadf770aee17e203b4c5b99312720b13/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6134653266613937386637643437363838353831343936653634306230656561)](https://www.codacy.com/app/sassoftinc/omnipay-perfectmoney?utm_source=github.com&utm_medium=referral&utm_content=aleksandrzhiliaev/omnipay-perfectmoney&utm_campaign=Badge_Grade)[![Total Downloads](https://camo.githubusercontent.com/1d26b6dbf73f8e29fe6c78f2f5ff6960d64335e6fb9d22195acc003938f308db/68747470733a2f2f706f7365722e707567782e6f72672f616c656b73616e64727a68696c696165762f6f6d6e697061792d706572666563746d6f6e65792f646f776e6c6f616473)](https://packagist.org/packages/aleksandrzhiliaev/omnipay-perfectmoney)

PerfectMoney gateway for [Omnipay](https://github.com/thephpleague/omnipay) payment processing library.

[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 7.2+. This package implements PerfectMoney support for Omnipay.

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

[](#installation)

install Omnipay via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "mk990/omnipay-perfectmoney": "*"
    }
}
```

run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

Basic Usage
-----------

[](#basic-usage)

The following gateways provided by this package:

- PerfectMoney

For general usage instructions, please see the main [Omnipay](https://github.com/omnipay/omnipay)repository. See [PerfectMoney Documentation](https://perfectmoney.is/sample-api.html)

Example
-------

[](#example)

1. Purchase:

```
$gateway = Omnipay::create('PerfectMoney');

$gateway->setAccount('');
$gateway->setAccountName('');
$gateway->setBaggageFields('');
$gateway->setSuggestedMemo('');
$gateway->setPassphrase('');
$gateway->setCurrency('');

$response = $gateway->purchase([
       'amount' => '0.1',
       'currency' => 'USD',
       'transactionId' => time(),
       'description' => 'Order # 123',
       'cancelUrl' => 'https://example.com',
       'returnUrl' => 'https://example.com',
       'notifyUrl' => 'https://example.com'
        ])->send();

if ($response->isSuccessful()) {
   // success
} elseif ($response->isRedirect()) {

   # Generate form to do payment
   $hiddenFields = '';
   foreach ($response->getRedirectData() as $key => $value) {
       $hiddenFields .= sprintf(
          '',
           htmlentities($key, ENT_QUOTES, 'UTF-8', false),
           htmlentities($value, ENT_QUOTES, 'UTF-8', false)
          )."\n";
   }

   $output = ' %2$s ';
   $output = sprintf(
      $output,
      htmlentities($response->getRedirectUrl(), ENT_QUOTES, 'UTF-8', false),
      $hiddenFields
   );
   echo $output;
   # End of generating form
} else {
   echo $response->getMessage();
}
```

2. Validate webhook

```
try {
    $response = $gateway->completePurchase()->send();
    $transactionId = $response->getTransactionId();
    $amount = $response->getAmount();
    $success = $response->isSuccessful();
    $currency = $response->getCurrency();
    if ($success) {
       // success
    }
} catch (\Exception $e) {
  // check $e->getMessage()
}
```

3. Do refund

```
try {
    $response = $gateway->refund(
        [
            'payeeAccount' => 'U123456789',
            'amount' => 0.1,
            'description' => 'Testing perfectMoney',
            'currency' => 'USD',
        ]
    )->send();

    if ($response->isSuccessful()) {
        // success
    } else {
        // check $response->getMessage();
    }

} catch (\Exception $e) {
    // check $e->getMessage();
}
```

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/aleksandrzhiliaev/omnipay-nixmoney/issues).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 78.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~114 days

Recently: every ~335 days

Total

13

Last Release

2020d ago

Major Versions

1.4.5 → v3.02020-10-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/700bfc3c90ebf9ab6c82bdd823ca843b7b0f7602aed9b259ab5cf60cff7bb509?d=identicon)[mk990](/maintainers/mk990)

---

Top Contributors

[![aleksandrzhiliaev](https://avatars.githubusercontent.com/u/12209346?v=4)](https://github.com/aleksandrzhiliaev "aleksandrzhiliaev (15 commits)")[![mk990](https://avatars.githubusercontent.com/u/18666678?v=4)](https://github.com/mk990 "mk990 (3 commits)")[![terdelyi](https://avatars.githubusercontent.com/u/623128?v=4)](https://github.com/terdelyi "terdelyi (1 commits)")

---

Tags

paymentgatewaypaymerchantomnipaypurchaseperfectmoney

### Embed Badge

![Health badge](/badges/mk990-omnipay-perfectmoney/health.svg)

```
[![Health](https://phpackages.com/badges/mk990-omnipay-perfectmoney/health.svg)](https://phpackages.com/packages/mk990-omnipay-perfectmoney)
```

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
