PHPackages                             tobelyan/e-hdm - 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. tobelyan/e-hdm

ActiveLibrary[API Development](/categories/api)

tobelyan/e-hdm
==============

A PHP package for integrating with the Armenian electronic cash register (HDM) API.

00PHP

Since Sep 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tobelyan/e-hdm)[ Packagist](https://packagist.org/packages/tobelyan/e-hdm)[ RSS](/packages/tobelyan-e-hdm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

e-hdm
=====

[](#e-hdm)

A PHP package for integrating with the Armenian electronic cash register (HDM) API. This package provides a set of tools to interact with the electronic cash register system, making it easier to manage receipts, activate devices, configure departments, and more.

**Sponsored by** [Turn.am](https://turn.am)

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

[](#installation)

You can install the package via Composer:

```
composer require tobelyan/e-hdm

EHDM_API_BASE_URL=http://example.com/api/v1.0

## Use the Service in Laravel
```

namespace App\\Http\\Controllers;

use Tobelyan\\EHDM\\Services\\HDMService;

class ExampleController extends Controller { public function index() { $baseUrl = config('ehdm.api\_base\_url'); $hdmService = new HDMService($baseUrl);

```
    try {
        $status = $hdmService->checkServiceStatus();
        return response()->json($status);
    } catch (HDMException $e) {
        return response()->json(['error' => $e->getMessage()], 500);
    }
}

```

}

Exception Handling
------------------

[](#exception-handling)

```
use Tobelyan\EHDM\Services\HDMService;
use Tobelyan\EHDM\Exceptions\HDMException;

$baseUrl = 'http://example.com/api/v1.0';
$hdmService = new HDMService($baseUrl);

try {
    $response = $hdmService->activate('31801118');
    echo 'Service activated: ' . json_encode($response);
} catch (HDMException $e) {
    echo 'Failed to activate service: ' . $e->getErrorMessage();
    echo 'Error Code: ' . $e->getErrorCode();
}

## Available Methods

1. checkServiceStatus()

    Description: Checks the availability of the HDM API service.
    Request Method: GET
    Returns: An array containing the service status details.

2. activate(string $crn)

    Description: Activates the electronic cash register (ՀԴՄ).
    Request Method: POST
    Parameters:
        crn (string): The registration number of the cash register.
    Returns: An array with the result of the activation request.

3. configureDepartments(array $data)

    Description: Configures the departments and their tax regimes for the electronic cash register.
    Request Method: POST
    Parameters:
        data (array): An associative array containing department configurations:
            crn (string): Registration number of the cash register.
            seq (int): The sequence number of the request.
            departments (array): List of department configurations, where each entry includes:
                departmentId (int): Department ID.
                taxRegime (int): Tax regime (1 - VAT, 2 - non-VAT, etc.).
    Returns: An array with the configuration status.

4. printReceipt(array $data)

    Description: Prints a receipt via the electronic cash register.
    Request Method: POST
    Parameters:
        data (array): An associative array containing receipt details, such as:
            crn (string): Registration number of the cash register.
            seq (int): The sequence number of the request.
            cashierId (int): ID of the cashier.
            items (array): List of items in the receipt.
    Returns: An array with the receipt print status.

5. printReceiptCopy(string $crn, int $seq, int $receiptId)

    Description: Prints a copy of an existing receipt.
    Request Method: POST
    Parameters:
        crn (string): Registration number of the cash register.
        seq (int): The sequence number of the request.
        receiptId (int): ID of the receipt to print a copy of.
    Returns: An array with the receipt copy print status.

6. getReturnedReceiptInfo(string $crn, int $receiptId, int $seq)

    Description: Retrieves information about a returned receipt.
    Request Method: POST
    Parameters:
        crn (string): Registration number of the cash register.
        receiptId (int): ID of the returned receipt.
        seq (int): The sequence number of the request.
    Returns: An array with the returned receipt details.

7. printReturnReceipt(array $data)

    Description: Prints a return receipt for a transaction.
    Request Method: POST
    Parameters:
        data (array): An associative array containing return receipt details, such as:
            crn (string): Registration number of the cash register.
            seq (int): The sequence number of the request.
            returnItemList (array): List of items to return.
    Returns: An array with the return receipt print status.

```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tobelyan-e-hdm/health.svg)

```
[![Health](https://phpackages.com/badges/tobelyan-e-hdm/health.svg)](https://phpackages.com/packages/tobelyan-e-hdm)
```

###  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.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

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