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

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

partfire/mangopay-bundle
========================

A set of Symfony services for use in your project in integrate with MangoPay API faster.

171

Since Apr 13Compare

[ Source](https://github.com/PartFire/MangoPayBundle)[ Packagist](https://packagist.org/packages/partfire/mangopay-bundle)[ RSS](/packages/partfire-mangopay-bundle/feed)WikiDiscussions Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

MangoPay Bundle for Symfony
===========================

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

[![Build Status](https://camo.githubusercontent.com/aa1ec49bf63f18dbd4651580db41246d82750f657e23ecfbff7527f3ce08c8df/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f50617274466972652f4d616e676f50617942756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PartFire/MangoPayBundle/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5f792d6d0e03a06acfb19860c77cce2ffa80cf8a92d104feb5d109ccc6b0020a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f50617274466972652f4d616e676f50617942756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PartFire/MangoPayBundle/?branch=master)[![Packagist](https://camo.githubusercontent.com/a4b7a1d8377c4252b62962b12857454a352b488c7f58770dcbcadcffaf57247b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f637472696e652f6f726d2e737667)](https://packagist.org/packages/partfire/mangopay-bundle)[![SensioLabsInsight](https://camo.githubusercontent.com/02d7f5205e61387e14bee0c4c395b2e5cd32f7b61061baa72f399b7457eb63e3/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37313933386138342d363935382d343437662d626365362d6437633535303132643838332f6d696e692e706e67)](https://insight.sensiolabs.com/projects/71938a84-6958-447f-bce6-d7c55012d883)[![Twitter Follow](https://camo.githubusercontent.com/2a8710a167599668ddbb3817d9b322d7148f7e42210fc604612f8a1ac48dec28/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f657370616472696e652e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77)](https://twitter.com/partfire)

A set of Symfony services for use in your project to ease integration with Mangopay API.

This bundle depends upon the [official Mangopay SDK PHP for Mangopay API v2](https://github.com/Mangopay/mangopay2-php-sdk). This means that this bundle only supports Mangopay API version v2.01 but not the earlier versions. Please check which version you are using.

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

[](#installation)

Using composer you can simply require master for now until we have a stable release:

```
$ composer require partfire/mangopay-bundle:dev-master

```

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

[](#configuration)

Add your details to your `app/config/parameters.yml` file. For example:

```
    mangopay_client_id: my_mango_id
    mangopay_client_password: XXXXXXXXXXXXXXXXXXXXXX
    mangopay_base_url: 'https://api.sandbox.mangopay.com'
```

Also add to your `app/AppKernel.php` file:

```
    new PartFire\MangoPayBundle\PartFireMangoPayBundle()
```

Example Usage
-------------

[](#example-usage)

### Users

[](#users)

#### Create a user

[](#create-a-user)

```
    $userService = $this->container->get('part_fire_mango_pay.services.user');

    $userDto = new \PartFire\MangoPayBundle\Models\DTOs\User();
    $userDto->setFirstName('Dick');
    $userDto->setLastName('Jones');
    $userDto->setBirthday(new \DateTime());
    $userDto->setEmail('dick.jones@test.com');
    $userDto->setNationality('GB');
    $userDto->setCountryOfResidence('GB');

    $userDtoUpdated = $userService->create($userDto);

    if ($userDtoUpdated instanceof \PartFire\MangoPayBundle\Models\DTOs\User) {
        $userDtoUpdated->getId(); //The users MangoPay ID, DTO fully populated.
    }

    if ($userDtoUpdated instanceof \PartFire\MangoPayBundle\Models\Exception) {
        //an error you can deal with
    }
```

### Wallets

[](#wallets)

#### Create a wallet

[](#create-a-wallet)

```
    $walletService = $this->container->get('part_fire_mango_pay.services.wallet');

    $walletDto = new \PartFire\MangoPayBundle\Models\DTOs\Wallet();
    $walletDto->setTag('TAG1');
    $walletDto->setOwenerId('123456');
    //$walletDto->setOwenerIds(['123456']);
    $walletDto->setDescription('A natural users wallet');
    $walletDto->setCurrency('GBP');

    $walletDtoUpdated = $walletService->create($walletDto);

    if ($walletDtoUpdated instanceof \PartFire\MangoPayBundle\Models\DTOs\Wallet) {
        $walletDtoUpdated->getId(); //The wallet DTO populated with MangoPay ID.
    }

    if ($walletDtoUpdated instanceof \PartFire\MangoPayBundle\Models\Exception) {
        //an error you can deal with
    }
```

Service List
------------

[](#service-list)

```
part_fire_mango_pay.services.user
part_fire_mango_pay.services.wallet
part_fire_mango_pay.services.kyc
part_fire_mango_pay.services.transfer

```

### Code Structure Explanation

[](#code-structure-explanation)

In the 'Services' directory are the services that should be used my your client code. These services depend upon interfaces which are located inside the 'Models' directory. We then have an implementation of these abstractions in the 'Models/Adapters' directory. This means our services depend upon our abstractions, while the adapters also depend upon our abstractions.

The objects passed into the services and then adapters are simple DTOs (data type objects). These are just keys and values with setters and getters. We pass these in and out of the adapters so that none of our services / client code is dependant upon the MangoPay SDK.

### Contributing

[](#contributing)

Feel free to add more methods to the services etc and create a pull request. I will merge them in if they follow the existing structure or you teach me a better way.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64096104?v=4)[CarlaMorosan](/maintainers/carlamo)[@CarlaMo](https://github.com/CarlaMo)

---

Top Contributors

[![carlowens](https://avatars.githubusercontent.com/u/346840?v=4)](https://github.com/carlowens "carlowens (65 commits)")

### Embed Badge

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

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

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)

PHPackages © 2026

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