# calcurates/module-magento

> Calcurates Integration for Magento

`composer require calcurates/module-magento`

Canonical URL: https://packagento.com/calcurates/module-magento

## At a glance

- **Vendor**: calcurates (https://packagento.com/calcurates.md)
- **Latest version**: 1.49.0 — released 2026-06-04
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/calcurates/module-magento and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require calcurates/module-magento:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Calcurates Integration for Magento

## README

#### Calcurates magento module

##### Requirements
- Magento >= 2.3.7
- PHP >= 7.3

##### Manual installation
- Download [latest release](https://github.com/calcurates/module-magento/releases/latest)
- Unpack archive to `app/code/Calcurates/ModuleMagento`
- Execute
```bash
cd path_to_magento
sudo -u magento_user php bin/magento setup:upgrade
sudo -u magento_user php bin/magento cache:flush
```

##### Composer installation
```bash
cd path_to_magento
composer require calcurates/module-magento
sudo -u magento_user php bin/magento setup:upgrade
sudo -u magento_user php bin/magento cache:flush
```

##### Magento 2.4.4 and newer installations:
```bash
cd path_to_magento
sudo -u magento_user php bin/magento config:set oauth/consumer/enable_integration_as_bearer 1
sudo -u magento_user php bin/magento cache:flush
```

##### Upgrades
Magento provides options to the `setup:install` and `setup:upgrade` commands that enable safe installations and rollbacks:
- `--safe-mode=1` - Creates a data dump during the installation or upgrade process
- `--data-restore=1` - (Used with the `setup:upgrade` command only) Performs a rollback. Before you rollback, you must first check out code to the previous version of Magento. Then run `setup:upgrade --data-restore=1`

##### Configuration instructions
1. Login into Admin
1. Go to "Stores -> Configuration -> Sales -> Shipping Methods"
1. In "Calcurates [by Calcurates]":
    - "Calcurates API Token" - token obtained in Calcurates platform
    -  "Magento API Token" - token should be generated and added into Calcurates platform
1. Configure Magento API Integration token as shown in - [Magento Integration Token Instructions](https://devdocs.magento.com/guides/v2.3/get-started/authentication/gs-authentication-token.html)


##### API Permissions
- Calcurates API resource
- Stores → Settings → All Stores (the codes are `Calcurates_ModuleMagento::api` and `Magento_Backend::store`)

##### Set only one source per order item for shipping information added as extension attribute for order item
```bash
cd path_to_magento
sudo -u magento_user php bin/magento config:set carriers/calcurates/unique_order_item_source 1
sudo -u magento_user php bin/magento cache:flush
```

## Recent Versions

| Version | Released |
|---|---|
| 1.49.0 | 2026-06-04 |
| 1.48.22 | 2026-05-01 |
| 1.48.21 | 2026-02-23 |
| 1.48.20 | 2025-12-19 |
| 1.48.19 | 2025-12-08 |
| 1.48.18 | 2025-11-22 |
| 1.48.17 | 2025-08-04 |
| 1.48.16 | 2025-07-18 |
| 1.48.15 | 2025-07-18 |
| 1.48.14 | 2025-07-08 |

Showing 10 of 123 versions. Full release history on https://packagento.com/calcurates/module-magento.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| ext-json | * |
| magento/framework | >=102.0.7 |
| magento/module-store | >=101.0.7 |
| php | >=7.3 |

## Quality

Latest release (1.49.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 2648 | 2648 warnings (ruleset: Magento2) — 523 auto-fixable with phpcbf |
| PHPMD | Fail | 208 | 208 rule violations (UnusedFormalParameter:56, CyclomaticComplexity:37, MissingImport:34, NPathComplexity:32, IfStatementAssignment:13) |
| Cpd | Warning | 16 | 16 duplicated chunks spanning 1394 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 3 | valid; 3 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 189 | 189 | – | – |
| 2.4.8 | – | 188 | 188 | – |
| 2.4.9 | – | – | 187 | 187 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["calcurates/module-magento"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

calcurates is a Magento 2 vendor on Packagento. See https://packagento.com/calcurates.md for their full catalogue.

