PHPackages                             barstec/laravel-cashbill - 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. [Framework](/categories/framework)
4. /
5. barstec/laravel-cashbill

ActiveLibrary[Framework](/categories/framework)

barstec/laravel-cashbill
========================

Package for easily integrating cashbill payments with Laravel.

v1.0.6(2mo ago)1117MIT

Since Dec 23Compare

[ Source](https://github.com/Bartlomiej-Stec/laravel-cashbill)[ Packagist](https://packagist.org/packages/barstec/laravel-cashbill)[ RSS](/packages/barstec-laravel-cashbill/feed)WikiDiscussions Synced yesterday

READMEChangelogDependencies (5)Versions (6)Used By (0)

Cashbill payment system for Laravel
===================================

[](#cashbill-payment-system-for-laravel)

Package for easily integrating Cashbill payments with Laravel.

Compatibility
-------------

[](#compatibility)

This package supports **Laravel 10, 11, 12, and 13**.

Support
-------

[](#support)

If this package is helpful for you, you can support my work on Ko-fi.

[![ko-fi](https://camo.githubusercontent.com/201ef269611db7eb6b5d08e9f756ab8980df3014b64492770bdf13a6ed924641/68747470733a2f2f6b6f2d66692e636f6d2f696d672f676974687562627574746f6e5f736d2e737667)](https://ko-fi.com/S6S6PH8KM)

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

[](#installation)

1. Install composer package using command:

```
  composer require barstec/laravel-cashbill
```

2. Publish configuration files to your project

```
  php artisan vendor:publish --provider="Barstec\Cashbill\CashbillServiceProvider"
```

4. Run migrations

```
  php artisan migrate
```

Setup
-----

[](#setup)

Firstly you need to move environmental variables from .env.example to .env:

```
CASHBILL_MODE=dev
CASHBILL_SHOP_ID=
CASHBILL_SECRET_KEY=
```

If you are in testing mode, set CASHBILL\_MODE to **dev**. When in production, switch it to **prod**. Retrieve the remaining variables from the CashBill shop settings.

In the configuration file, you can define return routes, default values, the database table name, and the columns for collecting personal data. After modifying columns, rerun the migration process.

Ensure that you specify the same notification route as in the CashBill shop settings. This URL is used to verify transactions and is set by default to /api/cashbill/notification

Usage/Examples
--------------

[](#usageexamples)

To initiate a transaction, create a **Payload** object in your controller and assign values. To link your item to the transaction use **additionalData** field. Then, create a **Payment** object, pass the **Payload**, and call **redirect()**. This action will start the transaction and redirect the user to the Cashbill payment page. You can also create a **PersonalData** object. The *first name*, *surname*, and *email address* will be automatically filled on the Cashbill page.

```
