GithubHelp home page GithubHelp logo

troopers / mangopaybundle Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 19.0 707 KB

Mangopay api implementation for Symfony

Home Page: http://troopers.agency

License: MIT License

PHP 85.82% JavaScript 9.49% HTML 4.68%
mangopay mangopay-api symfony symfony-bundle troopers

mangopaybundle's People

Contributors

alexandre-abrioux avatar alexislefebvre avatar allan-simon avatar aslafy-z avatar bfoucher avatar carlowens avatar charlie-lucas avatar lenybernard avatar matthieucutin avatar mrkisch avatar paulandrieux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mangopaybundle's Issues

The User interface needs updating

When I create an object that implements:
Troopers\MangopayBundle\Entity\UserInterface

When trying to create a user I get:
Call to undefined method Vendor\MyBundle\Model\PaymentManager\Provider\MangoPayAdapters\User::getId()

Adding a getId() method solves the problem, but the interface needs updating

Bundle must be Orm agnostic

The bundle use ORM to persist entities but never use persisted object.
Orm and persistence is responsibility of implementation and not of bundle.

this issue is a complement of previous #53 and mainly for last feature #59 / #58 .
We must clean bundle and document the good way to override and persist bundle models when it's a domain requirement

readme is not correct

    $cardRegistration = new CardRegistration();
    $this->get('troopers_mangopay.payment_helper')->createPreAuthorisation($cardRegistration);

as createPreAuthorization does not take a cardRegistration, i guess you meant:

 $this->get('troopers_mangopay.card_registration_helper')->createCardRegistrationForUser($user);

mapping error

i got this error when i try to submit a card form with this route : appventus_mangopaybundle_payment_new
message : Entity 'AppVentus\MangopayBundle\Entity\Order' has no field 'id'. You can therefore not call 'findOneById' on the entities' repository

During tests, bypass API calls and return fake data instead?

One of our projects rely on MangopayBundle. Tests written with Behat fail sometimes because the test environment call the API in order to get a wallet. The amount (Balance) in this wallet is not fixed so it breaks tests that rely on this amount.

I think that it would be nice if we could configure MangopayBundle to bypass the API calls and return some given values instead. For example by specifying a given wallet id when we load the fixtures for one user.

For example, let's say we define a wallet with id 1, then the MangopayBundle may detect that this value correspond to the test environment and return the values (e.g. the amount) from our fixtures instead of calling the API.

Do you think it's doable and interesting?

Can't install the bundle through Composer

Hello,

First many thanks for your bundle as Mango pay decided to not follow good practices by using composer!

However I'm having trouble installing your bundle... Could you help me please ?

This is what I did in my composer.json file :
...
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~2.0@dev",
"besimple/i18n-routing-bundle": "dev-master",
"facebook/php-sdk" : "*",
"friendsofsymfony/facebook-bundle": "dev-master",
"appventus/mangopay-bundle": "dev-master"
}

When I perform the php composer.phar update command this is what I got :

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for appventus/mangopay-bundle dev-master -> satisfiable by appventus/mangopay-bundle[dev-master].
- appventus/mangopay-bundle dev-master requires mangopay/mangopay2-php-sdk * -> no matching package found.

So I added the following line in my composer :
...
"require": {
...
"mangopay/mangopay2-php-sdk": "*",
"appventus/mangopay-bundle": "dev-master"
}

I have now the following error :

Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package mangopay/mangopay2-php-sdk could not be found in any version, there may be a typo in the package name.
Problem 2
- Installation request for appventus/mangopay-bundle dev-master -> satisfiable by appventus/mangopay-bundle[dev-master].
- appventus/mangopay-bundle dev-master requires mangopay/mangopay2-php-sdk * -> no matching package found.

Thanks in advance for your help

Different behavor on creating mango items

UserHelper::createMangoUser persist the $user after creating it MangoUserId but WalletHelper::createWalletForUser don't persist it.
It would be nice to have an identical behavior.

WalletHelper use $user->getWallet() function not defined

The function $user->getWallet() used in the WalletHelper, should be defined throw an interface to apply to the user.

How do you manage to give a wallet from the userEntity? Injecting the wallet, injecting just a reference ?

Could we have some documentation ?

I'm trying to use you bundle to make a direct payment (using PaymentDirectHelper), and i'm trying to know what do i need to pass to create method.
Could you give me a basic example of how to use it please ?
Thanks a lot !

Documentation : Installation et configuration

Bonjour,
Votre plugin semble intéressant pour faciliter l'utilisation de MangoPay au sein d'un projet Symfony. Est-ce que sa maintenance est assurée sur le long terme ?
La documentation n'est pas très détaillée notamment concernant la configuration et les classes à implémenter (s'il y en a). Est-ce qu'il y a une autre source d'information ou des cas d'utilisation/démo ?
Merci pour votre retour.
Flavien

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.