PHPackages                             etsvthor/laravel-cashregister-bridge - 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. [API Development](/categories/api)
4. /
5. etsvthor/laravel-cashregister-bridge

ActiveLibrary[API Development](/categories/api)

etsvthor/laravel-cashregister-bridge
====================================

Connect a laravel application with the Thor cash register

5.0.0(2mo ago)11.4k↓50%[1 issues](https://github.com/etsvThor/laravel-cashregister-bridge/issues)[1 PRs](https://github.com/etsvThor/laravel-cashregister-bridge/pulls)MITPHPPHP 8.3.\*|8.4.\*CI passing

Since Jul 15Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/etsvThor/laravel-cashregister-bridge)[ Packagist](https://packagist.org/packages/etsvthor/laravel-cashregister-bridge)[ Docs](https://github.com/etsvthor/laravel-cashregister-bridge)[ RSS](/packages/etsvthor-laravel-cashregister-bridge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (28)Used By (0)

Connect a laravel application with the Thor cash register
=========================================================

[](#connect-a-laravel-application-with-the-thor-cash-register)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aee3d4ee482006ea46a333be75d7cfd84444af9afe6c58173391a375bc3bfec1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6574737674686f722f6c61726176656c2d6361736872656769737465722d6272696467652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/etsvthor/laravel-cashregister-bridge)[![GitHub Tests Action Status](https://camo.githubusercontent.com/b57af0e032e94d3ed112ea04708992c88756b7d848c6c9b75f488ea9f556dd95/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6574737674686f722f6c61726176656c2d6361736872656769737465722d6272696467652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/etsvthor/laravel-cashregister-bridge/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9e58d5837e5626f764345829a735b9b01a7ade52d3dc312404482d31e8668043/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6574737674686f722f6c61726176656c2d6361736872656769737465722d6272696467652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/etsvthor/laravel-cashregister-bridge/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/84809dea8b052cedb2a877c92f90ddd75c185a4c3f17430ce3fdd4b6a89c050d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6574737674686f722f6c61726176656c2d6361736872656769737465722d6272696467652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/etsvthor/laravel-cashregister-bridge)

This package allows paying items from the website with the Thor cash register, for instance activity subscriptions from the Thorsite or TesLAN tickets. If an item is paid on the website, it's synced to the cash register. An item that is paid on the cash register gets synced to the external website as well.

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

[](#installation)

You can install the package via composer:

```
composer require etsvthor/laravel-cashregister-bridge
```

Optionally, you can publish the config file. This is not necessary normally, but you can do it with:

```
php artisan vendor:publish --tag="cashregister-bridge-config"
```

This is the contents of the published config file:

```
return [
    'service_id' => env('CASHREGISTER_SERVICE_ID'),
    'secret' => env('CASHREGISTER_SECRET'),
    'base_url' => env('CASHREGISTER_BASE_URL', 'https://kassa.thor.edu`'),
];
```

Create a service via `https://finances.thor.edu/admin/services` and put the service id + secret in the `.env`.

Usage
-----

[](#usage)

There are 2 types of models that needs to have an interface implemented. See the thorsite as example.

### External Product

[](#external-product)

A product that you can sell. This can be an activity or a merch item to sell, etc. (For the thorsite: webform)

- Implement the `EtsvThor\CashRegisterBridge\Contracts\HasExternalProduct` interface
- Use the `EtsvThor\CashRegisterBridge\Traits\PushesExternalProduct` trait

This will make you implement a conversion from the model to the linked DTO

### External Product Item

[](#external-product-item)

The model that keeps track of what you sold. E.g. an activity subscription or someone who buys a merch item. (For the thorsite: webform submission)

- Implement the `EtsvThor\CashRegisterBridge\Contracts\HasExternalProductItem` interface
- Use the `EtsvThor\CashRegisterBridge\Traits\PushesExternalProduct` trait

This will make you implement a conversion from the model to the linked DTO

Migration
---------

[](#migration)

If you have existing models in your database with the `HasExternalProduct` and `HasExternalProductItem` interface, then you need to `touch` them, so they get put on the cash register E.g.

```
foreach(Webform::all() as $webform){
    $webform->touch();
}

foreach(WebformSubmission::all() as $webform_submission){
    $webform_submission->touch();
}
```

You may need to throttle this, to not send too many http requests

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)

- [Niek Brekelmans](https://github.com/niekbr)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance66

Regular maintenance activity

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 50.7% 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 ~80 days

Recently: every ~150 days

Total

13

Last Release

74d ago

Major Versions

0.1.0 → 1.0.02023-10-07

1.0.0 → 2.0.02023-10-21

2.0.0 → 3.0.02024-04-29

3.0.1 → 4.0.02024-06-26

4.1.5 → 5.0.02026-02-28

PHP version history (3 changes)0.1.0PHP ^8.1

4.0.0PHP ^8.2

5.0.0PHP 8.3.\*|8.4.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/80a2e10c9af40dd1716f9d50700c1a884581c3fd8ba0ebc5591f2e21874b37da?d=identicon)[niekBr](/maintainers/niekBr)

---

Top Contributors

[![niekbr](https://avatars.githubusercontent.com/u/10487997?v=4)](https://github.com/niekbr "niekbr (35 commits)")[![ThijsLacquet](https://avatars.githubusercontent.com/u/28624985?v=4)](https://github.com/ThijsLacquet "ThijsLacquet (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laraveletsvThorlaravel-cashregister-bridge

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/etsvthor-laravel-cashregister-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/etsvthor-laravel-cashregister-bridge/health.svg)](https://phpackages.com/packages/etsvthor-laravel-cashregister-bridge)
```

###  Alternatives

[rupadana/filament-api-service

A simple api service for supporting filamentphp

204103.8k7](/packages/rupadana-filament-api-service)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)

PHPackages © 2026

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