Download the PHP package finller/laravel-mangopay without Composer

On this page you can find all versions of the php package finller/laravel-mangopay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mangopay

Mangopay package for Laravel

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This package allow you to use mangopay api with your Model. The goal is to makes the api more natural and user friendly to use. Under the hood, it uses the mangopay official php sdk.

IMPORTANT: This package only provide Direct Debit PayIn with SEPA mandate for the moment. If you want to do credit card PayIn you can to use the service provider which is the php mangopay sdk

Just had a trait to your model

And then, you have plenty of functions to work easily with mangopay.

It also provide a Service : MangopayServiceProvider, so you can have access to the mangopay sdk if you need.

Installation

Install the package via composer:

You have to publish and run the migrations with:

You have to publish the config file with:

This is the content of the published config file: A temporary folder has to be specified as well as api credentials.

Usage

Setup your Model

This package works with a Trait, the trait gives you plenty of functions and most of all it makes a link between your database and the mangopay data.

You can use the trait on any Model, not just User.

By default, the mangopay user is LEGAL. You can define if your user is NATURAL (a person) or LEGAL (a company or an organization) like that:

If you already store the data of your users in your database and you want to sync it with mangopay, just add:

These data will be used when you call $user->createMangopayUser(); or $user->updateMangopayUser();.

In the exemple, all personnal data needed by Mangopay are fetch from your Model. Please note that the only information stored by this package in the database are the mangopay user id and the mangopay user KYC level.

Create and update your mangopay user

Then you can just create and update your mangopay user like that:

If you do not use buildMangopayUserData method, or if you want to override it, you can pass an array of data: array from the method buildMangopayUserData and array passed as variable will be merged.

please note that some fields are mandatory to be able to create a mangopay User (please see to the mangopay docs).

Manage your mangopay wallets

Add Bank account and mandate

There are a lot of functions to manage everything, so don't hesitate to explore the trait (methods names are pretty clear).

Do PayIn and PayOut

IMPORTANT: This package only support Direct Debit PayIn with SEPA mandate for the moment. If you want to do credit card PayIn you have to use the service provider and so the php sdk

Retreive Laravel User and Mangopay User from Mangopay User Id

This situation will happen very often when dealing with Mangopay hooks. You can use the MangopayPivot Model.

Managing Mangopay Hooks

This is just an example of how you can deal with Mangopay hooks in Laravel.

Setup the route

Define the controller

Define the event

And you can listen to mangopay Hooks !

Deploy in production

By default the mangopay sdk use the sandbox api url. If you want to go in production you have to define the production api url in the config file like this:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-mangopay with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
spatie/laravel-package-tools Version ^1.11
illuminate/support Version ^5.0|^6.0|^7.0|^8.0|^9.0
illuminate/contracts Version ^5.0|^6.0|^7.0|^8.0|^9.0
mangopay/php-sdk-v2 Version ^3.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package finller/laravel-mangopay contains the following files

Loading the files please wait ....