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

ActiveLibrary[Payment Processing](/categories/payments)

oasin/omnipay-perfectmoney
==========================

Perfect Money gateway for Omnipay payment processing library

04PHP

Since Jul 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/oasin/omnipay-perfectmoney)[ Packagist](https://packagist.org/packages/oasin/omnipay-perfectmoney)[ RSS](/packages/oasin-omnipay-perfectmoney/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

omnipay-perfectMoney
--------------------

[](#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": {
        "oasin/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/oasin/omnipay-nixmoney/issues).

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/db213763c367792600e06c2eb22ed6f722e502edcea7d897b371fd312c894bb8?d=identicon)[oasin](/maintainers/oasin)

---

Top Contributors

[![oasin](https://avatars.githubusercontent.com/u/31675779?v=4)](https://github.com/oasin "oasin (3 commits)")

### Embed Badge

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

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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