PHPackages                             arrowpay/arrowbaze - 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. arrowpay/arrowbaze

ActiveLibrary[Payment Processing](/categories/payments)

arrowpay/arrowbaze
==================

Package for Orange Money Integration by ArrowBaze

v1.0.1(7mo ago)01MITPHPPHP &gt;=8.0

Since Sep 21Pushed 7mo agoCompare

[ Source](https://github.com/arrowbaze/arrowpay)[ Packagist](https://packagist.org/packages/arrowpay/arrowbaze)[ RSS](/packages/arrowpay-arrowbaze/feed)WikiDiscussions main Synced 1mo ago

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/ddf9be0e1980b5c012a3f0eb61272186494b77f97b0a8d4e6b2d431d2937ce78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6172726f777061792f6172726f7762617a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arrowpay/arrowbaze)[![Total Downloads](https://camo.githubusercontent.com/de9c25e11e90a29bd8c2b687240d8e616fe81d58155854b14d6780af100c2444/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6172726f777061792f6172726f7762617a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arrowpay/arrowbaze)

ArrowPay est un **package PHP** qui intègre **Orange Money Webpay** dans vos applications (Laravel, Symfony, etc.), offrant un moyen simple et sécurisé d’accepter des paiements.

---

Avant d’utiliser ce package, demandez une **clé de licence** à **ArrowBAZE** via [arrowbaze.com/contact](https://arrowbaze.com/contact).

🚀 Installation
--------------

[](#-installation)

Installer le package via Composer :

```
composer require arrowpay/arrowbaze
```

---

⚙️ Publication de la configuration &amp; migrations
---------------------------------------------------

[](#️-publication-de-la-configuration--migrations)

Après l’installation, publiez les fichiers nécessaires (configuration + migrations) :

### 1. Publier la configuration

[](#1-publier-la-configuration)

```
php artisan vendor:publish --provider="Arrowpay\ArrowBaze\ArrowBazeServiceProvider" --tag=config
```

Cela va créer le fichier suivant :

```
config/arrowbaze.php

```

---

### 2. Publier la migration

[](#2-publier-la-migration)

```
php artisan vendor:publish --provider="Arrowpay\ArrowBaze\ArrowBazeServiceProvider" --tag=migrations
```

Cela va créer le fichier de migration correspondant dans :

```
database/migrations/xxxx_xx_xx_xxxxxx_create_arrowbaze_tokens_table.php

```

---

### 3. Exécuter la migration

[](#3-exécuter-la-migration)

```
php artisan migrate
```

Ceci va créer la table nécessaire pour stocker les tokens de vos paiements.
---------------------------------------------------------------------------

[](#ceci-va-créer-la-table-nécessaire-pour-stocker-les-tokens-de-vos-paiements)

🔑 Configuration
---------------

[](#-configuration)

Mettez à jour votre fichier `.env` :

```
# Clé de licence (unique par partenaire/domaine)
ARROWPAY_LICENSE_KEY="VOTRE_CLE_LICENCE_ARROWBAZE"

# Identifiants Partenaires (fournis par Orange Money)
ARROWPAY_MERCHANT_KEY="VOTRE_MERCHANT_KEY"
ARROWPAY_CLIENT_ID="VOTRE_CLIENT_ID"
ARROWPAY_CLIENT_SECRET="VOTRE_CLIENT_SECRET"

# Routes (relatives à votre domaine)
ARROWPAY_RETURN_ROUTE="my-payments/return/{orderId}"
ARROWPAY_CANCEL_ROUTE="my-payments/cancel"
ARROWPAY_NOTIFY_ROUTE="my-payments/notify"

# Devise par défaut
ARROWPAY_CURRENCY="XOF"
```

---

🏷️ Alias Laravel
----------------

[](#️-alias-laravel)

Ajoutez l’alias suivant dans `config/app.php` si ce n’est pas déjà fait :

```
'aliases' => [
    // ...
    'ArrowPay' => Arrowpay\ArrowBaze\Facades\ArrowPay::class,
],
```

Cela vous permet d’appeler directement :

```
ArrowPay::initializePayment([...]);
```

---

📦 Utilisation
-------------

[](#-utilisation)

### Initialiser un paiement

[](#initialiser-un-paiement)

```
use ArrowPay;

$payment = ArrowPay::initializePayment([
    'order_id'   => 'ORDER123',
    'amount'     => 5000,
    'return_url' => route('my.return', ['orderId' => 'ORDER123']),
    'cancel_url' => route('my.cancel'),
    'notif_url'  => route('my.notify'),
    'currency'   => 'XOF', // ou OUV en environnement test
    'reference'  => 'APP_NAME',
    'lang'       => 'fr',
]);

return redirect($payment['payment_url']);
```

---

### Vérifier le statut d’une transaction

[](#vérifier-le-statut-dune-transaction)

```
$status = ArrowPay::checkTransactionStatus('ORDER123');

if ($status['status'] === 'SUCCESS') {
    // Marquer la commande comme payée
}
```

---

⚡ Routes
--------

[](#-routes)

Vous avez deux choix :

### 1. **Définir vos propres routes**

[](#1-définir-vos-propres-routes)

Exemple de route personnaliser (`routes/web.php`) :

```
use App\Http\Controllers\PaymentController;

Route::prefix('my-payments')->group(function () {
    Route::post('pay', [PaymentController::class, 'pay'])->name('my.pay');
    Route::get('return/{orderId}', [PaymentController::class, 'handleReturn'])->name('my.return');
    Route::get('cancel', [PaymentController::class, 'handleCancel'])->name('my.cancel');
    Route::post('notify', [PaymentController::class, 'handleNotify'])->name('my.notify');
});
```

### 2. **Utiliser les routes par défaut fournies par le package**

[](#2-utiliser-les-routes-par-défaut-fournies-par-le-package)

Si vous ne définissez rien, le package enregistre automatiquement :

- `arrowpay/return/{orderId}`
- `arrowpay/cancel`
- `arrowpay/notify`

---

```
## ⚡ Démo Rapide (Quickstart Demo)

Une **intégration prête à l’emploi** pour tester en quelques minutes.

---

### 1. Créer le Modèle `Payment` et sa Migration

```bash
php artisan make:model Payment -m
```

Dans la migration :

```
Schema::create('payments', function (Blueprint $table) {
    $table->id();
    $table->string('order_id')->unique();
    $table->string('status')->default('pending');
    $table->json('payload')->nullable();
    $table->string('payment_url')->nullable();
    $table->string('pay_token')->nullable();
    $table->timestamps();
});
```

Exécuter :

```
php artisan migrate
```

---

### 2. Ajouter les Routes (`routes/web.php` ou `routes/api.php`)

[](#2-ajouter-les-routes-routeswebphp-ou-routesapiphp)

```
use App\Http\Controllers\PaymentController;
use Illuminate\Support\Facades\Route;

Route::prefix('my-payments')->group(function () {
    Route::post('pay', [PaymentController::class, 'pay'])->name('my.pay');
    Route::get('return/{orderId}', [PaymentController::class, 'handleReturn'])->name('my.return');
    Route::get('cancel', [PaymentController::class, 'handleCancel'])->name('my.cancel');
    Route::post('notify', [PaymentController::class, 'handleNotify'])->name('my.notify');
});
```

---

### 3. Créer le `PaymentController`

[](#3-créer-le-paymentcontroller)

```
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Payment;
use ArrowPay;

class PaymentController extends Controller
{
    public function pay(Request $request)
    {
        $orderId = 'ABZ_' . uniqid();

        $payload = [
            'amount'      => $request->amount ?? 100,
            'currency'    => config('arrowbaze.currency', 'XOF'),
            'reference'   => $request->reference ?? 'ArrowPay Démo',
            'return_url'  => route('my.return', ['orderId' => $orderId]),
            'cancel_url'  => route('my.cancel'),
            'notify_url'  => route('my.notify'),
            'order_id'    => $orderId,
            'lang'        => 'fr'
        ];

        $response = ArrowPay::initializePayment($payload);

        Payment::create([
            'order_id'    => $orderId,
            'status'      => 'pending',
            'payload'     => $payload,
            'payment_url' => $response['payment_url'] ?? null,
            'pay_token'   => $response['pay_token'] ?? null,
        ]);

        return redirect($response['payment_url']);
    }

    public function handleReturn($orderId)
    {
        $payment = Payment::where('order_id', $orderId)->firstOrFail();

        return view('payments.return', compact('payment'));
    }

    public function handleCancel()
    {
        return view('payments.cancel');
    }

    public function handleNotify(Request $request)
    {
        $payment = Payment::where('order_id', $request->txnid)->first();

        if ($payment) {
            $payment->update([
                'status' => $request->status == 201 ? 'success' : 'failed',
            ]);
        }

        return response()->json(['message' => 'Notification reçue']);
    }
}
```

---

### 4. Créer les Vues Démo

[](#4-créer-les-vues-démo)

**resources/views/payments/return.blade.php**

```
Retour de Paiement
Numéro de commande : {{ $payment->order_id }}
Statut : {{ $payment->status }}
```

**resources/views/payments/cancel.blade.php**

```
Paiement Annulé
Votre paiement a été annulé.
```

---

### 5. Tester

[](#5-tester)

- Accédez à `/my-payments/pay`
- Vous serez redirigé vers **Orange Money Webpay** (sandbox)
- Effectuez ou annulez un paiement
- Les notifications mettront automatiquement à jour votre base de données

---

📜 Licence
---------

[](#-licence)

MIT — voir [LICENSE](LICENSE).

---

📧 Support
---------

[](#-support)

Pour toute aide à l’intégration, contactez **ArrowPay Support** : 📩 🌍 [Site Web](https://arrowbaze.com/contact)

```

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance62

Regular maintenance activity

Popularity1

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb7237216bf626428e5b5fd75df74b5f78ad1695bcb8eabcc1b045b4d91afa6c?d=identicon)[arrowbazeoffshore](/maintainers/arrowbazeoffshore)

### Embed Badge

![Health badge](/badges/arrowpay-arrowbaze/health.svg)

```
[![Health](https://phpackages.com/badges/arrowpay-arrowbaze/health.svg)](https://phpackages.com/packages/arrowpay-arrowbaze)
```

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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