PHPackages                             sabitahmadumid/sixcash-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. [Payment Processing](/categories/payments)
4. /
5. sabitahmadumid/sixcash-laravel

ActiveLibrary[Payment Processing](/categories/payments)

sabitahmadumid/sixcash-laravel
==============================

Unofficial Laravel SDK wrapper for 6Cash payment gateway script

v1.0.0(1y ago)01[3 PRs](https://github.com/sabitahmadumid/sixcash-laravel/pulls)MITPHPPHP ^8.2CI passing

Since Feb 1Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/sabitahmadumid/sixcash-laravel)[ Packagist](https://packagist.org/packages/sabitahmadumid/sixcash-laravel)[ Docs](https://github.com/sabitahmadumid/sixcash-laravel)[ GitHub Sponsors](https://github.com/SabitAhmad)[ RSS](/packages/sabitahmadumid-sixcash-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

Unofficial Laravel SDK wrapper for 6Cash payment gateway script
===============================================================

[](#unofficial-laravel-sdk-wrapper-for-6cash-payment-gateway-script)

SixCash Laravel Package
=======================

[](#sixcash-laravel-package)

[![Latest Version](https://camo.githubusercontent.com/8da71468ba93506fc488141db4d4692a498ebdbee9e5a38947aafd758804ae92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736162697461686d6164756d69642f736978636173682d6c61726176656c2e737667)](https://packagist.org/packages/sabitahmadumid/sixcash-laravel)[![License](https://camo.githubusercontent.com/7919a24e7e7b20968207264318417b79d5b8e5323ff62fe8492ef295eda67685/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736162697461686d6164756d69642f736978636173682d6c61726176656c2e737667)](https://packagist.org/packages/sabitahmadumid/sixcash-laravel)[![Total Downloads](https://camo.githubusercontent.com/12adbf93a7f294533876fb05fd36f66cfcecabd0bc0bf632d38b68d2a287b430/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736162697461686d6164756d69642f736978636173682d6c61726176656c2e737667)](https://packagist.org/packages/sabitahmadumid/sixcash-laravel)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

A Laravel package for seamless integration with the **SixCash Payment Gateway**. This package provides an easy-to-use interface for creating payment orders and verifying transactions.

---

Features
--------

[](#features)

- 💳 **Create Payment Orders**: Initiate payments and redirect users to the SixCash payment page.
- ✅ **Verify Payments**: Verify transaction status using the transaction ID.
- 🛡 **Type Safety**: Built with TypeScript-like type safety for robust error handling.
- 🚦 **Error Handling**: Custom exceptions for merchant not found, payment verification failures, and more.
- 🔒 **Input Validation**: Automatically validates input parameters.
- 📦 **Laravel Integration**: Fully integrated with Laravel's service container and facades.

---

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

[](#installation)

You can install the package via composer:

```
composer require sabitahmadumid/sixcash-laravel
```

You can publish the config file with:

```
php artisan vendor:publish --tag="sixcash-laravel-config"
```

This is the contents of the published config file:

```
return [
    'base_url' => env('SIXCASH_BASE_URL', 'https://api.sixcash.com'),
    'public_key' => env('SIXCASH_PUBLIC_KEY'),
    'secret_key' => env('SIXCASH_SECRET_KEY'),
    'merchant_number' => env('SIXCASH_MERCHANT_NUMBER'),
];
```

Add the following environment variables to your `.env` file:

```
SIXCASH_BASE_URL=https://api.sixcash.com
SIXCASH_PUBLIC_KEY=your_public_key
SIXCASH_SECRET_KEY=your_secret_key
SIXCASH_MERCHANT_NUMBER=your_merchant_number
```

Usage
-----

[](#usage)

### Initialize the Package

[](#initialize-the-package)

The package is automatically registered via the service provider. You can start using it immediately.

### Create a Payment Order

[](#create-a-payment-order)

```
use SabitAhmad\SixCash\Facades\SixCash;

try {
    $amount = 100.50; // Payment amount
    $callbackUrl = route('payment.callback'); // Callback URL after payment
    $redirectUrl = SixCash::createPaymentOrder($amount, $callbackUrl);

    // Redirect the user to the payment page
    return redirect()->away($redirectUrl);
} catch (\SabitAhmad\SixCash\Exceptions\MerchantNotFoundException $e) {
    return back()->withErrors(['error' => 'Merchant not found']);
} catch (\Exception $e) {
    return back()->withErrors(['error' => $e->getMessage()]);
}
```

### Verify Payment

[](#verify-payment)

```
use SabitAhmad\SixCash\Facades\SixCash;

try {
    $transactionId = request('transaction_id'); // Get transaction ID from request
    $payment = SixCash::verifyPayment($transactionId);

    if ($payment['is_paid']) {
        // Handle successful payment
        return response()->json(['message' => 'Payment successful']);
    } else {
        // Handle pending or failed payment
        return response()->json(['message' => 'Payment not completed']);
    }
} catch (\SabitAhmad\SixCash\Exceptions\PaymentVerificationException $e) {
    return response()->json(['error' => $e->getMessage()], 422);
}
```

### Payment Record Structure

[](#payment-record-structure)

```
[
'id' => 'string', // Payment ID
'merchant_id' => 'int', // Merchant ID
'user_id' => 'int', // User ID
'transaction_id' => 'string', // Transaction ID
'amount' => 'float', // Payment amount
'is_paid' => 'bool', // Payment status
'expires_at' => 'Carbon', // Expiration date
'created_at' => 'Carbon' // Creation date
]
```

Error Handling
--------------

[](#error-handling)

```
try {
    $redirectUrl = SixCash::createPaymentOrder(100, route('payment.callback'));
} catch (\SabitAhmad\SixCash\Exceptions\MerchantNotFoundException $e) {
    // Handle merchant not found
} catch (\SabitAhmad\SixCash\Exceptions\PaymentVerificationException $e) {
    // Handle verification failure
} catch (\Exception $e) {
    // Handle other errors
}
```

Testing
-------

[](#testing)

To run the tests, use the following command:

```
composer test
```

Support
-------

[](#support)

For any issues, feature requests, or development assistance, feel free to contact me on Discord: Username: **xcal\_ibur**

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Sabit Ahmad](https://github.com/sabitahmadumid)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance70

Regular maintenance activity

Popularity1

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

465d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61b5e04c3c2f57034b9f4ca411ec4f4c4d4d7e63eb9780a0865d101f6cee135c?d=identicon)[sabitahmadumid](/maintainers/sabitahmadumid)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![sabitahmadumid](https://avatars.githubusercontent.com/u/185702986?v=4)](https://github.com/sabitahmadumid "sabitahmadumid (3 commits)")

---

Tags

laravelSabitAhmadsixcash-laravel

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sabitahmadumid-sixcash-laravel/health.svg)

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

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[creagia/laravel-redsys

Laravel Redsys Payments Gateway

2013.6k](/packages/creagia-laravel-redsys)

PHPackages © 2026

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