PHPackages                             mscode-pl/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. mscode-pl/laravel-cashbill

ActiveLibrary[Framework](/categories/framework)

mscode-pl/laravel-cashbill
==========================

Package for easily integrating cashbill payments with Laravel.

1.0.0(1y ago)053[1 PRs](https://github.com/mscode-pl/laravel-cashbill/pulls)MITPHP

Since Jul 30Pushed 1y agoCompare

[ Source](https://github.com/mscode-pl/laravel-cashbill)[ Packagist](https://packagist.org/packages/mscode-pl/laravel-cashbill)[ RSS](/packages/mscode-pl-laravel-cashbill/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

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

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

Package for easily integrating Cashbill payments with Laravel.

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

[](#installation)

1. Install composer package using command:

```
  composer require mscode-pl/laravel-cashbill
```

2. Publish configuration files to your project

```
  php artisan vendor:publish --provider="MsCode\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. 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.

```
