PHPackages                             chitanga/pesepay - 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. chitanga/pesepay

ActiveLibrary[Payment Processing](/categories/payments)

chitanga/pesepay
================

Seamless Pesepay integration package

v1.0.0(1y ago)026[4 PRs](https://github.com/TafadzwaLawrence/pesepay-laravel/pulls)MITPHPPHP ^8.0CI passing

Since Apr 10Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/TafadzwaLawrence/pesepay-laravel)[ Packagist](https://packagist.org/packages/chitanga/pesepay)[ Docs](https://github.com/TafadzwaLawrence/pesepay-laravel)[ GitHub Sponsors](https://github.com/:vendor_name)[ RSS](/packages/chitanga-pesepay/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (14)Versions (7)Used By (0)

:Laravel Pesepay
================

[](#laravel-pesepay)

---

Pesepay Payment Gateway for Laravel Latest Version on Packagist GitHub Tests Action Status Total Downloads

A comprehensive Laravel package for integrating Pesepay payment gateway into your application. This package provides seamless Ecocash and card payment processing with robust error handling and status checking.

Features
========

[](#features)

Ecocash payments integration

Card payments processing

Payment status verification

Comprehensive exception handling

Configurable through environment variables

---

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

[](#installation)

You can install the package via composer:

```
composer require chitanga/pesepay
```

You can publish with:

```
php artisan vendor:publish --tag="pesepay-config"
```

You can publish the config file with:

```
php artisan vendor:publish --tag=":package_slug-config"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | API Credentials
    |--------------------------------------------------------------------------
    */
    'integration_key' => env('PESEPAY_INTEGRATION_KEY'),
    'encryption_key' => env('PESEPAY_ENCRYPTION_KEY'),

    /*
    |--------------------------------------------------------------------------
    | Payment URLs
    |--------------------------------------------------------------------------
    */
    'return_url' => env('PESEPAY_RETURN_URL'),
    'result_url' => env('PESEPAY_RESULT_URL'),

    /*
    |--------------------------------------------------------------------------
    | Default Settings
    |--------------------------------------------------------------------------
    */
    'default_currency' => 'USD',
    'brand_name' => env('PESEPAY_BRAND_NAME', env('APP_NAME', 'Laravel')),

];
```

Configuration Add these environment variables to your .env file:

```
PESEPAY_INTEGRATION_KEY=your_integration_key
PESEPAY_ENCRYPTION_KEY=your_encryption_key
PESEPAY_RETURN_URL=https://your-app.com/return
PESEPAY_RESULT_URL=https://your-app.com/webhook
PESEPAY_BRAND_NAME="Your Business Name"
```

Usage
-----

[](#usage)

```
use Chitanga\Pesepay\PesepayService;

$pesepay = new PesepayService(
    config('pesepay.integration_key'),
    config('pesepay.encryption_key'),
    config('pesepay.return_url'),
    config('pesepay.result_url')
);
```

Ecocash Payment
---------------

[](#ecocash-payment)

```
try {
    $payment = $pesepay->ecocash([
        'amount'        => 10.50,
        'phone'         => '263771234567',
        'email'         => 'customer@example.com',
        'reference'     => 'PZW211',                // Dont change the reference code
        'description'   => 'Product purchase'
    ]);

    // Store $payment['reference_number'] and $payment['poll_url'] in your database
} catch (\Chitanga\Pesepay\Exceptions\PesepayException $e) {
    // Handle payment error
}
```

Card Payment
------------

[](#card-payment)

```
try {
    $payment = $pesepay->card([
        'amount'        => 25.00,
        'email'         => 'customer@example.com',
        'card_number'   => '4111111111111111',
        'card_expiry'   => '12/25',
        'card_cvv'      => '123',
        'reference'     => 'PWZ204'                 // Dont change the reference code
    ]);

    // Process payment response
} catch (\Chitanga\Pesepay\Exceptions\PesepayException $e) {
    // Handle payment error
}
```

Check Payment Status
--------------------

[](#check-payment-status)

```
// Using the poll_url from the payment response
$status = $pesepay->checkPaymentStatus($pollUrl);

if ($status['success']) {
    // Payment was successful
} else {
    // Payment failed or is pending
}

// Quick check
if ($pesepay->isPaymentSuccessful($pollUrl)) {
    // Payment successful
}
```

Error Handling
--------------

[](#error-handling)

The package throws PesepayException for all payment-related errors. You can catch and handle these exceptions:

```
try {
    // Payment operations
} catch (\Chitanga\Pesepay\Exceptions\PesepayException $e) {
    // Get error details
    $errorMessage = $e->getMessage();
    $errorCode = $e->getCode();
    $errorData = $e->getData();

    // Handle error appropriately
}
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [:author\_name](https://github.com/TafadzwaLawrence)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance68

Regular maintenance activity

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.8% 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

449d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/86720980?v=4)[Tafadzwa Lawrence](/maintainers/TafadzwaLawrence)[@TafadzwaLawrence](https://github.com/TafadzwaLawrence)

---

Top Contributors

[![TafadzwaLawrence](https://avatars.githubusercontent.com/u/86720980?v=4)](https://github.com/TafadzwaLawrence "TafadzwaLawrence (53 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

paymentgatewayecommercepesepay

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/chitanga-pesepay/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

8120.4k](/packages/danestves-laravel-polar)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

3720.4k](/packages/linkxtr-laravel-qrcode)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

1190.2k1](/packages/lettermint-lettermint-laravel)

PHPackages © 2026

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