PHPackages                             wpify/heureka-hcapi - 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. wpify/heureka-hcapi

ActiveLibrary[API Development](/categories/api)

wpify/heureka-hcapi
===================

Heureka shopping cart API

v1.0.2(2y ago)053MITPHPPHP &gt;=5.4.0

Since Jun 28Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/wpify/heureka-hcapi)[ Packagist](https://packagist.org/packages/wpify/heureka-hcapi)[ RSS](/packages/wpify-heureka-hcapi/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

**Heureka cart API**
--------------------

[](#heureka-cart-api)

Hcapi is a tool created for easier connection between shopping adviser Heureka.cz and shops which users of these services and shopping cart want.

**Usage**
---------

[](#usage)

**Install by composer:**

```
composer require wpify/heureka-hcapi

```

**Implementation**
------------------

[](#implementation)

In this section you will find the manual for hcapi implementation to your project.

Connection via Callables
------------------------

[](#connection-via-callables)

First way how to connect your shop by HCAPI is using Callable callback.

In your code must create functions (for all services), which receive data from Heureka (array), process them and return required data (array). Structure of required data you can find [there](http://sluzby.heureka.cz/napoveda/kosik-api/).

Example of function for **Payment/Status**:

```
//PaymentStatus.php

public function setPaymentStatus($receiveData)
    {
        //set payment status for order

        return [
            'status' => false,
        ];
    }

```

In second step you must connect these functions with your routing. You must use specific service for every from API methods. For example **Payment/Status**:

```
//Router.php

if ($_SERVER['REQUEST_URI'] === 'https://www.example.com/api/1/payment/status') {
            $service = new PaymentStatus();
            return $service->processData(
                [
                    'Hcapi\Example\CallableExample\PaymentStatus',
                    'setPaymentStatus',
                ],
                $receiveData);
        }

```

Services are located in /src/Services/ More examples are located in /example/InterfaceExample/

Implementation via Interfaces
-----------------------------

[](#implementation-via-interfaces)

Second way how to connect your shop by HCAPI is via Interfaces. In folder /scr/Interfaces/ is located interface IShopImplementation.php. You must implement this interface for all classes which work with data from Heureka.

Example:

```
class OrderCancel implements IShopImplementation
{
    /**
     * @param array $receiveData
     *
     * @return array
     */
    public function getResponse($receiveData)
    {
        //Do something with receive data

        return [
            'status' => true,
        ];
    }

}

```

In second step you must connect this functions to your routing. You must use specific service for every from API methods. For example **Order/Cancel**:

```
if ($_SERVER['REQUEST_URI'] === 'https://www.example.com/api/1/order/cancel') {
    $service = new OrderCancel();
    $orderCancel = new \Hcapi\Example\InterfaceExample\OrderCancel();

    return $service->processData($orderCancel, $receiveData);
}

```

More examples are located in /example/CallableExample/

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance57

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~1296 days

Total

3

Last Release

1065d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/498441?v=4)[Daniel Mejta](/maintainers/mejta)[@mejta](https://github.com/mejta)

![](https://www.gravatar.com/avatar/92d6ba0cde4324b12697fe98421d2430b68bff0a981225d42b103fb53dea16f5?d=identicon)[vasikgreif](/maintainers/vasikgreif)

---

Top Contributors

[![martin-z-wpify](https://avatars.githubusercontent.com/u/239775915?v=4)](https://github.com/martin-z-wpify "martin-z-wpify (3 commits)")[![oldrichtaufer](https://avatars.githubusercontent.com/u/14940325?v=4)](https://github.com/oldrichtaufer "oldrichtaufer (3 commits)")[![hubipe](https://avatars.githubusercontent.com/u/617880?v=4)](https://github.com/hubipe "hubipe (1 commits)")[![mejta](https://avatars.githubusercontent.com/u/498441?v=4)](https://github.com/mejta "mejta (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wpify-heureka-hcapi/health.svg)

```
[![Health](https://phpackages.com/badges/wpify-heureka-hcapi/health.svg)](https://phpackages.com/packages/wpify-heureka-hcapi)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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