courage/orangemoneyussd 问题修复 & 功能扩展

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

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

courage/orangemoneyussd

Composer 安装命令:

composer require courage/orangemoneyussd

包简介

A Laravel package for USSD ORANGE MONEY payment API

README 文档

README

A Laravel Package for ORANGE MONEY USSD payment api

INSTALLATION

  • Use following command to install:
 composer require courage/orangemoneyussd  
  • Run the following command to publish configuration:
php artisan vendor:publish --provider "Courage\OrangeMoney\Provider\UssdOrangeMoneyServiceProvider"

CONFIGURATION

  • After installation, you will need to add your orange money settings. As shown bellow you will find in config/orange_money_ussd.php the various parameters, which you should update accordingly.
return [

    /*
    |--------------------------------------------------------------------------
    | Default ORANGE MONEY CREDENTIALS
    |--------------------------------------------------------------------------
    |
    | Here you will need to fill your orange money credential to be abel to
    | start with any process of the payment.
    |
    */

    "OM_USERNAME" => env("OM_USERNAME", ""),

    "OM_PASSWORD" => env("OM_PASSWORD", ""),

    "OM_PIN" => env("OM_PIN", ""),

    "OM_CHANNEL_USER_MSISDN" => env("OM_CHANNEL_USER_MSISDN", ""),

    "OM_X_AUTH_TOKEN" => env("OM_X_AUTH_TOKEN", ""),

    "OM_NOTIF_URL" => env("OM_NOTIF_URL", "https://www.ynote.cm/notification"),
];
  • Add this to .env.example and .env
OM_USERNAME=
OM_PASSWORD=
OM_PIN=
OM_CHANNEL_USER_MSISDN=
OM_X_AUTH_TOKEN=
OM_NOTIF_URL=

Example usage

Make a payment

use Courage\OrangeMoney\Facade\UssdOrangeMoney;

$data = [
          "amount" => 1000,
          "subscriberMsisdn" => "22507070707",
          "orderId" => "123456",
          "notifUrl" => "https://example.com/notify"
        ];

$payment = new UssdOrangeMoney();
$response = $payment->pay($data);


$payToken = $response['pay_token']

Check transaction status

use Courage\OrangeMoney\Facade\UssdOrangeMoney;

$payment = new UssdOrangeMoney();
$response = $payment->checkTransactionStatus($payToken);

License

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

Contributing

Read here for more information.

统计信息

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

GitHub 信息

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

其他信息

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