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)025[4 PRs](https://github.com/TafadzwaLawrence/pesepay-laravel/pulls)MITPHPPHP ^8.0CI passing

Since Apr 10Pushed 1mo 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 1mo ago

READMEChangelogDependencies (14)Versions (6)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

35

—

LowBetter than 80% of packages

Maintenance71

Regular maintenance activity

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

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

403d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05353ec53269da82e21822e3149101fed43dd2b77ab667c9f043d4588999efac?d=identicon)[TafadzwaLawrence](/maintainers/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

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)

PHPackages © 2026

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