Download the PHP package elgiosoft/elgiopay-php-sdk without Composer

On this page you can find all versions of the php package elgiosoft/elgiopay-php-sdk. 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 elgiopay-php-sdk

ElgioPay PHP SDK

Latest Stable Version Total Downloads License PHP Version Require

PHP SDK for integrating with the ElgioPay API. Optimized for mobile money payments in Cameroon and West Africa.

Features

Installation

Requirements

Table of Contents

Usage

Basic Setup

Using Environment Variables (Recommended)

Create a .env file in your project root:

Manual Configuration

Constructor signature: new ElgioPayClient(?string $environment = null, ?string $apiKey = null). Both fall back to ELGIOPAY_ENV / ELGIOPAY_API_KEY env vars when omitted.

Creating a payment

Every payment β€” MTN, Orange, current markets and any we add later β€” goes through a single method: initiatePayment(). Pick the payment_method you need and pass the payload.

Provide either payment_method or channel_code (a code from listChannels()). With channel_code, the currency comes from the channel:

MTN Mobile Money (Cameroon)

Orange Money (Cameroon)

Normalising Cameroon phone numbers

If your customer input arrives in mixed formats (677…, 237…, +237…), pipe it through normalizeCameroonPhone() before calling initiatePayment().

Channels

List the payment channels available to your app (mobile money, bills, cash-in). Pass a channel's code as channel_code on initiatePayment() / createPayout(). The provider that fulfils a channel is internal and never returned.

Connected Merchants (platform apps)

If your merchant is a platform, you can onboard sub-merchants, charge on their behalf and settle them. Two things must both be true or the API answers 403 NOT_A_PLATFORM: the merchant is a platform, and the specific app whose key you're using is flagged as a platform app. A platform's own storefront app is deliberately not one.

A connected merchant lives inside exactly one app: the app whose key created it. There's no app parameter, and a merchant created with app A's key is invisible to app B's key β€” listing, lookup, balance, payouts and sub_merchant_id charges are all scoped to the calling app.

Branch on the machine-readable code rather than the message:

Codes: NOT_A_PLATFORM, NOT_YOUR_MERCHANT, MERCHANT_INACTIVE, PAYOUT_FAILED, VALIDATION_ERROR, and on a charge β€” SUB_MERCHANT_NOT_FOUND / _NOT_CONNECTED / _NOT_YOURS / _INACTIVE.

Webhooks (connected_merchant.created, .kyc.submitted, .kyc.approved, .kyc.rejected, .payout.paid, .payout.failed, .deactivated, .reactivated) are delivered to the platform's webhook URL, never the sub-merchant's.

Two current limitations. There's no hosted KYC link yet, so a sub-merchant can't verify itself through the API β€” approval happens operator-side. And capabilities is advisory: a merchant reporting charges_enabled: false can still take payments, because the charge path doesn't check KYC status. Don't treat it as a block.

Check Payment Status

Verify Payment

Payment with Retry

Supported Payment Methods

Supported Currencies

Phone Number Formats

Cameroon: +237 6XX XXX XXX or +237 7XX XXX XXX

Quick Start for Cameroon

Configuration

API Keys

You only need two things to get started:

  1. API Key: Get your API key from the ElgioPay dashboard
  2. Environment: Choose between sandbox (testing) or live (production)

Environment Variables (Recommended)

Then in your code β€” both are picked up automatically:

Error Handling

The SDK throws ElgioPayException for all API-related errors:

Webhook Handling

Set up webhooks in your application to receive payment status updates:

Testing

Sandbox Environment

Use sandbox API keys (starting with pk_test_) for testing. All sandbox transactions are simulated and no real money is processed.

Getting API Keys

  1. Sign up at sandbox.elgiopay.com
  2. Create a new application
  3. Copy your API keys:
    • pk_test_... for testing
    • pk_live_... for production

Test Phone Numbers

For sandbox testing, use these test phone numbers:

All sandbox payments will automatically succeed after a few seconds.

Support

Contributing

We welcome contributions! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

About Elgiosoft

ElgioPay PHP SDK is developed by Elgiosoft Ltd, a leading fintech company specializing in mobile money solutions for Africa.


All versions of elgiopay-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.0 || ^8.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 elgiosoft/elgiopay-php-sdk contains the following files

Loading the files please wait ...