ibracilinks/orange-money
Composer 安装命令:
composer require ibracilinks/orange-money
包简介
A laravel package for Orange Money Web Payment API.
README 文档
README
Installation
- Use following command to install:
composer require ibracilinks/orange-money
- Add the service provider to your
$providersarray inconfig/app.phpfile like:
Ibracilinks\OrangeMoney\Providers\OrangeMoneyServiceProvider::class,
- Add the alias to your
$aliasesarray inconfig/app.phpfile like:
'OrangeMoney' => Ibracilinks\OrangeMoney\Facades\OrangeMoney::class,
- Run the following command to publish configuration:
php artisan vendor:publish --provider "Ibracilinks\OrangeMoney\Providers\OrangeMoneyServiceProvider"
Configuration
- After installation, you will need to add your orangemoney settings. Following is the code you will find in config/orangemoney.php, which you should update accordingly.
return [ 'auth_header' => env('OM_AUTH_HEADER', ''), 'merchant_key' => env('OM_MERCHANT_KEY', ''), 'return_url' => env('OM_RETURN_URL', ''), 'cancel_url' => env('OM_CANCEL_URL', ''), 'notif_url' => env('OM_NOTIf_URL', '') ];
- Add this to
.env.exampleand.env
OM_AUTH_HEADER= OM_MERCHANT_KEY= OM_RETURN_URL= OM_CANCEL_URL= OM_NOTIf_URL=
Basic Usage
Following are some ways through which you can access the OrangeMoney provider:
use Ibracilinks\OrangeMoney\OrangeMoney; $payment = new OrangeMoney(); $data = [ "merchant_key"=> '*********', "currency"=> "OUV", "order_id"=> "".time()."", "amount" => 5000, "return_url"=> 'http://www.your-website.com/callback/return', "cancel_url"=> 'http://www.your-website.com/callback/cancel', "notif_url"=>'http://www.your-website.com/callback/notif', "lang"=> "fr", "reference"=> "Your Website" ]; $payment->webPayment($data);
License
The MIT License (MIT). Please see License for more information.
Contributing
Read here for more information.
统计信息
- 总下载量: 1.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-05