PHPackages                             upgradelabs/tcpos - 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. upgradelabs/tcpos

ActiveLibrary[API Development](/categories/api)

upgradelabs/tcpos
=================

Laravel package to interact with the TCPOS Web Order and Delivery API

1.0.0(1y ago)00MITPHPPHP ^8.3

Since May 28Pushed 1y agoCompare

[ Source](https://github.com/upgradelabs/tcpos)[ Packagist](https://packagist.org/packages/upgradelabs/tcpos)[ RSS](/packages/upgradelabs-tcpos/feed)WikiDiscussions main Synced today

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

TCPOS Laravel Package
=====================

[](#tcpos-laravel-package)

This package provides a Laravel 10+ interface for the TCPOS Web Order and Delivery API.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Laravel &gt;= 10

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

[](#installation)

```
composer require upgradelabs/tcpos
php artisan vendor:publish --provider="Upgradelabs\\TCPOS\\TCPOSServiceProvider" --tag="config"
```

Configuration
-------------

[](#configuration)

Publish the config file with:

```
php artisan vendor:publish --provider="Upgradelabs\\TCPOS\\TCPOSServiceProvider" --tag="config"
```

Then in your `.env`:

```
TCPOS_API_URL=https://api.example.com
TCPOS_API_TOKEN=your_token_here
TCPOS_TIMEOUT=10

```

Configuration file (`config/tcpos.php`):

```
return [
    'base_uri' => env('TCPOS_API_URL', 'http://localhost:17777'),
    'timeout'  => env('TCPOS_TIMEOUT', 10),
    'token'    => env('TCPOS_API_TOKEN'),
];
```

Usage
-----

[](#usage)

### 1. Using the Facade

[](#1-using-the-facade)

```
use TCPOS;

// Retrieve shop list
$shops = TCPOS::getShops();

// Fetch configuration for shop ID 5 as of today
$config = TCPOS::getShopConfiguration(5, now()->toIso8601String());

// List articles for shop ID 5, group ID 2, page 1
$articles = TCPOS::getArticles(5, 2, 50, 1);
```

### 2. Dependency Injection

[](#2-dependency-injection)

You can inject the client directly into services or controllers:

```
use Upgradelabs\TCPOS\Client;

class OrderController extends Controller
{
    protected Client $tcpos;

    public function __construct(Client $tcpos)
    {
        $this->tcpos = $tcpos;
    }

    public function index()
    {
        return $this->tcpos->getShops();
    }
}
```

### 3. Creating and Confirming an Order

[](#3-creating-and-confirming-an-order)

```
$orderData = [
    'customerId' => 123,
    'date'       => now()->toIso8601String(),
    'shopId'     => 1,
    'orderType'  => 'takeaway',
    'itemList'   => [
        ['article' => ['id' => 3994, 'quantity' => 1]],
    ],
];

// Calculate prices and taxes
$calculated = TCPOS::calculateOrder($orderData);

// Create the order
$created = TCPOS::createOrder($orderData);

// Confirm the order
$confirmed = TCPOS::confirmOrder([
    'orderId' => $created['orderId'],
    'confirmationData' => [...],
]);
```

### 4. Error Handling

[](#4-error-handling)

All methods throw an exception on HTTP or API-level errors:

```
use Illuminate\Support\Facades\Log;

try {
    $shops = TCPOS::getShops();
} catch (\Exception $e) {
    Log::error('TCPOS API error: ' . $e->getMessage());
    abort(500, 'Unable to retrieve shops.');
}
```

### 5. Customizing at Runtime

[](#5-customizing-at-runtime)

Override timeout or base URI:

```
app()->make(Upgradelabs\TCPOS\Client::class)
    ->setTimeout(30)
    ->setBaseUri('https://staging-api.example.com');
```

### 6. Testing

[](#6-testing)

Run the full test suite:

```
vendor/bin/phpunit
```

Endpoints
---------

[](#endpoints)

All available endpoints are exposed via facade `TCPOS` or injected `Client`. See `src/Http/Client.php` for the complete method list.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance46

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

402d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b20557c62a96fca9a58d80b11dffbaf4e3debd77d9358c66ed06d413c1e884a7?d=identicon)[rpsimao](/maintainers/rpsimao)

---

Top Contributors

[![rpsimao](https://avatars.githubusercontent.com/u/205846?v=4)](https://github.com/rpsimao "rpsimao (1 commits)")

### Embed Badge

![Health badge](/badges/upgradelabs-tcpos/health.svg)

```
[![Health](https://phpackages.com/badges/upgradelabs-tcpos/health.svg)](https://phpackages.com/packages/upgradelabs-tcpos)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.8k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.7k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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