PHPackages                             filano/laravel-paygate-global - 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. filano/laravel-paygate-global

ActiveLibrary[Payment Processing](/categories/payments)

filano/laravel-paygate-global
=============================

Package Laravel non-officiel pour l'intégration facile de PayGateGlobal - Paiements FLOOZ et TMONEY

v1.2.0(9mo ago)05MITPHPPHP ^8.0CI passing

Since Sep 8Pushed 9mo agoCompare

[ Source](https://github.com/filanodev/laravel-paygate-global)[ Packagist](https://packagist.org/packages/filano/laravel-paygate-global)[ RSS](/packages/filano-laravel-paygate-global/feed)WikiDiscussions main Synced today

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

Laravel PayGateGlobal
=====================

[](#laravel-paygateglobal)

Un package Laravel **non-officiel** pour l'intégration facile des paiements **PayGateGlobal** avec support pour **FLOOZ** et **TMONEY**.

> 📝 **Package communautaire** développé par [Filano](https://me.fedapay.com/filano_don) pour aider les développeurs à intégrer plus rapidement PayGateGlobal dans leurs applications Laravel.

**PayGateGlobal** est le premier intégrateur et leader de solutions monétiques au Togo, offrant la façon la plus rapide de recevoir des paiements en ligne via les portefeuilles mobiles africains.

[![Latest Version on Packagist](https://camo.githubusercontent.com/4adf020627bfceda0224a0ad084679700733aeae54489cf20cdf5cc567dffd22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66696c616e6f2f6c61726176656c2d706179676174652d676c6f62616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/filano/laravel-paygate-global)[![License](https://camo.githubusercontent.com/725ba64a2f06bee8710505b8c33f62c69d7619091d31f986e6d8725e89bf9d00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66696c616e6f2f6c61726176656c2d706179676174652d676c6f62616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/filano/laravel-paygate-global)

🌍 À propos de PayGateGlobal
---------------------------

[](#-à-propos-de-paygateglobal)

[PayGateGlobal](https://paygateglobal.com/) simplifie l'acceptation des paiements en ligne au Togo et en Afrique de l'Ouest :

- **🚀 Intégration rapide** : API simple, intégration en 5 minutes
- **🔒 Sécurisé** : Protection anti-fraude intégrée
- **💳 Paiements mobiles** : FLOOZ (Moov Togo) et T-Money (Togocel)
- **📊 Tableau de bord** : Interface pour voir les paiements et consulter les soldes
- **💰 Tarification transparente** : 2.5% FLOOZ, 3% T-Money, sans frais cachés

Fonctionnalités
---------------

[](#fonctionnalités)

- ✅ **Initiation de paiements** via API ou redirection
- ✅ **Vérification du statut** des transactions
- ✅ **Gestion des webhooks** sécurisée
- ✅ **Remboursements** automatiques
- ✅ **Consultation des soldes**
- ✅ **Support FLOOZ et TMONEY**
- ✅ **Tests complets inclus**
- ✅ **Laravel 8, 9, 10, 11, 12** compatible

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

[](#-prérequis)

### Ouverture d'un compte PayGateGlobal

[](#ouverture-dun-compte-paygateglobal)

1. **Créer un compte** sur [PayGateGlobal](https://paygateglobal.com/) (gratuit)
2. **Fournir les documents** requis pour l'activation :
    - Carte Formalités des Entreprises ou Carte d'Immatriculation Fiscale
    - Carte d'Identité du Promoteur
    - Descriptif du Projet
    - Contact et lien de retour
3. **Récupérer votre clé API** depuis le tableau de bord après activation

### Paiements et reversements

[](#paiements-et-reversements)

- **Solde FLOOZ** : Accessible à J+1 via module de remboursement (partenariat MOOV TOGO, ECOBANK, BAT)
- **Solde T-Money** : Reversé tous les 10 jours par PayGate
- **Frais** : 2.5% sur FLOOZ, 3% sur T-Money (aucun frais caché)

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

[](#installation)

```
composer require filano/laravel-paygate-global
```

### Publication des fichiers

[](#publication-des-fichiers)

```
# Publier la configuration
php artisan vendor:publish --tag=paygate-global-config

# Publier les migrations (optionnel)
php artisan vendor:publish --tag=paygate-global-migrations

# Exécuter les migrations
php artisan migrate
```

🚀 Comment ça marche ?
---------------------

[](#-comment-ça-marche-)

### Étape 1 : Créer un compte PayGateGlobal

[](#étape-1--créer-un-compte-paygateglobal)

1. Remplissez le [formulaire d'inscription PayGateGlobal](https://paygateglobal.com/) (gratuit)
2. Recevez l'email de confirmation avec les instructions
3. Accédez à votre tableau de bord (compte inactif par défaut)

### Étape 2 : Activer votre compte

[](#étape-2--activer-votre-compte)

1. Rendez-vous dans la page de profil de votre compte
2. Fournissez les documents requis :
    - Carte Formalités des Entreprises ou Carte d'Immatriculation Fiscale
    - Carte d'Identité du Promoteur
    - Descriptif du Projet
    - Contact
    - Lien de retour (callback URL)
3. Votre compte est activé après vérification

### Étape 3 : Intégrer en 5 minutes

[](#étape-3--intégrer-en-5-minutes)

1. Installez ce package Laravel
2. Configurez votre clé API (disponible dans le tableau de bord)
3. Utilisez les méthodes du package pour accepter les paiements
4. Vos clients peuvent payer immédiatement via FLOOZ ou T-Money

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

[](#configuration)

Ajoutez votre clé API PayGateGlobal dans votre fichier `.env`:

```
# OBLIGATOIRE
PAYGATE_GLOBAL_AUTH_TOKEN=xxxx-xxxxx-468c-81aa-xxxxxxxx

# IMPORTANT - URL où PayGateGlobal enverra les notifications de paiement
# Si non définie, utilisera: https://votre-site.com/paygate-global/webhook
PAYGATE_GLOBAL_CALLBACK_URL=https://votre-site.com/paygate-global/webhook

# OPTIONNEL - Pour la sécurité des webhooks (recommandé)
PAYGATE_GLOBAL_WEBHOOK_SECRET=votre-secret-webhook

# OPTIONNEL - Paramètres avancés (valeurs par défaut)
PAYGATE_GLOBAL_TIMEOUT=30
PAYGATE_GLOBAL_LOG_REQUESTS=true

# DÉVELOPPEMENT UNIQUEMENT - SSL Certificate
# Désactiver la vérification SSL en environnement local (défaut: true)
PAYGATE_GLOBAL_VERIFY_SSL=false
```

Utilisation
-----------

[](#utilisation)

### 1. Initiation de paiement (API)

[](#1-initiation-de-paiement-api)

```
use PayGate\LaravelPayGateGlobal\Facades\PayGateGlobal;

$response = PayGateGlobal::initiatePayment([
    'phone_number' => '+22890123456',
    'amount' => 1000,
    'identifier' => 'ORDER_' . time(),
    'network' => 'FLOOZ', // ou 'TMONEY'
    'description' => 'Achat produit XYZ'
]);

// Réponse
// {
//     "tx_reference": "TXN123456789",
//     "status": 0  // 0 = succès
// }
```

### 2. Génération d'URL de paiement

[](#2-génération-durl-de-paiement)

```
$paymentUrl = PayGateGlobal::generatePaymentUrl([
    'amount' => 5000,
    'identifier' => 'ORDER_123',
    'description' => 'Commande #123',
    'success_url' => url('/payment/success'), // URL après paiement réussi
    // ou 'return_url' => url('/payment/callback'), // Alternative
    'phone' => '+22890123456', // Optionnel - pré-remplir
    'network' => 'FLOOZ' // Optionnel - pré-sélectionner
]);

// Rediriger l'utilisateur
return redirect($paymentUrl);
```

### 3. Vérification du statut

[](#3-vérification-du-statut)

```
// Par référence PayGateGlobal
$status = PayGateGlobal::checkPaymentStatus('TXN123456789');

// Par votre identifiant
$status = PayGateGlobal::checkPaymentStatusByIdentifier('ORDER_123');

// Réponse
// {
//     "tx_reference": "TXN123456789",
//     "status": 0,  // 0=succès, 2=en cours, 4=expiré, 6=annulé
//     "payment_method": "FLOOZ",
//     "amount": 1000
// }
```

### 4. Consultation des soldes

[](#4-consultation-des-soldes)

```
$balance = PayGateGlobal::checkBalance();

// {
//     "flooz": 50000,
//     "tmoney": 25000
// }
```

### 5. Remboursements

[](#5-remboursements)

```
$disbursement = PayGateGlobal::disburse([
    'phone_number' => '+22890123456',
    'amount' => 1000,
    'reason' => 'Remboursement commande ORDER_123',
    'network' => 'FLOOZ',
    'reference' => 'REF_' . time() // Optionnel
]);
```

Gestion des Webhooks
--------------------

[](#gestion-des-webhooks)

### Configuration du webhook

[](#configuration-du-webhook)

PayGateGlobal enverra automatiquement les notifications de paiement à votre URL de callback.

**URL de callback par défaut :** `https://votre-site.com/paygate-global/webhook`

```
// Obtenir l'URL de callback configurée
$callbackUrl = PayGateGlobal::getCallbackUrl();
echo $callbackUrl; // https://votre-site.com/paygate-global/webhook
```

### Écouter les paiements

[](#écouter-les-paiements)

```
// Dans un EventServiceProvider
use PayGate\LaravelPayGateGlobal\Events\PaymentReceived;

protected $listen = [
    PaymentReceived::class => [
        YourPaymentReceivedListener::class,
    ],
];
```

### Listener exemple

[](#listener-exemple)

```
