PHPackages                             jchegenye/mypesapal - 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. jchegenye/mypesapal

ActiveLibrary[Payment Processing](/categories/payments)

jchegenye/mypesapal
===================

A simplified PesaPal integration for your Laravel App.

v1.0.1(7y ago)3321[1 issues](https://github.com/Jchegenye/mypesapal/issues)MITPHPPHP &gt;=5.4.0CI failing

Since Apr 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Jchegenye/mypesapal)[ Packagist](https://packagist.org/packages/jchegenye/mypesapal)[ Docs](https://github.com/jchegenye/mypesapal)[ RSS](/packages/jchegenye-mypesapal/feed)WikiDiscussions master Synced 2d ago

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

Simplified Laravel Pesapal
==========================

[](#simplified-laravel-pesapal)

A simplified [PesaPal](https://www.pesapal.com/) integration for your Laravel App.

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

[](#installation)

Via Composer

```
composer require jchegenye/mypesapal
```

Usage
-----

[](#usage)

Add this class to your Controller.

```
use App\Http\JTech\PesaPal\PesaPalIframe;
```

Run this `vendor:publish` command to publish Pesapal configaration file.

```
What's inside config file?

    1. Application Environment:

        | Pesapal will utilize this option to determine which
        | mode your App is running, either Sandbox or Live
        |
        | Local - Means your App is running on a Sandbox Mode.
        | Production - Means your App is running on a Live Mode

    2. Authentication / Configuration

        | 'token_params' => NULL,
        | 'consumer_key' => env('PESAPAL_CONSUMER_KEY', '*** CONSUMER KEY ***'),
        | 'consumer_secret' => env('PESAPAL_CONSUMER_SECRET', '*** YOUR CONSUMER SECRET ***'),
        | 'live_iframelink' => 'https://www.pesapal.com/API/PostPesapalDirectOrderV4',
        | 'demo_iframelink' => 'http://demo.pesapal.com/api/PostPesapalDirectOrderV4'

    3. Define the callback_url

        | This is the full url pointing to the page the iframe redirects to
        | after processing the order on pesapal.com

        'callback_url' => env('PESAPAL_CALLBACK_URL', 'http://test.com/payment-gateways-php/pesapal-php/'),

    4. Field Names

        | You may wish for to select prefered form details posted by your
        | App to be used by pesapal.
        |
        | You can add more `Fields` here if you wish.
        |
        | NOTE: default value = MERCHANT

        'fields' => [

            'amount' => 'number_format(PESAPAL_FIELD_AMOUNT, 2)', //format amount to 2 decimal places
            'description' => 'PESAPAL_FIELD_DESC',
            'type' => 'MERCHANT', //default value = MERCHANT
            'reference' => 'PESAPAL_FIELD_REF', //unique order id of the transaction, generated by merchant
            'first_name' => 'PESAPAL_FIELD_FNAME',
            'last_name' => 'PESAPAL_FIELD_LNAME',
            'email' => 'PESAPAL_FIELD_EMAIL',
            'phonenumber' => 'PESAPAL_FIELD_PHONE' //ONE of email or phonenumber is required

        ]

```

To return Pesapal [`Response`](https://laravel.com/docs/5.7/requests) use this `pesapal()` Method.

In-order for Pesapal to obtain an instance of the current HTTP `Request` add this `$request` variable.

See below example:

```
response()->pesapal($request);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

2593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c67f2a67268473c47fefec646347236594c3f482bdbaa60250334fd1959d821?d=identicon)[Jchegenye](/maintainers/Jchegenye)

---

Top Contributors

[![Jchegenye](https://avatars.githubusercontent.com/u/10044310?v=4)](https://github.com/Jchegenye "Jchegenye (10 commits)")

---

Tags

laravelpaymentpesapalmypesapalgetway

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jchegenye-mypesapal/health.svg)

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

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)[dena-a/iran-payment

a Laravel package to handle Internet Payment Gateways for Iran Banking System

312.4k1](/packages/dena-a-iran-payment)

PHPackages © 2026

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