PHPackages                             mecxer713/bgfi-payment - 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. mecxer713/bgfi-payment

ActiveLibrary

mecxer713/bgfi-payment
======================

PHP SDK (Laravel &amp; Symfony) for integrating the BGFI RDC payment gateway

00PHP

Since Mar 4Pushed 2mo agoCompare

[ Source](https://github.com/Mecxer713/bgfi-payment)[ Packagist](https://packagist.org/packages/mecxer713/bgfi-payment)[ RSS](/packages/mecxer713-bgfi-payment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

BGFI Payment RDC - PHP SDK (Laravel &amp; Symfony)
==================================================

[](#bgfi-payment-rdc---php-sdk-laravel--symfony)

SDK unique pour consommer les APIs BGFI RDC (Omnitech) côté Laravel (provider + facade) et Symfony (bundle auto-wirable) : vérification de compte, dépôt Rakakash, collecte mobile money et suivi de transaction.

Prérequis
---------

[](#prérequis)

- PHP 8.1+
- Composer
- Framework: Laravel 10/11/12 ou Symfony 7.x

Installation Laravel
--------------------

[](#installation-laravel)

```
composer require mecxer713/bgfi-payment
php artisan vendor:publish --tag=bgfi-config
```

`.env` minimum :

```
BGFI_BASE_URL=https://api-uat.bgfi.com
BGFI_LOGIN=mon_login
BGFI_PASSWORD=mon_password
BGFI_CONSUMER_ID=xxxx
BGFI_CONSUMER_SECRET=xxxx
BGFI_CURRENCY=CDF
```

Installation Symfony
--------------------

[](#installation-symfony)

```
composer require mecxer713/bgfi-payment
```

Activer le bundle (`config/bundles.php`) :

```
return [
    // ...
    Mecxer713\BgfiPayment\Symfony\BgfiPaymentBundle::class => ['all' => true],
];
```

Configuration (`config/packages/bgfi_payment.yaml`) :

```
bgfi_payment:
  base_url: https://api-uat.bgfi.com
  login: mon_login
  password: mon_password
  consumer_id: xxxx
  consumer_secret: xxxx
  currency: CDF
```

Configuration avancée (commune)
-------------------------------

[](#configuration-avancée-commune)

CléDescription`base_url`URL API BGFI (UAT ou prod).`login` / `password`Identifiants OAuth.`consumer_id` / `consumer_secret`Couple fourni par BGFI.`currency`Devise par défaut (`CDF`…).`default_description`Description par défaut des collectes.`return_url`URL de retour client après paiement.`verify_ssl``true` en prod, `false` possible en UAT.`ca_path`Chemin vers le bundle CA si certif custom.`token_ttl`Durée de cache du token en secondes (3500).Laravel seul`callback_path`, `register_callback_route` pour le webhook auto.Utilisation
-----------

[](#utilisation)

Laravel : importer le facade. Symfony : auto-wirer le service.

```
// Laravel
use Mecxer713\BgfiPayment\Facades\BgfiPayment;

// Symfony
use Mecxer713\BgfiPayment\Services\BgfiService;
// $bgfi = $container->get(BgfiService::class);
```

- `checkAccount(string $account, string $type = 'RAKAKASH', array $bankDetails = [])`
    Vérifie l'existence d'un compte.

    ```
    $response = BgfiPayment::checkAccount('243820460800');          // Laravel
    // $response = $bgfi->checkAccount('243820460800');             // Symfony
    ```
- `deposit(string $phone, float $amount, ?string $currency = null)`
    Dépôt Rakakash.

    ```
    $response = BgfiPayment::deposit('243998760311', 10000, 'CDF');
    // $response = $bgfi->deposit('243998760311', 10000, 'CDF');
    ```
- `collect(array $data)`
    Collecte mobile money (`amount`, `phone`, `reference`, `currency`, `return_url` optionnel).

    ```
    $response = BgfiPayment::collect([
        'amount'    => 25000,
        'phone'     => '243820460800',
        'reference' => 'ORDER-2026-0001',
        'currency'  => 'CDF',
        'return_url'=> 'https://votre-app.test/paiement/retour',
    ]);
    // $response = $bgfi->collect([...]);
    ```
- `getCollectStatus(string $externalRef)`
    Statut d'une collecte existante.

    ```
    $status = BgfiPayment::getCollectStatus('ORDER-2026-0001');
    // $status = $bgfi->getCollectStatus('ORDER-2026-0001');
    ```

Webhook / Callback
------------------

[](#webhook--callback)

- Laravel : route POST auto `/{callback_path}` (par défaut `api/bgfi/callback`). Désactiver via `BGFI_REGISTER_CALLBACK_ROUTE=false`. L'événement `Mecxer713\BgfiPayment\Events\BgfiCallbackReceived` est dispatché.
- Symfony : exposez votre propre contrôleur qui appelle `BgfiService` ou relaie l'événement selon vos besoins.

Vérification rapide (Laravel)
-----------------------------

[](#vérification-rapide-laravel)

```
php artisan bgfi:test
```

Tests
-----

[](#tests)

```
composer test
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance57

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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://www.gravatar.com/avatar/f3dddf9cef45710139b1ed66eb603104ce8634288b699bbe98e234129bc311b6?d=identicon)[Mecxer713](/maintainers/Mecxer713)

---

Top Contributors

[![Mecxer713](https://avatars.githubusercontent.com/u/28055700?v=4)](https://github.com/Mecxer713 "Mecxer713 (7 commits)")

### Embed Badge

![Health badge](/badges/mecxer713-bgfi-payment/health.svg)

```
[![Health](https://phpackages.com/badges/mecxer713-bgfi-payment/health.svg)](https://phpackages.com/packages/mecxer713-bgfi-payment)
```

PHPackages © 2026

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