PHPackages                             nikba/paynet - 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. nikba/paynet

ActiveLibrary[Payment Processing](/categories/payments)

nikba/paynet
============

Paynet payment module for Laravel

v1.4(1y ago)1252MITPHPPHP &gt;=7.4

Since Jul 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Nikba-Creative-Studio/paynet-laravel)[ Packagist](https://packagist.org/packages/nikba/paynet)[ RSS](/packages/nikba-paynet/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Nikba Paynet Laravel Package
============================

[](#nikba-paynet-laravel-package)

This package provides integration with the Paynet payment gateway for Laravel applications.

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

[](#installation)

Install the package via Composer:

```
composer require nikba/paynet
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Nikba\Paynet\Providers\PaynetServiceProvider" --tag="config"
```

Add the following environment variables to your .env file:

```
PAYNET_MERCHANT_CODE=862491
PAYNET_SECRET_KEY=F822E47B-6F4F-4D9D-92EB-566ED89E3D76
PAYNET_USERNAME=388018
PAYNET_PASSWORD=6olmfsQX
PAYNET_TEST_MODE=true
```

Usage
-----

[](#usage)

### Initiate a Payment

[](#initiate-a-payment)

Use the Paynet facade to initiate a payment:

```
use Nikba\Paynet\Facades\Paynet;

$paymentData = [
    'Invoice' => 20160622010101,
    'Currency' => 498,
    'LinkUrlSuccess' => 'http://localhost:8000/pay/1?status=success',
    'LinkUrlCancel' => 'http://localhost:8000/pay/1?status=cancel',
    'Customer' => [
        'Code' => 'CustomerCode',
        'NameFirst' => 'FirstName',
        'NameLast' => 'LastName',
        'PhoneNumber' => 'PhoneNumber',
        'email' => 'customer@example.com',
        'Country' => 'Country',
        'City' => 'City',
        'Address' => 'Address',
    ],
    'ExternalDate' => '2025-01-01T00:00:00',
    'ExpiryDate' => '2025-01-02T00:00:00',
    'Services' => [
        [
            'Name' => 'ServiceName',
            'Description' => 'ServiceDescription',
            'amount' => 100,
            'Products' => [
                [
                    'Amount' => 100,
                    'Code' => 'PRODUCT1',
                    'Description' => 'ProductDescription',
                    'LineNo' => 1,
                    'Name' => 'ProductName',
                    'UnitPrice' => 100,
                    'UnitProduct' => 1,
                ],
            ],
        ],
    ],
    'SignVersion' => 'v01',
    'MoneyType' => null
];

$response = Paynet::sendPayment($paymentData);
```

### Handle Paynet Notifications

[](#handle-paynet-notifications)

Add a route to handle Paynet notifications in your routes/web.php file:

```
Route::post('/paynet/notification', [\Nikba\Paynet\Http\Controllers\PaynetController::class, 'handleNotification']);
```

Create a controller method to process the notifications:

```
public function handleNotification(Request $request)
{
    $notificationData = $request->all();

    try {
        $response = Paynet::handleNotification($notificationData);
        return response()->json(['status' => 'success', 'data' => $response]);
    } catch (\Exception $e) {
        Log::error('Paynet notification failed: ' . $e->getMessage());
        return response()->json(['error' => $e->getMessage()], 400);
    }
}
```

Testing
-------

[](#testing)

Install necessary dependencies for testing:

```
composer require --dev mockery/mockery
```

Run the tests:

```
vendor/bin/phpunit --filter PaynetServiceTest
```

Postman
-------

[](#postman)

[Postman](https://getpostman.com) Collections (JSON file) for a quicker and easier usage of RESTful APIs.

### How to import and configure

[](#how-to-import-and-configure)

- Download the `postman_collection.json` repository.
- Click the Import button. On Postman for Mac, for example, the button is at the top left

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

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

Every ~45 days

Total

4

Last Release

571d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bcd10cd5a6707af2160f69291d06ff63cada1a920921edf7e3a4bdca6950c84?d=identicon)[nikba](/maintainers/nikba)

---

Top Contributors

[![Nikba-Creative-Studio](https://avatars.githubusercontent.com/u/41567806?v=4)](https://github.com/Nikba-Creative-Studio "Nikba-Creative-Studio (8 commits)")[![26Exp](https://avatars.githubusercontent.com/u/29329248?v=4)](https://github.com/26Exp "26Exp (2 commits)")

### Embed Badge

![Health badge](/badges/nikba-paynet/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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