PHPackages                             pnm1231/paycorp-sampath-ipg - 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. pnm1231/paycorp-sampath-ipg

ActiveLibrary[Payment Processing](/categories/payments)

pnm1231/paycorp-sampath-ipg
===========================

Paycorp Sampath Bank IPG package for Laravel

v1.6.7(3y ago)048MITPHP

Since Dec 14Pushed 3y agoCompare

[ Source](https://github.com/pnm1231/paycorp-sampath-vault)[ Packagist](https://packagist.org/packages/pnm1231/paycorp-sampath-ipg)[ RSS](/packages/pnm1231-paycorp-sampath-ipg/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

Paycorp Sampath IPG for Laravel
===============================

[](#paycorp-sampath-ipg-for-laravel)

Paycorp Sampath IPG is a Laravel package for making payment using Sampath Bank Payment Gateway through Paycorp. In this package you can accept:

- Redirect Page Payments
- Realtime Payments
- Tokenized Payments

Features
========

[](#features)

- Using with composer
- Easy integration
- Compatible with Laravel

Requirements
============

[](#requirements)

> PHP &gt;= 5.6 OpenSSL &gt;= 1.0.1 curl &gt;= 7.34 Composer

Usage
=====

[](#usage)

### Installation

[](#installation)

```
composer require pnm1231/paycorp-sampath-ipg
```

### Configurations

[](#configurations)

#### Laravel

[](#laravel)

After install via composer add Config values to .env file as following:

```
SAMPATH_SERVICE_ENDPOINT=
SAMPATH_AUTHTOKEN=
SAMPATH_HMAC=
SAMPATH_CURRENCY=
SAMPATH_CLIENT_ID=
SAMPATH_RETURN_URL=
```

### Methods

[](#methods)

##### PaymentInit

[](#paymentinit)

Import package class in you class header:

```
use pnm123\PaycorpSampathVault\PaycorpSampathVault;
```

Sample InitRequest

```
    $paymentInit = new PaycorpSampathVault();
    $data['clientRef'] = $request->user()->id;
    $data['comment'] = 'Your comment';
    $data['total_amount'] = 1010;
    $data['service_fee_amount'] = 1010;
    $data['payment_amount'] = 1010;
    $res = $paymentInit->initRequest($data);

    return response()->json($res);
```

You will receive reqid, payment\_page\_url for the redirect. When you redirected to the "payment\_page\_url" user can enter the card details and pay. Then paycorp will return the response to "SAMPATH\_RETURN\_URL" you configured in .env file. When get the correct response, you need to call PaymentCompleteRequest.

#### completeRequest

[](#completerequest)

```
    $data['reqid'] = $_GET['reqid'];
    $data['clientRef'] = $_GET['clientRef'];
    $paymentComplete = new PaycorpSampathVault();
    $response = $paymentComplete->completeRequest($data);

    return response()->json($res);
```

#### Make Real Time Payments using Token

[](#make-real-time-payments-using-token)

In Payment complete response you will get the "Token" and necessary data. Using "Token" you can make instant payments without entering card details or redirecting user everytime to payment page. This is the special feature of Vault in paycorp.

```
    $payment = new PaycorpSampathVault();

    $data = [];
    $data['clientRef'] = 'Clent Ref';
    $data['token'] = 'token';
    $data['comment'] = 'Your Comment';
    $data['amount'] = 1010; // in cents
    $data['expire_at'] = 'Expiry Date of Card'; //1223
    $data['payment_amount'] = 1010;
    $response = $payment->realTimePayment($data);

    return $response;
```

NOTE:
=====

[](#note)

> Please read Paycorp Technical document and understand the workflow well before use this package. This package only for developers to save their life.

License
-------

[](#license)

### MIT

[](#mit)

**Free Software, Hell Yeah!**

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

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

10

Last Release

1299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/66c73dea62925da1c25a4e54781970c8a5cd1cebcba78d3f32084afa86f9f857?d=identicon)[zenegal](/maintainers/zenegal)

---

Top Contributors

[![thiraj](https://avatars.githubusercontent.com/u/19501229?v=4)](https://github.com/thiraj "thiraj (13 commits)")[![pnm1231](https://avatars.githubusercontent.com/u/1593448?v=4)](https://github.com/pnm1231 "pnm1231 (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pnm1231-paycorp-sampath-ipg/health.svg)

```
[![Health](https://phpackages.com/badges/pnm1231-paycorp-sampath-ipg/health.svg)](https://phpackages.com/packages/pnm1231-paycorp-sampath-ipg)
```

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)[binkode/laravel-paystack

A description for laravel-paystack.

112.1k](/packages/binkode-laravel-paystack)

PHPackages © 2026

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