PHPackages                             lqt/loqate-integration - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. lqt/loqate-integration

ActiveMagento2-module[Validation &amp; Sanitization](/categories/validation)

lqt/loqate-integration
======================

Performs address capture and data validation (email, phone number and address) using Loqate API.

2.0.10(4w ago)212.6k↓18.4%[3 PRs](https://github.com/loqate/loqate-magento/pulls)JavaScriptCI passing

Since Nov 22Pushed 1w ago1 watchersCompare

[ Source](https://github.com/loqate/loqate-magento)[ Packagist](https://packagist.org/packages/lqt/loqate-integration)[ RSS](/packages/lqt-loqate-integration/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (37)Used By (0)

Loqate Magento 2 API Integration
================================

[](#loqate-magento-2-api-integration)

What is the Loqate API Integration?
-----------------------------------

[](#what-is-the-loqate-api-integration)

Performs address capture and data validation (email, phone number and address) using Loqate API.

Download
--------

[](#download)

### Download via composer

[](#download-via-composer)

Request composer to fetch the module:

```
composer require loqate-integration/adobe

```

### Manual Download

[](#manual-download)

Download &amp; copy the git content to `/app/code/Loqate/ApiIntegration`.

Install
-------

[](#install)

Please run the following commands after you download the module.

```
php bin/magento module:enable Loqate_ApiIntegration
php bin/magento setup:upgrade
php bin/magento setup:di:compile

```

Configuration Instructions
--------------------------

[](#configuration-instructions)

The configuration for the module is located under Stores -&gt; Configuration -&gt; Loqate.

Magento 2 DevContainer Setup
----------------------------

[](#magento-2-devcontainer-setup)

This repository includes a [devcontainer](.devcontainer/) for rapid Magento 2 extension development.

### Quick Start

[](#quick-start)

1. **Create a devcontainer.env**: Before opening the devcontainer you will need to create a `devcontainer.env` file which you can copy from [`devcontainer.env.example`](.devcontainer/devcontainer.env.example).
2. **Open in VS Code**: Use the "Reopen in Container" command (requires the Remote - Containers extension).
3. **Wait for Setup**: The devcontainer will build, install dependencies, and set up Magento 2 automatically.
4. **Access Magento**:
    - Storefront:
    - Admin:
    - Default admin user: `admin` / `admin123`
5. **Live Extension Development**: Your extension source is mounted into the running Magento instance. Changes are reflected immediately after running `bin/magento setup:upgrade` and clearing cache.

### Services

[](#services)

- PHP-FPM (8.1)
- Nginx
- MySQL 8
- Opensearch
- Redis

### Notes

[](#notes)

- The first startup may take several minutes (Magento install, Composer, DB setup).
- The extension is symlinked into `app/code/Loqate/ApiIntegration`.
- To re-run setup, use [`.devcontainer/setup-magento.sh`](.devcontainer/setup-magento.sh) inside the container.
- If you have any DNS issues, you will need to copy your Zscaler certificate into the PHP container - see the Zscaler workaround comment in the [`Dockerfile`](.devcontainer/Dockerfile).

Useful helpers
--------------

[](#useful-helpers)

- `php -r '$e=include "app/etc/env.php"; $d=$e["db"]["connection"]["default"]; printf("mysql -h%s -u%s -p%s %s\n",$d["host"],$d["username"],$d["password"],$d["dbname"]);'` Will extract the command to access mysql within the devcontainer, currently that command is `mysql -hdb -umagento -pmagento magento`
- `bin/magento config:show` will list all of the config currently set in the instance, this can be set with `bin/magento config:set  `

Testing
-------

[](#testing)

### Automated unit tests

[](#automated-unit-tests)

Unit tests live under [`Test/Unit`](Test/Unit) and run with Magento's unit test suite. From the Magento root of an instance that has the module installed:

```
# Module installed via composer:
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist \
  vendor/gbg-loqate/loqate-integration/Test/Unit

# Module installed under app/code:
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist \
  app/code/Loqate/ApiIntegration/Test/Unit
```

`Test/Unit/Helper/ValidatorTest.php` covers the captured-address (Loqate lookup) bypass: array-street parsing, that a looked-up address is recognised across countries (e.g. UK province-name vs region, US `CA` vs `California`), case/whitespace tolerance, and the guards that a different or empty address is **not** bypassed.

### Manual testing (checkout flow)

[](#manual-testing-checkout-flow)

**Prerequisites** (Admin → Stores → Configuration → Loqate, or `bin/magento config:set`):

- `loqate_settings/settings/api_key` — a valid Loqate API key
- `loqate_settings/address_settings/enable_checkout` = `1` (verification enabled at checkout)
- Capture/lookup enabled on checkout
- Optional: set strict thresholds under `loqate_settings/verify_threshold_settings` so a hand-typed address would be rejected, making the bypass behaviour obvious

**Verify a looked-up address is accepted (the main regression):**

1. Go to checkout (guest or logged-in).
2. Use the **Loqate lookup** and **select a suggested address from the dropdown** — do not hand-type it.
3. Proceed through shipping / place order. The address should be accepted and checkout should proceed (the selected address bypasses re-verification).

**Different-country checks** (the bypass is locale-agnostic):

- **US** — lookup returns the state as a full name (e.g. *California*) while Magento stores the region as `CA`; the address should still be accepted.
- **UK** — lookup an address with no region; should be accepted.

**Guard checks (verification is still active):**

- Hand-type an invalid address **without** using the lookup → verification still fires and rejects it.
- Select a lookup address, then **edit** a field (e.g. the street) → it is re-verified, since it no longer matches the captured address.

**Observe via logs** — a bypassed (captured) address makes no verify API call, whereas a hand-typed one does:

```
tail -f var/log/loqate*.log
```

Deployment
----------

[](#deployment)

Releasing a new version requires two separate deployments: one to the **Adobe Marketplace** and one via **Composer**. Before proceeding with either, update the version number in both [`composer.json`](composer.json) and [`etc/module.xml`](etc/module.xml) to reflect the new release, then commit and push the change.

Note that the Git tag for the Composer release is created automatically when changes are merged to `master` — see the [Composer](#composer) section below.

### Adobe Marketplace

[](#adobe-marketplace)

1. Create a zip of the whole repository. Ensure that `.devcontainer`, `.git` and `.gitignore` are excluded, as the Magento malware scan does not allow them to be uploaded. The following command will produce a clean archive: ```
    zip -r loqate-integration.zip . -x "*.git*" -x "*.devcontainer*"
    ```
2. Log in to your Adobe account at [account.magento.com](https://account.magento.com/customer/account/login).
3. Navigate to the [extension versions page](https://commercedeveloper.adobe.com/extensions/versions/gbg-loqate-loqate-integration) on the Adobe Commerce Developer Portal.
4. Upload the zip archive.
5. Adobe will automatically process and scan the submission. This can take up to **15 business days** if a manual approval is required.
    - If the scan **fails**, review the provided feedback, address the reported issues, and resubmit.
    - If the scan **passes**, the extension will be published to the marketplace within the hour.

### Composer

[](#composer)

The Git tag for a Composer release is created automatically. When changes are merged to `master`, the [`auto-tag.yml`](.github/workflows/auto-tag.yml) GitHub Action analyses the commits since the previous tag and creates a new version tag based on [Conventional Commits](https://www.conventionalcommits.org/):

- `feat:` commits → **MINOR** bump (e.g. `v2.0.4` → `v2.1.0`)
- `fix:` commits → **PATCH** bump (e.g. `v2.0.4` → `v2.0.5`)
- `feat!:` or `BREAKING CHANGE:` → **MAJOR** bump (e.g. `v2.0.4` → `v3.0.0`)
- Other types (`docs:`, `style:`, `refactor:`, etc.) → no bump (no tag created)

If none of the commits since the previous tag are `feat:`, `fix:`, or a breaking change, **no tag is created and no release is published** — so commits like `docs:`, `chore:`, `ci:`, `refactor:`, etc. can be merged to `master` without cutting a release. When a release *is* cut, the workflow also publishes a GitHub release with an auto-generated changelog. Once the new tag is pushed, Composer will automatically detect it and make the release available on [packagist](https://packagist.org/packages/lqt/loqate-integration).

To ensure a release is tagged correctly, make sure your commit messages follow the Conventional Commits format.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance97

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor3

3 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 ~40 days

Total

15

Last Release

29d ago

Major Versions

1.1.16 → 2.0.02025-09-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/9aedf822a20770b9d4b65a5f500447ce84a1ff4f09471ec9a1426426913c050c?d=identicon)[hct-ux](/maintainers/hct-ux)

![](https://www.gravatar.com/avatar/643b804e8c0b8414b87c0443b381230beaecdd021f1fd55bfaf1b51a9be116fc?d=identicon)[liam.mclaughlin](/maintainers/liam.mclaughlin)

---

Top Contributors

[![georgeirimiciuc](https://avatars.githubusercontent.com/u/137795500?v=4)](https://github.com/georgeirimiciuc "georgeirimiciuc (47 commits)")[![dalestringer](https://avatars.githubusercontent.com/u/26840820?v=4)](https://github.com/dalestringer "dalestringer (37 commits)")[![jesusangelhernandezderojas](https://avatars.githubusercontent.com/u/248492576?v=4)](https://github.com/jesusangelhernandezderojas "jesusangelhernandezderojas (27 commits)")[![hct-ux](https://avatars.githubusercontent.com/u/25434973?v=4)](https://github.com/hct-ux "hct-ux (25 commits)")[![ant-doyle](https://avatars.githubusercontent.com/u/55383667?v=4)](https://github.com/ant-doyle "ant-doyle (14 commits)")[![mariuscoprean](https://avatars.githubusercontent.com/u/20768238?v=4)](https://github.com/mariuscoprean "mariuscoprean (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![liam-mclaughlin](https://avatars.githubusercontent.com/u/59828546?v=4)](https://github.com/liam-mclaughlin "liam-mclaughlin (4 commits)")[![htiberiu](https://avatars.githubusercontent.com/u/129293647?v=4)](https://github.com/htiberiu "htiberiu (1 commits)")[![jerry-wu-1623](https://avatars.githubusercontent.com/u/207552537?v=4)](https://github.com/jerry-wu-1623 "jerry-wu-1623 (1 commits)")[![benhopkinstech](https://avatars.githubusercontent.com/u/13667722?v=4)](https://github.com/benhopkinstech "benhopkinstech (1 commits)")

### Embed Badge

![Health badge](/badges/lqt-loqate-integration/health.svg)

```
[![Health](https://phpackages.com/badges/lqt-loqate-integration/health.svg)](https://phpackages.com/packages/lqt-loqate-integration)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

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