mouctar / orange-money-bundle
Orange Money for Symfony
Package info
github.com/mamadoumouctar/OrangeMoneyBundle
Type:symfony-bundle
pkg:composer/mouctar/orange-money-bundle
0.1
2023-11-08 19:01 UTC
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
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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()); } }