lamine-minato/orange-money-gateway 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lamine-minato/orange-money-gateway

最新稳定版本:v1.0.3

Composer 安装命令:

composer require lamine-minato/orange-money-gateway

包简介

A PHP package to manage payments via Orange Money in your PHP applications.

README 文档

README

A PHP package to manage payments via Orange Money in your PHP applications.

How it work ?

  • Use following command to install:
composer require lamine-minato/orange-money-gateway
  • Create an OrangeMoneyAction object:
$action = new OrangeMoneyAction(
    orangeBearer: "bearer",
    merchantKey: "merchantKey",
    currency: OrangeMoneyCurrency::XOF,
    amount: 10000,
    returnUrl: "https://api.example.com/return",
    cancelUrl: "https://api.example.com/cancel",
    notifUrl: "https://api.example.com/notif",
    lang: "fr",
    reference: "Minato"
);

Make sure to replace variable by the corrects one

  • Call execute method on OrangeMoneyGateway class:
$response = OrangeMoneyGateway::execute($action);

and Voila!

It will return a OrangeMoneyPaymentResponse object containing payToken and paymentUrl

In case of error, it will throw an exception of type OrangeMoneyException

You can also pass a configuration to the execute method of OrangeMoneyGateway if you want to modify the urls for retrieving the payment url

$action = new OrangeMoneyAction(...);

$config = new OrangeMoneyConfig(
    tokenUrl: "https://api.orange.com/oauth/v3/token",
    proccessUrl: "https://api.orange.com/orange-money-webpay/ml/v1/webpayment",
)

$response = OrangeMoneyGateway::execute($action, $config);

License

The MIT License (MIT). Please see License for more information.

Contributing

Read here for more information.

统计信息

  • 总下载量: 210
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-27