PHPackages                             createch/paycorp-sampath-vault - 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. createch/paycorp-sampath-vault

ActiveLibrary[Payment Processing](/categories/payments)

createch/paycorp-sampath-vault
==============================

Paycorp Sampath bank IPG package for Vault realtime payment

v1.4(7y ago)81.1k8[1 issues](https://github.com/thiraj/paycorp-sampath-vault/issues)MITPHP

Since Sep 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/thiraj/paycorp-sampath-vault)[ Packagist](https://packagist.org/packages/createch/paycorp-sampath-vault)[ RSS](/packages/createch-paycorp-sampath-vault/feed)WikiDiscussions master Synced yesterday

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

Paycorp-Sampath-Vault (Laravel)
===============================

[](#paycorp-sampath-vault-laravel)

Paycorp-Sampath-Vault is a php package for making payment using Sampath bank Payment Gateway in Laravel and PHP Projects. This uses the PHP library of Sampath bank. In this package you can make:

- Redirect Page Payment
- Realtime Payment
- Tokanized Payments

Features!
=========

[](#features)

- Using with composer
- Easy intergration
- 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 createch/paycorp-sampath-vault
```

### 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_TOKENIZE_CLIENT_ID=
SAMPATH_PURCHASE_CLIENT_ID=
SAMPATH_RETURN_URL=
```

### Methods

[](#methods)

##### PaymentInit

[](#paymentinit)

Import package class in you class header:

```
use createch\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 neccessary 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

33

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~3 days

Total

5

Last Release

2834d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19501229?v=4)[Thiraj](/maintainers/thiraj)[@thiraj](https://github.com/thiraj)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/createch-paycorp-sampath-vault/health.svg)

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

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)

PHPackages © 2026

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