Looking to hire Laravel developers? Try LaraJobs

laravel maintained by simplypaye

Description
SimplyPaye Mobile Money SDK for Laravel — Orange Money, Airtel Money, M-Pesa (DRC). API: https://api-simply-pay.net
Author
Last update
2026/05/29 17:01 (dev-main)
License
Downloads
0

Comments
comments powered by Disqus

simplypaye/laravel

Package Composer pour intégrer SimplyPaye dans une application Laravel.

Portail marchand : marchand-simplypaye.store

Installation (projet Laravel)

Depuis ce dépôt (path)

Dans le composer.json de votre app Laravel :

{
  "repositories": [
    {
      "type": "path",
      "url": "../apiserver/integrations/laravel/simplypaye-laravel"
    }
  ],
  "require": {
    "simplypaye/laravel": "@dev"
  }
}
composer require simplypaye/laravel:@dev
php artisan vendor:publish --tag=simplypaye-config

Packagist

composer require simplypaye/laravel

Repository : github.com/Elmightypower/simplypaye-laravel

Configuration .env

SIMPLYPAYE_MERCHANT_CODE=108953
SIMPLYPAYE_API_KEY=
SIMPLYPAYE_API_BASE=https://api-simply-pay.net
SIMPLYPAYE_MODE=production
# SIMPLYPAYE_MODE=sandbox

Usage

use SimplyPaye\Laravel\Facades\SimplyPaye;

$result = SimplyPaye::initiateMobilePayment([
    'phone' => '243812345678',
    'amount' => '100',
    'currency' => 'CDF',
    'reference' => 'INV-'.now()->timestamp,
    'callbackUrl' => route('simplypaye.callback'),
]);

$orderNumber = $result['orderNumber'];

// Plus tard
$status = SimplyPaye::checkPaymentStatus($orderNumber);
if (SimplyPaye::isPaymentSuccess($status)) {
    // marquer commande payée
}

Injection :

public function __construct(private SimplyPayeClient $simplyPaye) {}

Sandbox

// .env SIMPLYPAYE_MODE=sandbox
SimplyPaye::setSimulationStatus($orderNumber, 'success');

Exemple complet (controller + routes)

Voir ../examples/README.md.