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)041MITPHPPHP &gt;=5.4.0

Since Jun 28Pushed 2y 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 1mo ago

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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

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

1009d ago

### Community

Maintainers

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

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

---

Top Contributors

[![oldrichtaufer](https://avatars.githubusercontent.com/u/14940325?v=4)](https://github.com/oldrichtaufer "oldrichtaufer (3 commits)")[![martin-z-wpify](https://avatars.githubusercontent.com/u/239775915?v=4)](https://github.com/martin-z-wpify "martin-z-wpify (2 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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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