PHPackages                             ericmuigai/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. ericmuigai/pesapal

ActiveLibrary

ericmuigai/pesapal
==================

This is a Pesapal package for Laravel 5 .Please test it first before deploying.

4.2.x-dev(10y ago)91.7k7[1 issues](https://github.com/ericmuigai/pesapal/issues)PHPPHP &gt;=5.3.0

Since Dec 26Pushed 10y ago4 watchersCompare

[ Source](https://github.com/ericmuigai/pesapal)[ Packagist](https://packagist.org/packages/ericmuigai/pesapal)[ RSS](/packages/ericmuigai-pesapal/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Pesapal package for Laravel
===========================

[](#pesapal-package-for-laravel)

Introduction
------------

[](#introduction)

This is a Laravel 5.\* pesapal package. I provided this package as to help since pesapal do not have a package for Laravel. **Pesapal do not have a way to test this so I guess you will have to send money payments to test. Please do ping me whenever you need something.**###  For [Laravel 4.2](https://github.com/ericmuigai/pesapal/tree/4.2)

[](#-for-laravel-42)

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

[](#installation)

add ```
"ericmuigai/pesapal": "3.0.x-dev"
```

 to your composer.json and then ```
composer update
```

this will install the package Once the package is installed add ```
'Ericmuigai\Pesapal\PesapalServiceProvider',
```

 to the providers. after this publish the config file by ```
php artisan config:publish ericmuigai/pesapal
```

then migrate the package table by using ```
php artisan vendor:publish
```

Go to your pesapal account and in the ipn url enter ```
yoursite.com/listenipn
```

 or or the url to your public path/listenipn
You should now find the config.php in the ```
config/pesapal.php
```

Configuration
-------------

[](#configuration)

This is what you should see in the config.php ```
/**
 * this settings are needed in order to work with pesapal
 * enabled(bool) -if true sets the pesapal to live instead of demo website that was not functioning at the time of writing this package
 * consumer_key the consumer key gotten from the pesapal website
 * consumer_secret- The consumer secret gotten from the pesapal website.
 * controller - This is the controller that will be called if the status is valid. A method updateItem($key, $pesapal_merchant_reference) will be called.
 * please note the method that will be called will be updateItem and should be static that is update($key,$reference)
 * Key- the key to protect the method from being called elsewhere
 * redirectTo - the link to where your thankyou page is
 * email - Your email address where you will be emailed on complete transaction
 * name - your name
 * currency - the currency that will be used on payment
 *
 */
return array(
'enabled' => true,
'consumer_key' => "",
'consumer_secret'=>"",
'controller'=>"YourController",
'key'=>"12345",
'redirectTo'=>"/",
'email'=>"your@email.com",
'mail'=>true,
'name'=>"Admin",
'currency'=>"KES",

);

```

You are now set once the right info is entered.How to use
----------

[](#how-to-use)

Now you should be able to call the ```
Pesapal::Iframe($array)
```

from any view you would like the iframe to appear. The array should have this info in the ```
$array
```

 ```
/**
     * generates the iframe from the given details
     * @param array $values this array should contain the fields required by pesapal
     * description - description of the item or service
     * currency - if set will override the config settings you have of currency
     * user -which should be your client user id if you have a system of users
     * first_name- the first name of the user that is paying
     * last_name - the last name of the user that is paying
     * email - this should be a valid email or pesapal will throw an error
     * phone_number -which is optional if you have the email
     * amount - the total amount to be posted to pesapal
     * reference Please Make sure this is a unique key to the transaction. An example is the id of the item or something
     * type - default is MERCHANT
     * frame_height- this is the height of the iframe please provide integers as in 900 without the px
     *
     */'

```

Author
------

[](#author)

Eric Muigai- License
-------

[](#license)

Licensed under MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

3788d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e91fbc4c31b592a3504d55efd0fa6347cf676cb5edc06cdeb2130a25e1614ede?d=identicon)[ericmuigai](/maintainers/ericmuigai)

---

Top Contributors

[![ericmuigai](https://avatars.githubusercontent.com/u/4245475?v=4)](https://github.com/ericmuigai "ericmuigai (5 commits)")

---

Tags

laravelpaymentskenyapesapalpesa

### Embed Badge

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

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

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[a17mad/laravel-cybersource

This package wraps the Cybersource SOAP API in a convenient, easy to use package for Laravel.

136.8k](/packages/a17mad-laravel-cybersource)[threesquared/laravel-paymill

Laravel wrapper for the Paymill API

121.3k](/packages/threesquared-laravel-paymill)

PHPackages © 2026

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