PHPackages                             dontka/all-php-payment-gateway-manager - 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. dontka/all-php-payment-gateway-manager

ActiveLibrary[Payment Processing](/categories/payments)

dontka/all-php-payment-gateway-manager
======================================

Complete PHP payment gateway manager supporting Stripe, PayPal, Square, Wise, Coinbase and more

v1.0.0(2mo ago)02MITPHPPHP ^8.1CI failing

Since Feb 10Pushed 2mo agoCompare

[ Source](https://github.com/dontka/all-php-payment-gateway-manager)[ Packagist](https://packagist.org/packages/dontka/all-php-payment-gateway-manager)[ Docs](https://github.com/dontka/all-php-payment-gateway-manager)[ RSS](/packages/dontka-all-php-payment-gateway-manager/feed)WikiDiscussions main Synced 1mo ago

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

💳 PHP Payment Gateway Manager
=============================

[](#-php-payment-gateway-manager)

Un package PHP complète et modulaire pour intégrer facilement **tous les principaux systèmes de paiement** en un clic !

🌟 Caractéristiques Principales
------------------------------

[](#-caractéristiques-principales)

✅ **Installation "Un Clic"** - Installer et configurer plusieurs gateways en minutes
✅ **Interface Unifiée** - Une seule API pour Stripe, PayPal, Square, Wise, Coinbase, etc.
✅ **Webhooks Automatiques** - Gestion centralisée de tous les webhooks
✅ **Dashboard Complet** - Interface d'administration pour gérer les paiements
✅ **Haute Sécurité** - Chiffrement, validation, audit trail
✅ **Tests Unitaires** - 100% de couverture de tests
✅ **Documentation Complète** - Guides complets pour chaque gateway
✅ **Support Multi-framework** - Laravel, Symfony, Slim, Plain PHP

---

🚀 Démarrage Rapide
------------------

[](#-démarrage-rapide)

### 1️⃣ Installation

[](#1️⃣-installation)

#### Option A: Via Packagist (Une fois publié)

[](#option-a-via-packagist-une-fois-publié)

```
composer require dontka/all-php-payment-gateway-manager
```

#### Option B: Via Chemin Local (Développement)

[](#option-b-via-chemin-local-développement)

Si vous testez localement, ajouter à votre `composer.json`:

```
{
    "repositories": [
        {
            "type": "path",
            "url": "../all-php-payment-gateway-manager",
            "options": {
                "symlink": true
            }
        }
    ],
    "require": {
        "dontka/all-php-payment-gateway-manager": "@dev"
    }
}
```

Puis:

```
composer update
```

### 2️⃣ Configuration selon votre Framework

[](#2️⃣-configuration-selon-votre-framework)

#### 🔷 **Laravel** (Recommandé)

[](#-laravel-recommandé)

**Étape 1** : Enregistrer le Service Provider (généralement automatique)

```
// config/app.php
'providers' => [
    // ...
    PaymentGateway\ServiceProvider::class,
],

'aliases' => [
    // ...
    'Payment' => PaymentGateway\Facades\Payment::class,
],
```

**Étape 2** : Publier les fichiers de configuration

```
php artisan vendor:publish --provider="PaymentGateway\ServiceProvider"
```

**Étape 3** : Exécuter les migrations

```
php artisan migrate
```

**Étape 4** : Configurer les variables d'environnement

```
# Copier le fichier d'exemple
cp .env.example .env

# Ajouter vos clés API
PAYPAL_CLIENT_ID=your_sandbox_client_id
PAYPAL_CLIENT_SECRET=your_sandbox_secret

STRIPE_API_KEY=sk_test_...
STRIPE_SECRET_KEY=sk_test_...
```

---

#### 🔹 **Symfony** (Support PSR-4)

[](#-symfony-support-psr-4)

**Étape 1** : Installer le package

```
composer require symfony/http-client
composer require dontka/all-php-payment-gateway-manager
```

**Étape 2** : Créer un service dans `config/services.yaml`

```
services:
  payment.manager:
    class: PaymentGateway\Core\PaymentManager
    arguments:
      - '%env(PAYPAL_CLIENT_ID)%'
      - '%env(PAYPAL_CLIENT_SECRET)%'
      - '%env(STRIPE_API_KEY)%'
```

**Étape 3** : Utiliser dans votre contrôleur

```
namespace App\Controller;

use PaymentGateway\Core\PaymentManager;

class PaymentController extends AbstractController
{
    public function __construct(private PaymentManager $paymentManager) {}

    public function charge()
    {
        $result = $this->paymentManager->charge([
            'gateway' => 'paypal',
            'amount' => 99.99,
            'currency' => 'USD',
        ]);
    }
}
```

---

#### 🔸 **PHP Vanilla** (Sans Framework)

[](#-php-vanilla-sans-framework)

**Étape 1** : Charger l'autoloader

```
