PHPackages                             neyric/mangopay-bundle - 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. neyric/mangopay-bundle

ActiveSymfony-bundle[Payment Processing](/categories/payments)

neyric/mangopay-bundle
======================

MangoPay bundle for Symfony

v1.2.0(5y ago)0932MITPHP

Since Dec 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ericabouaf/mangopay-bundle)[ Packagist](https://packagist.org/packages/neyric/mangopay-bundle)[ Docs](https://github.com/neyric/mangopay-bundle)[ RSS](/packages/neyric-mangopay-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (4)Used By (0)

MangoPay Bundle for Symfony [![Build Status](https://camo.githubusercontent.com/4b5628e8571d322e7e7afcce67caadb47fb7d9ecf6e867f93541a6560928750d/68747470733a2f2f7472617669732d63692e6f72672f6e65797269632f6d616e676f7061792d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/neyric/mangopay-bundle) [![Latest Stable Version](https://camo.githubusercontent.com/48eb64f24fe628523cf86404604fb4a4f34f5f5f6b05e118acdaa824f45e64b0/68747470733a2f2f706f7365722e707567782e6f72672f6e65797269632f6d616e676f7061792d62756e646c652f762f737461626c65)](https://packagist.org/packages/neyric/mangopay-bundle) [![Total Downloads](https://camo.githubusercontent.com/fef5cf064279edfa1045c0ea35629eff5542b813a60fbd621277663fd58f9a13/68747470733a2f2f706f7365722e707567782e6f72672f6e65797269632f6d616e676f7061792d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/neyric/mangopay-bundle) [![License](https://camo.githubusercontent.com/b83b4457ae468cc8c3ac9319643b1ef6fa950ce7035ef17eb2803683dd7d6ae9/68747470733a2f2f706f7365722e707567782e6f72672f6e65797269632f6d616e676f7061792d62756e646c652f6c6963656e7365)](https://packagist.org/packages/neyric/mangopay-bundle)
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#mangopay-bundle-for-symfony----)

A Symfony bundle for [MangoPay](https://www.mangopay.com/), providing additionnal services on top of the official [MangoPay PHP SDK](https://github.com/Mangopay/mangopay2-php-sdk)

- Provide a service to access the API for a better Symfony integration
- Add useful commands
- Webhook handler (HTTP controller) + Webhook Event

Requirements
------------

[](#requirements)

- Php 7.1
- Symfony 4.4

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

[](#installation)

```
$ composer require neyric/mangopay-bundle
```

Load the bundle in your app

```
$bundles = [
    // ...
    new \Neyric\MangoPayBundle\NeyricMangoPayBundle(),
];
```

Configuration
-------------

[](#configuration)

The bundle (in particular the MangoPayService), expects those 3 environement variables to be defined

- MANGOPAY\_CLIENT\_ID
- MANGOPAY\_PASSWORD
- MANGOPAY\_BASE\_URL (should be  or )

Accessing the MangoPay API
--------------------------

[](#accessing-the-mangopay-api)

Once configured, you can use Symfony dependency injection to access the API from the sdk:

```
use Neyric\MangoPayBundle\Service\MangoPayService;

class MyService
{
    public function __construct(MangoPayService $mangoPayService)
    {
        $this->mangoPayService = $mangoPayService;
    }

    public function someMethod()
    {
        // You can access the public `api` property, which is the
        // configured instance of MangoPay\MangoPayApi
        $hooks = $this->mangoPayService->api->Hooks->GetAll();
    }
}
```

Symfony Commands
----------------

[](#symfony-commands)

Display a list of installed hooks :

```
php bin/console neyric_mangopay:hooks:list
```

Display rate limits (performs 1 api call) :

```
php bin/console neyric_mangopay:ratelimits
```

Using the webhook handler
-------------------------

[](#using-the-webhook-handler)

First, setup the route in your routes.yaml file :

```
neyric_mangopay:
    path: /mangopay_webook/hook_handler # Customizable url
    controller: Neyric\MangoPayBundle\Controller\HookController::hookHandlerAction
```

Then register the webhook, you want using the Mangopay console.

Create a subscriber

```
use Neyric\MangoPayBundle\Event\MangoPayHookEvent;

class MySubscriber implements EventSubscriberInterface
{

    public function onMangopayKycSucceeded(MangoPayHookEvent $event)
    {
        // ...
    }

    public function onMangopayUboDeclarationValidated(MangoPayHookEvent $event)
    {
        // ...
    }

    public static function getSubscribedEvents()
    {
        return [
            'MANGOPAY_KYC_SUCCEEDED' => ['onMangopayKycSucceeded', 1],
            'MANGOPAY_UBO_DECLARATION_VALIDATED' => ['onMangopayUboDeclarationValidated', 1],
        ];
    }
}
```

And eventually declare the service with the `kernel.event_subscriber` tag :

```
    App\Subscriber\MySubscriber:
        class: App\Subscriber\MySubscriber
        tags:
            - { name: kernel.event_subscriber }
```

License
-------

[](#license)

neyric/mangopay-bundle is distributed under MIT license, see the [LICENSE file](https://github.com/neyric/mangopay-bundle/blob/master/LICENSE).

Contacts
--------

[](#contacts)

Report bugs or suggest features using [issue tracker on GitHub](https://github.com/neyric/mangopay-bundle).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~194 days

Total

3

Last Release

1948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b07b937c4c01181b6dbe7e5ac025637f0a2cc639d26a6cd6efe40260f7c20bb?d=identicon)[neyric](/maintainers/neyric)

---

Top Contributors

[![ericabouaf](https://avatars.githubusercontent.com/u/39354?v=4)](https://github.com/ericabouaf "ericabouaf (8 commits)")

---

Tags

symfonymangopay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/neyric-mangopay-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/neyric-mangopay-bundle/health.svg)](https://phpackages.com/packages/neyric-mangopay-bundle)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[liip/test-fixtures-bundle

This bundles enables efficient loading of Doctrine fixtures in functional test-cases for Symfony applications

1798.3M42](/packages/liip-test-fixtures-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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