PHPackages                             laraman/beyonic - 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. laraman/beyonic

ActiveLibrary[Payment Processing](/categories/payments)

laraman/beyonic
===============

Laravel package for working with Beyonic Mobile Money APIs

v1.0.2(6y ago)152MITPHP

Since Jan 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jeanjoe/laraman-beyonic)[ Packagist](https://packagist.org/packages/laraman/beyonic)[ RSS](/packages/laraman-beyonic/feed)WikiDiscussions develop Synced 5d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Laraman Beyonic.
----------------

[](#laraman-beyonic)

Laraman Beyonic is a Laravel package for working with [Beyonic Mobile Money APIs](https://apidocs.beyonic.com/).

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

[](#requirements)

- Laravel **v5.0+**
- Beyonic API Token

### Note

[](#note)

- For **NOW** this packages works with **Collection Requests, Collections and Payments**. More options are coming soon.

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

[](#installation)

- To get started, install the `laraman/beyonic` package.

```
composer require laraman/beyonic
```

- For Laravel **&lt;=5.4**, register the Facade in the `app.php` file inside config directory
- To List of providers add:

```
Laraman\Beyonic\BeyonicServiceProvider::class,
```

- To alias add:

```
'LaramanBeyonic' => Laraman\Beyonic\Facades\BeyonicFacade::class,
```

- For Laravel **&gt;5.4**, NO need to worry, the `LaramanBeyonic` facade will be automatically discovered and loaded for you.

Environment files
-----------------

[](#environment-files)

- Add `BEYONIC_API_KEY` to your `.env` file and provide a valid Beyonic Token.
- You can also publish the config file `beyonic.php` to your `config` directory and make necessary adjustments but this is optinal.

```
php artisan vendor:publish  --provider="Laraman\Beyonic\BeyonicServiceProvider"
```

How to use
----------

[](#how-to-use)

- Inside your controller, import `LaramanBeyonic`.

```
use LaramanBeyonic;
```

- Then in your controller method, you can the make the various requests, follow the [Beyonic API Documentation](https://apidocs.beyonic.com/) and format your request body accordingly.
- You can then leverage on the `LaramanBeyonic` Methods to make your requests simpler.

#### Collection Requests.

[](#collection-requests)

- To make collection request, you can use the following methods.

Method DescriptionMethodArgumentExpects ArgumentCommentMake Collection Request`createCollectionRequest()`$dataMandatoryArray of objectsGet all Collection Requests`getAllCollectionRequests()`$data or NULLOptionalYou can get All or Filter recordsGet a Collection Request`getCollectionRequest()`$dataMandatoryGet a specific recordUpdate a Collection Request`updateCollectionRequest()`$data, $idMandatoryYou must have permissionDelete a Collection Request`deleteCollectionRequest()`$idMandatoryYou must have permission#### Collections.

[](#collections)

- To manage your collections, you can use the following methods.

Method DescriptionMethodArgumentExpects ArgumentCommentGet all Collections`getCollections()`$data or NULLOptionalYou can get All or Filter recordsGet a Collection`getCollection()`$dataMandatoryGet a specific recordDelete a Collection Request`deleteCollection()`$idMandatoryYou must have permission#### Payments.

[](#payments)

- To send money to (Pay) mobile users, you can use the following methods.

Method DescriptionMethodArgumentExpects ArgumentCommentMake Payment Request`createPayment()`$dataMandatoryArray of objectsGet all Payments`getAllPayments()`$data or NULLOptionalYou can get All or Filter recordsGet a Payment record`getPayment()`$dataMandatoryGet a specific recordUpdate Payment`updatePayment()`$data, $idMandatoryYou must have permissionDelete Payment`deletePayment()`$idMandatoryYou must have permission#### Example.

[](#example)

- To avoid unncessary errors, you may decide to wrap your request in a `try` and `catch`.

```
