PHPackages                             mostafax/knet - 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. mostafax/knet

ActiveLaravel-package[Payment Processing](/categories/payments)

mostafax/knet
=============

knet payment service

1.0.3(2y ago)014MITPHP

Since Jan 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mostafax2/knet)[ Packagist](https://packagist.org/packages/mostafax/knet)[ RSS](/packages/mostafax-knet/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Knet payment Package
====================

[](#knet-payment-package)

knet service for payment

Acknowledgements
----------------

[](#acknowledgements)

- knet payment link

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

[](#installation)

to install Package by composer

```
  composer require mostafax/knet

```

to publish my package

```
  php artisan vendor:publish

```

add this keys to your env file

```
PAYMENT_PRODUCTION_URL=https://kpay.com.kw/kpg/PaymentHTTP.htm?param=paymentInit
PAYMENT_TEST_URL=https://kpaytest.com.kw/kpg/PaymentHTTP.htm?param=paymentInit
PAYMENT_TRANSPORT_ID=*****
PAYMENT_TRANSPORT_PASSWORD=****
PAYMENT_ACTION_CODE=1
PAYMENT_RESOURCE_KEY=**************
PAYMENT_LANGUAGE=USA
PAYMENT_CURRENCY=414
PAYMENT_ERROR_URL=http://YOURDOMAIN.test/knet/error
PAYMENT_SUCCESS_URL=http://YOURDOMAIN.test/knet/success
```

to init new link

```
use Mostafax\Knet\Knet;
```

```
  $data = [
            'amount' => 20,
            'order_id' => 200,
            'track_id' => rand(0, 9999),
            'udf1' => null,
            'udf2' => null,
            'udf3' => null,
            'udf4' => null,
            'udf5' => null
        ];
```

```
$Knet = new Knet();
$Knet->init($data);
```

Call Back Reference
-------------------

[](#call-back-reference)

#### Payment Successful

[](#payment-successful)

```
  Post /knet/success
```

ParameterType`Payment ID``string``Payment Amount``decimel``Payment Date``date``Payment Result``string``Payment Transaction ID``string``Payment Auth``string``Payment Track ID``string``Payment Reference Number``string`#### Payment Error

[](#payment-error)

```
  Post /knet/error
```

ParameterType`Payment ID``string``Payment Amount``decimel``Payment Date``date``Payment Result``string``Payment Track ID``string`Authors
-------

[](#authors)

- [@mostafax2](https://github.com/mostafax2)

Environment Variables
---------------------

[](#environment-variables)

To run this project, you will need to add the following environment variables to your .env file

`PAYMENT_PRODUCTION_URL` knet link for produuction

`PAYMENT_TEST_URL` knet link for Test

`PAYMENT_TRANSPORT_ID`

`PAYMENT_TRANSPORT_PASSWORD`

`PAYMENT_ACTION_CODE`

`PAYMENT_RESOURCE_KEY`

`PAYMENT_LANGUAGE` ARA or USA

`PAYMENT_CURRENCY`

`PAYMENT_ERROR_URL`

`PAYMENT_SUCCESS_URL`

you may want to disable CSRF protection
---------------------------------------

[](#you-may-want-to-disable-csrf-protection)

In app/Http/Middleware/VerifyCsrfToken.php:

```
    protected $except = [
        'knet/*'
    ];
```

[![MIT License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://choosealicense.com/licenses/mit/)

Tech Stack
----------

[](#tech-stack)

**Client:** Blade

**Server:** PHP, Laravel

Support
-------

[](#support)

For support, email .

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Every ~0 days

Total

4

Last Release

860d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50af87640e9fdf5334256080d493f8c462427633ce7114dddb17001246176d91?d=identicon)[mostafax2](/maintainers/mostafax2)

---

Top Contributors

[![mostafax2](https://avatars.githubusercontent.com/u/146624906?v=4)](https://github.com/mostafax2 "mostafax2 (19 commits)")

### Embed Badge

![Health badge](/badges/mostafax-knet/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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