PHPackages                             mwanziamutua/omnipay-pesapal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. mwanziamutua/omnipay-pesapal

ActiveLibrary[Payment Processing](/categories/payments)

mwanziamutua/omnipay-pesapal
============================

Pesapal V3 gateway for Omnipay payment processing library

v1.0.0.01(3y ago)015[1 issues](https://github.com/mwanziamutua/omnipay-pesapal/issues)MITPHP

Since Nov 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mwanziamutua/omnipay-pesapal)[ Packagist](https://packagist.org/packages/mwanziamutua/omnipay-pesapal)[ Docs](https://github.com/mwanziamutua/omnipay-pesapal)[ RSS](/packages/mwanziamutua-omnipay-pesapal/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Omnipay: Pesapal
================

[](#omnipay-pesapal)

**Pesapal API v3 driver for the Omnipay PHP payment processing library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 7.2+. This package implements the latest Pesapal API support for Omnipay.

Pesapal gateway API [documentation](https://developer.pesapal.com/how-to-integrate/api-30-json/api-reference/)

Installation
------------

[](#installation)

This package is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
composer require mwanziamutua/pesapal

```

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

- Pesapal

You need to set your `consumerKey`, and `consumerSecret`. Setting `testMode` to true will use the `sandbox` environment.

Process your customer order like so:

```
$gateway = GatewayFactory::createInstance($consumerKey, $consumerSecret, true);

try {
    $orderNo = uniqid('', true);
    $returnUrl = 'http://localhost:80/gateway-return.php';
    $notifyUrl = 'http://127.0.0.1/online-payments/uuid/notify';
    $ipnId = ' b62dbd97-3b95-43d2-8969-df616360f0ab';
    $description = 'Shopping at myAwesomeStore.com';

    $pesapalOrder = [
        'purchaseData' => [
            'id' => $orderNo,
            'amount'            => 150,
            'currency'          => 'KES',
            'description' => $description,
            'callback_url' => $returnUrl,
            'notification_id' => $ipnId,
            'billing_address'  => [
                "email_address" => "john.doe@example.com",
                "phone_number" => null,
                "country_code" => "",
                "first_name" => "John",
                "middle_name" => "",
                "last_name" => "Doe",
                "line_1" => "",
                "line_2" => "",
                "city" => "",
                "state" => "",
                "postal_code" => null,
                "zip_code" => null
            ]
        ],
    ];

    $response = $gateway->purchase($pesapalOrder);
```

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository.

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/mwanziamutua/omnipay-pesapal/issues), or better yet, fork the library and submit a pull request.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8309d8bebf350a5efc158410d5321ab7af385ea03ceaac62d4d9a7757754d847?d=identicon)[mwanziamutua](/maintainers/mwanziamutua)

---

Tags

paymentgatewaypaymerchantomnipaypurchasepesapal

### Embed Badge

![Health badge](/badges/mwanziamutua-omnipay-pesapal/health.svg)

```
[![Health](https://phpackages.com/badges/mwanziamutua-omnipay-pesapal/health.svg)](https://phpackages.com/packages/mwanziamutua-omnipay-pesapal)
```

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
