PHPackages                             kodexpo/module-return-compliance - 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. kodexpo/module-return-compliance

ActiveMagento2-module

kodexpo/module-return-compliance
================================

Magento 2 EU return compliance flow with secure customer and guest withdrawal requests.

v1.0.0(1mo ago)00Apache-2.0PHPPHP ^8.1 || ^8.2 || ^8.3 || ^8.4 || ^8.5

Since Jul 14Pushed 1mo agoCompare

[ Source](https://github.com/kodexpo/eu-return-compliance)[ Packagist](https://packagist.org/packages/kodexpo/module-return-compliance)[ RSS](/packages/kodexpo-module-return-compliance/feed)WikiDiscussions main Synced 1w ago

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

Magento 2 EU Return Compliance
==============================

[](#magento-2-eu-return-compliance)

`KodeXpo_ReturnCompliance` provides a secure return / withdrawal flow for Magento 2 stores with guest, customer, and admin review handling.

Built by KodeXpo.

Need custom Magento development, checkout and account flow work, or help debugging Adobe Commerce backend behavior? Contact: `dev@kodexpo.com`

Why This Module Exists
----------------------

[](#why-this-module-exists)

EU withdrawal / return flows need more than a simple contact form.

This module is built to handle:

- customer account requests
- guest requests that require ownership verification
- secure confirmation links with tokenized URLs
- configurable timing rules for the withdrawal window
- configurable resend throttling and confirmation attempt limits
- manual admin review before a request is approved or rejected
- email copy and sender identity that can be configured per store

It is intended for stores that want a clear, auditable withdrawal workflow without exposing order data or allowing uncontrolled guest abuse.

Features
--------

[](#features)

- customer account withdrawal request flow
- guest withdrawal request flow with secure verification link
- configurable guest verification:
    - secure token URL
    - code TTL
    - resend delay
    - max attempts
    - optional reCAPTCHA integration
- admin review workflow:
    - pending requests grid
    - request detail view
    - approve / reject decision handling
    - review note support
    - order history comment on review
- configurable business rules:
    - withdrawal window
    - anchor order priority
    - anchor offsets for AWB, shipment, invoice, and order
- configurable email settings:
    - confirmation template
    - guest code template
    - from identity
- translated storefront and admin copy
- Magento 2.4.6 to 2.4.9 compatibility target

Request Flow
------------

[](#request-flow)

### Customer Account Flow

[](#customer-account-flow)

1. Customer opens an order in `My Account`.
2. The module shows the withdrawal CTA when the order is still eligible.
3. The request is saved with an initial pending state.
4. The customer sees a confirmation page with the request status and order reference.
5. Admin reviews the request and approves or rejects it later.

### Guest Flow

[](#guest-flow)

1. Guest enters order number and email address.
2. The module verifies order ownership before exposing any request state.
3. If allowed, the module sends a secure verification link.
4. The guest opens the tokenized confirmation page from the email.
5. The guest confirms the request and receives a submission response.
6. The request enters the same admin review queue as customer requests.

### Admin Flow

[](#admin-flow)

1. Admin opens the return compliance request view.
2. The request detail page shows order, customer email, status, review metadata, and review note.
3. Admin chooses the decision in the dropdown and saves the record.
4. The module updates the request status, records the review data, and appends an order comment.

Security And Abuse Protection
-----------------------------

[](#security-and-abuse-protection)

The module is designed with abuse resistance in mind:

- guest links use opaque tokens instead of exposing email or verification code in the URL
- guest resend requests are throttled
- confirmation attempts are capped
- guest verification data is retained only for a configurable period
- forms are protected with Magento form keys where applicable
- optional guest reCAPTCHA support is available
- request state is handled in the module rather than exposing order data directly

Access Points
-------------

[](#access-points)

### Frontend

[](#frontend)

Guest flow:

```
returncompliance/guest/index
returncompliance/guest/lookup
returncompliance/guest/code
returncompliance/guest/success

```

Customer flow:

```
returncompliance/customer/submit
returncompliance/customer/success

```

### Admin

[](#admin)

Request management:

```
kodexpo_returncompliance/request/index
kodexpo_returncompliance/request/view
kodexpo_returncompliance/request/save

```

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

[](#installation)

### Composer

[](#composer)

If this module is published to your Composer repository, install it with your package name, then run:

```
bin/magento module:enable KodeXpo_ReturnCompliance
bin/magento setup:upgrade
bin/magento cache:clean
```

If needed:

```
bin/magento setup:di:compile
bin/magento setup:static-content:deploy en_US -f
```

### Manual

[](#manual)

Copy the module to:

```
app/code/KodeXpo/ReturnCompliance

```

Then run:

```
bin/magento module:enable KodeXpo_ReturnCompliance
bin/magento setup:upgrade
bin/magento cache:clean
```

Configuration
-------------

[](#configuration)

The module can be configured from:

```
Stores > Configuration > KodeXpo > EU Return Compliance

```

Typical settings include:

- module enablement
- withdrawal window and anchor offsets
- guest verification code TTL, resend delay, and max attempts
- guest verification retention cleanup
- email template selection and sender identity
- guest reCAPTCHA settings

The module also respects Magento's core reCAPTCHA settings when guest protection is enabled.

Compatibility
-------------

[](#compatibility)

Designed for Magento Open Source / Adobe Commerce 2.4.6 through 2.4.9. The module package currently allows PHP 8.1 through 8.5.

Package requirements currently allow:

- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4
- PHP 8.5

Limitations
-----------

[](#limitations)

- The module does not auto-fix orders or shipments.
- Request eligibility still depends on order state and store configuration.
- Admin review remains manual by design.
- Index and cron health can affect eligibility timing and cleanup behavior.

Included Translations
---------------------

[](#included-translations)

- `bg_BG`
- `cs_CZ`
- `da_DK`
- `de_DE`
- `el_GR`
- `en_US`
- `es_ES`
- `et_EE`
- `fi_FI`
- `fr_FR`
- `hr_HR`
- `hu_HU`
- `it_IT`
- `lt_LT`
- `lv_LV`
- `nb_NO`
- `nl_NL`
- `pl_PL`
- `pt_PT`
- `ro_RO`
- `sk_SK`
- `sl_SI`
- `sv_SE`

License
-------

[](#license)

Apache License 2.0. See [LICENSE](LICENSE) and [LICENSE.txt](LICENSE.txt).

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for release notes and notable changes.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

47d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/215408362?v=4)[KodeXpo](/maintainers/kodexpo)[@kodexpo](https://github.com/kodexpo)

---

Top Contributors

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

---

Tags

adobe-commerceecommerceecommerce-websiteeuropean-unionfreemagentomagento2magento2-extensionmagento2-extension-freemagento2-modulemagento2-module-freeopen-sourcephpphp8returnreturn-compliancewithdrawalwithdrawal-right

### Embed Badge

![Health badge](/badges/kodexpo-module-return-compliance/health.svg)

```
[![Health](https://phpackages.com/badges/kodexpo-module-return-compliance/health.svg)](https://phpackages.com/packages/kodexpo-module-return-compliance)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1162.0M19](/packages/mollie-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50413.8k26](/packages/dotdigital-dotdigital-magento2-extension)[yireo/magento2-emailtester2

Preview transactional emails and test send them in your backend

34452.5k](/packages/yireo-magento2-emailtester2)[buckaroo/magento2

Buckaroo Magento 2 extension

32431.3k8](/packages/buckaroo-magento2)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

2610.9k2](/packages/zwernemann-module-withdrawal)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1019.5k30](/packages/loki-magento2-components)

PHPackages © 2026

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