mouctar / orange-money-bundle
Orange Money for Symfony
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.2
- symfony/config: ^6.0
- symfony/dependency-injection: ^6.0
- symfony/http-foundation: ^6.0
- symfony/routing: ^6.0
- symfony/translation: ^6.0
- symfony/yaml: ^6.3
- twig/twig: ^3.0
Requires (Dev)
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
README
The OrangeMoneyBundle makes integration easy of the Orange Money payment API on an app Symfony
Installation and configuration
Pretty simple with composer, run
composer require mouctar/orange-money-bundle
Add OrangeMoneyBundle to your application kernel
If you don't use flex (you should), you need to manually enable bundle:
// app/AppKernel.php public function registerBundles() { return [ // ... new Tm\OrangeMoneyBundle\OrangeMoneyBundle(), // ... ]; }
Configuration example
You can configure default application
YAML:
# config/packages/orange_money.yaml orange_money: client_id: '%env(OM_CLIENT_ID)%' client_secret: '%env(OM_CLIENT_SECRET)%' environment: sandbox
How it uses
Fetching Orange Money Public key
<?php // src/Controller/LuckyController.php namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; class PublicKeyController extends AbstractController { public function fetch(PublicKeyService $service): JsonResponse { return new JsonResponse($service()); } }