PHPackages                             humayunjavaid/laravel-payzen - 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. humayunjavaid/laravel-payzen

ActiveLibrary[Payment Processing](/categories/payments)

humayunjavaid/laravel-payzen
============================

A simple package to generate Payzen PSID.

v1.0.0(2y ago)28[2 PRs](https://github.com/humayunjavaid/laravel-payzen/pulls)MITPHPPHP ^8.1

Since Sep 4Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (13)Versions (4)Used By (0)

Payzen
======

[](#payzen)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1f85f8a54006bcb414086544e95a6a5f101793f665649334d96420109f17bccd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68756d6179756e6a61766169642f6c61726176656c2d7061797a656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/humayunjavaid/laravel-payzen)[![GitHub Tests Action Status](https://camo.githubusercontent.com/8a0b273aa2ed27e8e12f9909e0bcbfd05aaca369e0084e1a1002a7cdf6e96288/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68756d6179756e6a61766169642f6c61726176656c2d7061797a656e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/humayunjavaid/laravel-payzen/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/969b6e25192168c9c6479290896810b925b22c13bf2c2ebff12f2aeb58e804ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68756d6179756e6a61766169642f6c61726176656c2d7061797a656e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/humayunjavaid/laravel-payzen/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/607d198318525519859250ce8fa1225aa452ac89279f2480387140b8dc3d5e31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68756d6179756e6a61766169642f6c61726176656c2d7061797a656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/humayunjavaid/laravel-payzen)

Streamline Payzen payment integration in Laravel. Generate Payment Service Identifiers (PSIDs) for P2G, P2P, B2G, and B2B payments with ease.

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

[](#installation)

You can install the package via composer:

```
composer require humayunjavaid/laravel-payzen
```

Set Up Environment
------------------

[](#set-up-environment)

Check your `.env` file, and ensure that your following parameters are set with valid credentials obtained from Payzen.

```
PAYZEN_CLIENT_ID =
PAYZEN_CLIENT_SECRET_KEY =
PAYZEN_AUTH_URL = (Optional)
PAYZEN_PSID_URL = (Optional)

```

Optionally you can publish the config file with:

```
php artisan vendor:publish --tag="laravel-payzen-config"
```

This is the contents of the published config file:

```
return [

    'clientId' => env('PAYZEN_CLIENT_ID'),

    'clientSecretKey' => env('PAYZEN_CLIENT_SECRET_KEY'),

    'authUrl' => env('PAYZEN_AUTH_URL'),

    'psidUrl' => env('PAYZEN_PSID_URL'),

];
```

Usage
-----

[](#usage)

Generate PSID method will return `Illuminate\Http\Client\Response` instance. That mean's, you have access to following methods.

```
$response->body() : string;
$response->json() : array|mixed;
$response->collect() : Illuminate\Support\Collection;
$response->status() : int;
$response->ok() : bool;
$response->successful() : bool;
$response->failed() : bool;
$response->serverError() : bool;
$response->clientError() : bool;
$response->header($header) : string;
$response->headers() : array;
```

Generate PSID
-------------

[](#generate-psid)

```
Payzen::setConsumerName('Dummy User')
    ->setCnic('123456789')
    ->setEmail('dummyuser@email.com')
    ->setMobileNumber('3324232321')
    ->setChallanNumber('2323232323')
    ->setServiceId('12')
    ->setAccountNumber('32323')
    ->setAccountTitle('Bibi Pak Damin')
    ->setDueDate('2023-08-29')
    ->setExpiryDate('2023-08-29')
    ->setAmountWithinDueDate(500)
    ->setAmountAfterDueDate(500)
    ->generate();
```

Credits
-------

[](#credits)

- [Humayun Javed](https://github.com/humayunjavaid)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

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

982d ago

### Community

Maintainers

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

---

Top Contributors

[![humayunjavaid](https://avatars.githubusercontent.com/u/1024794?v=4)](https://github.com/humayunjavaid "humayunjavaid (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelhumayunjavaidlaravel-payzen

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/humayunjavaid-laravel-payzen/health.svg)

```
[![Health](https://phpackages.com/badges/humayunjavaid-laravel-payzen/health.svg)](https://phpackages.com/packages/humayunjavaid-laravel-payzen)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[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)[danestves/laravel-polar

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

7812.3k](/packages/danestves-laravel-polar)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

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