Download the PHP package ibracilinks/orange-money without Composer

On this page you can find all versions of the php package ibracilinks/orange-money. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package orange-money

Orange Money for Laravel

A Laravel package for the Orange Money Web Payment API.

Requirements

Installation

Laravel automatically discovers the service provider and the OrangeMoney facade.

Publish the configuration:

Configuration

Add your settings to .env:

OM_AUTH_HEADER is the Base64-encoded client_id:client_secret value, without the Basic prefix.

The defaults use Orange's development endpoint and test currency. Both payment creation and transaction status use the configured OM_API_PATH.

OM_TIMEOUT and OM_CONNECT_TIMEOUT are in seconds (defaults: 30 and 10). They apply to the built-in HTTP client, so a slow Orange Money response cannot block a PHP worker forever.

Access tokens are kept in your default Laravel cache store, so a payment or a status check does not need a new authentication request each time. OM_TOKEN_TTL is the maximum number of seconds a token is kept (default 3600, 0 turns the cache off). A token is also dropped one minute before Orange Money expires it, and a response without expires_in is never cached. The cache key is derived from a hash of OM_AUTH_HEADER, so the credentials themselves are not part of it. If Orange Money rejects a cached token with a 401, the package requests a new one and sends the request again, once. getAccesToken() always requests a new token and replaces the cached one.

After changing settings in an application that caches configuration, run php artisan config:cache.

Going to production in Mali

Once you have created and validated your test application with the Orange Money WebPay Dev API and received approval from the Orange teams to go to production, follow the steps in Orange's Getting started document to create your production application.

The differences from the development setup are:

Configure the package to use the Mali production API:

Update OM_AUTH_HEADER with the new application's Base64-encoded client_id:client_secret, set OM_MERCHANT_KEY to your Mali production merchant key, and set OM_CURRENCY to the currency enabled for your production merchant account. Set your callback URLs to the corresponding routes in your production application.

If your application caches configuration, run php artisan config:cache after updating these settings.

Usage

Use the facade:

The merchant key, currency, and callback URLs come from configuration. You can override them in the payment data. Your application must implement the callback routes.

The amount is required and must be greater than zero, otherwise an InvalidArgumentException is thrown before any request is sent. If you do not pass an order_id, a random one (OM_ followed by 16 hexadecimal characters) is generated. The order_id that was sent is always part of the returned array, so you can store it and check the transaction later.

Check a transaction using the original order ID, amount, and payment token:

You can also resolve the service through dependency injection or construct it directly:

A custom Guzzle client can be passed as the second constructor argument. The timeout settings above then no longer apply: configure them on your own client.

Errors

Successful calls return the decoded response as an array. Any failure throws Ibracilinks\OrangeMoney\Exceptions\OrangeMoneyException, which extends RuntimeException. This covers authentication failures, HTTP errors from Orange Money (4xx and 5xx), network failures and timeouts, and responses that are not valid JSON. The exception gives you:

Verify the payment status with Orange Money before fulfilling an order; a browser return alone is not proof of payment.

Upgrading

This version requires Laravel 13 and PHP 8.3+. Upgrade the consuming application before installing it. Remove manual provider and alias entries if you previously added them; package discovery handles registration.

The existing webPayment, checkTransactionStatus, and getAccesToken methods remain available. The legacy OM_NOTIf_URL environment variable remains a fallback, but new installations should use OM_NOTIF_URL. Constructor configuration overrides are now applied.

Breaking changes to handle when upgrading:

If you previously published config/orangemoney.php, merge the new api_path, currency, timeout, connect_timeout, token_ttl, and notif_url settings from src/config/orangemoney.php into your copy.

Development

The tests boot Laravel using Orchestra Testbench and mock Orange API responses; no credentials or real payments are needed. CI runs on PHP 8.3, 8.4, and 8.5 with the latest dependencies, and on PHP 8.3 with the lowest ones.

License

MIT

Contributing

See CONTRIBUTING.md.


All versions of orange-money with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version ^7.9
illuminate/support Version ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ibracilinks/orange-money contains the following files

Loading the files please wait ...