PHPackages                             traknpay/checkout - 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. traknpay/checkout

ActiveLibrary[Payment Processing](/categories/payments)

traknpay/checkout
=================

TraknPay Payment Gateway Integration

v1.0(9y ago)1172↓100%1MITPHPPHP &gt;=5.4.0

Since Oct 13Pushed 6y ago2 watchersCompare

[ Source](https://github.com/TraknPay/Checkout)[ Packagist](https://packagist.org/packages/traknpay/checkout)[ Docs](http://www.traknpay.com)[ RSS](/packages/traknpay-checkout/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![Laravel 5.x](https://camo.githubusercontent.com/5a1939c3fb1f6760124421638f59ab4ed15b6d03dbb30a6824df9af781880437/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d352e782d6f72616e67652e737667)](http://laravel.com)[![Latest Stable Version](https://camo.githubusercontent.com/b15cb61a3f266459f98594c8d930516b17088e63ee01dd9dfec696c9c35742af/68747470733a2f2f706f7365722e707567782e6f72672f7472616b6e7061792f636865636b6f75742f76657273696f6e)](https://packagist.org/packages/traknpay/checkout)[![Latest Unstable Version](https://camo.githubusercontent.com/715e3c0d97e602e5f94fa81a5b37c6840fb34c1ad6b86180287f5fb6e75d40ec/68747470733a2f2f706f7365722e707567782e6f72672f7472616b6e7061792f636865636b6f75742f762f756e737461626c65)](//packagist.org/packages/traknpay/checkout)[![Total Downloads](https://camo.githubusercontent.com/d71836322a56374841b67a0022994870674d3b805dfd517c86c9df422b509e6b/68747470733a2f2f706f7365722e707567782e6f72672f7472616b6e7061792f636865636b6f75742f646f776e6c6f616473)](https://packagist.org/packages/traknpay/checkout)[![License](https://camo.githubusercontent.com/4d6d90c38f510f14d7c3d0a699ad65e7f824d97cb6112e4f0b05b6f0539a1f2b/68747470733a2f2f706f7365722e707567782e6f72672f79616a72612f6c61726176656c2d646174617461626c65732d6f7261636c652f6c6963656e7365)](https://packagist.org/packages/yajra/laravel-datatables-oracle)

Checkout
========

[](#checkout)

Traknpay/Checkout is a Laravel package to integrate traknpay payment gateway in your laravel 5.X package

This package is used to integrate with traknpay api payment request.

Requirements
------------

[](#requirements)

The Checkout package is working fine in Laravel 5.1 and 5.3.However , in laravel 5.2, there is a minor issue when response is not handled.If response is handled as described in the below steps then there would be no issue.

1. PHP 5.4.0 or later
2. Laravel 5.1 or 5.3

Quick Installation
------------------

[](#quick-installation)

To get started, install Checkout via the Composer package manager:

```
composer require traknpay/checkout

```

### Service Provider

[](#service-provider)

Next,register the Checkout service provider in the providers array of your config/app.php configuration file:

```
TraknPay\Checkout\CheckoutServiceProvider::class

```

### Facade

[](#facade)

Add 'Checkout' facade in the aliases array of your config/app.php configuration file:

```
'Checkout'=>TraknPay\Checkout\Facades\Checkout::class

```

### Configuration

[](#configuration)

Publish the configuration:

```
php artisan vendor:publish

```

**config/traknpay\_payment\_gateway.php**

This is the configuration file that Laravel will publish into your config directory.

Open this file and provide values in following parameters

```
'api_key'
'app_url'
'salt'
'mode'

```

**'app\_url'** is to be set to your server url, by default it is set to `http://localhost:8000`, do not add `'/'` at end of this url

**'api\_key'** and **'salt'** values are provided by Traknpay.

**'mode'** value can be either `TEST` or `LIVE`.

For the rest of the parameters that need to be sent , please refer the traknpay integration document [TraknPay\_Integration\_Guide\_Ver1.4.1](https://bitbucket.org/OmniwareIntegrationTeam/traknpay_integrations_plugins/downloads/Trak%20'n%20Pay%20Integration%20Guide%20Ver1.4.1.pdf).

Usage
-----

[](#usage)

To post the payment parameters to traknpay gateway, on clicking checkout button do following.

```
    Checkout::post([
        'order_id'       => '10',
        'amount'         => '201.00',
        'name'           => 'Payer Name',
        'email'          => 'Payer@example.com',
        'phone'          => '9876543210',
    ]);
```

### Handling Response

[](#handling-response)

There is an inbuilt response handler but that does not do much, apart from showing if the transaction was `Successful` or `Failed`. To handle the response on your own, use the following steps.

1. Create a controller (e.g. `PaymentController`)
2. Create a function within this controller(e.g. `handleResponse`)
3. In `handleResponse` function, perform hash check and then update your payment status.

    ```
        use TraknPay\Checkout\Facades\Checkout;

        class PaymentController extends Controller
        {
            public  function handleResponse(Request $request) {
                if(Checkout::checkResponseHash($request->all())){
                    // if checkResponseHash returns true, continue to save the response.
                } else {
                    // if checkResponseHash returns false , then it means that response might be tampered
                }
            }
        }
    ```
4. Add the new route to `web.php` file.

    ```
        Route::post('/paymentresponse','PaymentController@handleResponse');
    ```
5. Add this route in exception list of VerifyCsrfToken in the middleware.
6. Update `app_url` and `return_url` in `config/traknpay_payment_gateway.php`.

    ```
        'app_url'    => 'http://your-site.com'
        'return_url' => '/paymentresponse'
    ```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.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

3494d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11293052?v=4)[Karmendra Suthar](/maintainers/karmendra)[@karmendra](https://github.com/karmendra)

---

Top Contributors

[![karmendra](https://avatars.githubusercontent.com/u/11293052?v=4)](https://github.com/karmendra "karmendra (12 commits)")[![prasadshirasangi](https://avatars.githubusercontent.com/u/53754836?v=4)](https://github.com/prasadshirasangi "prasadshirasangi (1 commits)")

### Embed Badge

![Health badge](/badges/traknpay-checkout/health.svg)

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

###  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)
