PHPackages                             kalimeromk/casys-laravel - 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. kalimeromk/casys-laravel

ActiveLibrary

kalimeromk/casys-laravel
========================

Integration of casys payment method

v3.2(1y ago)192.5k↓100%3MITPHPPHP &gt;=8.0

Since Feb 19Pushed 8mo ago4 watchersCompare

[ Source](https://github.com/KalimeroMK/casys)[ Packagist](https://packagist.org/packages/kalimeromk/casys-laravel)[ RSS](/packages/kalimeromk-casys-laravel/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (3)Versions (5)Used By (0)

Casys Laravel Package
=====================

[](#casys-laravel-package)

This is a package to integrate the Casys payment gateway into Laravel. It generates complete scaffolding for simple integration, including support for recurring payments.

Features
--------

[](#features)

1. **Views**
    - `resources/views/vendor/casys`
2. **Configuration**
    - `config/casys.php`
3. **Controllers**
    - `/Http/Controllers/CasysController`
    - `/Http/Controllers/RecurringPaymentController`
4. **Recurring Payment Support**
    - `/Http/Services/RecurringPayment.php`
    - Example integration for managing recurring payments using SOAP services.
5. **Routes**
    - Predefined routes for standard and recurring payments.

---

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

[](#installation)

Require this package by running:

```
composer require kalimeromk/casys-laravel
```

After installation, publish the package files:

```
php artisan vendor:publish --provider="Kalimero\Casys\CasysServiceProvider"
```

This will publish the following files:

- `config/casys.php`
- `resources/views/vendor/casys`

---

Laravel Setup
-------------

[](#laravel-setup)

Register the route file in your `RouteServiceProvider` or add the following routes to your existing route file:

### Standard Payment Routes

[](#standard-payment-routes)

```
use App\Http\Controllers\CasysController;

Route::get('paymentLoader', [CasysController::class, 'index'])->name('loader');
Route::post('payment', [CasysController::class, 'getCasys'])->name('validateAndPay');
Route::post('paymentOKURL', [CasysController::class, 'success'])->name('paymentOKURL');
Route::post('paymentFailURL', [CasysController::class, 'fail'])->name('paymentFailURL');
```

### Recurring Payment Routes

[](#recurring-payment-routes)

```
use KalimeroMK\Casys\Controllers\RecurringPaymentController;

Route::post('/recurring-payment', [RecurringPaymentController::class, 'handleRecurringPayment'])->name('recurring.payment');
```

For Laravel &lt;=7, use the controller string syntax:

```
Route::get('paymentLoader', 'CasysController@index')->name('loader');
Route::post('payment', 'CasysController@getCasys')->name('validateAndPay');
Route::post('paymentOKURL', 'CasysController@success')->name('paymentOKURL');
Route::post('paymentFailURL', 'CasysController@fail')->name('paymentFailURL');
```

---

How to Use
----------

[](#how-to-use)

### Configuration

[](#configuration)

Add your credentials to the `.env` file:

```
PAY_TO_MERCHANT=your_merchant_id
MERCHANT_NAME=your_merchant_name
AMOUNT_CURRENCY=MKD
PAYMENT_OK_URL=your_success_url
PAYMENT_FAIL_URL=your_fail_url
CASYS_TOKEN=your_token
```

### Standard Payments

[](#standard-payments)

For standard payments, simply pass the amount and client data to the appropriate method in the `CasysController`. The views provided by the package will handle the UI. If you wish to customize the views, edit the published views in `resources/views/vendor/casys`.

---

### Recurring Payments

[](#recurring-payments)

The package includes support for recurring payments through the `RecurringPayment` class and `RecurringPaymentController`. Here’s how you can integrate it:

#### **Recurring Payment Parameters**

[](#recurring-payment-parameters)

The recurring payment requires the following parameters:

- **RPRef**: A string containing details about the recurring payment, formatted as: ```
    RPRef = RequestType,BillingCycle,MaxBCycles,BillingAmount,BillingCycleStart

    ```
- **RPRefID**: Unique ID returned during the initial registration of the recurring transaction.

#### **Example Workflow**

[](#example-workflow)

1. **Initial Registration**The cardholder performs the initial transaction with the `RPRef` parameter set. The system returns an `RPRefID`, which you should store for future recurring payments.
2. **Subsequent Payments**Use the stored `RPRefID` to initiate subsequent payments without user involvement.

#### **Example Request**

[](#example-request)

Call the `/recurring-payment` endpoint with the following payload:

```
{
    "merchant_id": "YourMerchantID",
    "rp_ref": "R,1M,12,500000,20240101",
    "rp_ref_id": "UniqueRPRefID",
    "amount": 500000,
    "password": "YourMerchantPassword"
}
```

#### **Example Recurring Payment Integration**

[](#example-recurring-payment-integration)

You can use the `RecurringPayment` service class in your application:

```
use KalimeroMK\Casys\Services\RecurringPayment;

$recurringPayment = new RecurringPayment();

$response = $recurringPayment->sendPayment(
    $merchantId,
    $rpRef,
    $rpRefId,
    $amount,
    $password
);

if ($response['success']) {
    echo "Recurring payment successful! Reference: " . $response['payment_reference'];
} else {
    echo "Recurring payment failed: " . $response['error_description'];
}
```

---

### Provided Controllers

[](#provided-controllers)

#### **CasysController**

[](#casyscontroller)

Handles the standard payment flow, including:

- Loading the payment page (`paymentLoader` route).
- Validating and processing payments (`payment` route).
- Handling success (`paymentOKURL` route) and failure (`paymentFailURL` route) callbacks.

#### **RecurringPaymentController**

[](#recurringpaymentcontroller)

Handles recurring payment requests via the `/recurring-payment` route. Example integration is included for making SOAP calls to the Casys gateway.

---

Info
----

[](#info)

This package is in an alpha stage and is designed to be flexible for your specific needs. **Suggestions are welcome!**

###  Health Score

39

↑

LowBetter than 87% of packages

Maintenance52

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.1% 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 ~214 days

Total

4

Last Release

484d ago

PHP version history (3 changes)v2PHP &gt;=7.3.0

v3PHP &gt;=7.4.0

v3.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/472c4da0220f15747dd81d3a27ffbba022a06ab20f64a367ddcaacd790d812d7?d=identicon)[KalimeroMK](/maintainers/KalimeroMK)

---

Top Contributors

[![KalimeroMK](https://avatars.githubusercontent.com/u/24772657?v=4)](https://github.com/KalimeroMK "KalimeroMK (35 commits)")[![zoranbogoevski](https://avatars.githubusercontent.com/u/72435906?v=4)](https://github.com/zoranbogoevski "zoranbogoevski (11 commits)")

---

Tags

laravelpaymentlaravelcasys

###  Code Quality

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/kalimeromk-casys-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/kalimeromk-casys-laravel/health.svg)](https://phpackages.com/packages/kalimeromk-casys-laravel)
```

###  Alternatives

[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

402385.8k5](/packages/rtconner-laravel-likeable)[hemp/presenter

Easy Model Presenters in Laravel

247582.7k1](/packages/hemp-presenter)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

60813.9k24](/packages/slowlyo-owl-admin)[basillangevin/laravel-data-json-schemas

Transforms Spatie Data objects into JSON Schemas with built-in validation

136.9k1](/packages/basillangevin-laravel-data-json-schemas)

PHPackages © 2026

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