PHPackages                             friends-of-hyva/magento2-paradise-csp-workshop-checkout - 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. [Payment Processing](/categories/payments)
4. /
5. friends-of-hyva/magento2-paradise-csp-workshop-checkout

ActiveMagento2-module[Payment Processing](/categories/payments)

friends-of-hyva/magento2-paradise-csp-workshop-checkout
=======================================================

Hyva Developer Paradise - Checkout payment module

1.0.0(3mo ago)031OSL-3.0

Since Apr 8Compare

[ Source](https://github.com/friends-of-hyva/magento2-paradise-csp-workshop-checkout)[ Packagist](https://packagist.org/packages/friends-of-hyva/magento2-paradise-csp-workshop-checkout)[ RSS](/packages/friends-of-hyva-magento2-paradise-csp-workshop-checkout/feed)WikiDiscussions Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

Hyva Developer Paradise - Checkout Module
=========================================

[](#hyva-developer-paradise---checkout-module)

This module implements the **"Develop in Paradise"** custom payment method for the Hyva Developer Paradise CSP workshop. It collects developer information during checkout and demonstrates Hyva Checkout integration patterns — including intentional CSP violations for students to discover and fix.

Module Name
-----------

[](#module-name)

`HyvaParadise_Checkout`

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

[](#installation)

Install via the metapackage:

```
composer require friends-of-hyva/magento2-paradise-csp-workshop-meta
```

Or install directly:

```
composer require friends-of-hyva/magento2-paradise-csp-workshop-checkout
bin/magento setup:upgrade --keep-generated
```

### If the package isn't on Packagist yet

[](#if-the-package-isnt-on-packagist-yet)

If `composer require` can't find the package, add the GitHub repository manually to your project's `composer.json`.

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/friends-of-hyva/magento2-paradise-csp-workshop-checkout"
        }
    ]
}
```

Then run:

```
composer require friends-of-hyva/magento2-paradise-csp-workshop-checkout
bin/magento setup:upgrade --keep-generated
```

What This Module Does
---------------------

[](#what-this-module-does)

During checkout, students encounter the "Develop in Paradise" payment method. Selecting it reveals a form asking for:

- Their developer name
- Their favourite song
- Whether they're ready for their CSP journey

This data is stored on the quote and order, and displayed in the admin order view. The checkout form template contains **intentional CSP violations** — part of the workshop teaching exercise.

Features
--------

[](#features)

### 1. Custom Payment Method

[](#1-custom-payment-method)

- Offline payment method with code `paradise_developer`
- Title: "Develop in Paradise"
- Configurable via Admin &gt; Stores &gt; Configuration &gt; Sales &gt; Payment Methods

### 2. Magewire Checkout Form

[](#2-magewire-checkout-form)

- Real-time field validation via Magewire component
- Developer name: required, max 100 characters
- Favourite song: optional, max 150 characters
- CSP journey consent: checkbox
- Validation errors surfaced via Hyva Checkout messenger

### 3. Data Persistence

[](#3-data-persistence)

- Fields stored as custom columns on `quote` and `sales_order`
- Exposed via extension attributes on `CartInterface` and `OrderInterface`
- Quote columns synced to order on placement via event observer

### 4. Admin Order Display

[](#4-admin-order-display)

- Collected developer info shown in the order view under "Additional Information"
- Only rendered for orders placed with the `paradise_developer` payment method

Data Collected
--------------

[](#data-collected)

FieldLabelValidation`paradise_developer_name`Developer nameRequired, max 100 chars`paradise_developer_song`Favourite songOptional, max 150 chars`paradise_developer_ready`Ready for CSP journeyBoolean (checkbox)Directory Structure
-------------------

[](#directory-structure)

```
magento2-paradise-checkout/
├── Block/
│   └── Adminhtml/Order/View/
│       └── ParadiseDeveloperInfo.php       # Block for admin order template
├── Magewire/
│   └── Components/Checkout/PaymentMethods/
│       └── ParadiseDeveloper.php           # Magewire checkout component
├── Model/
│   ├── PaymentMethod.php                   # Offline payment method definition
│   └── PlaceOrderService.php              # Place order service
├── Observer/
│   └── QuoteSubmitBeforeObserver.php       # Copies data from quote → order
├── Plugin/
│   ├── Magento/Quote/Api/
│   │   └── CartRepository.php             # Syncs quote columns ↔ extension attributes
│   └── Magento/Sales/Api/
│       └── OrderRepository.php            # Syncs order columns ↔ extension attributes
├── Setup/
│   └── Patch/Data/
│       └── AddParadiseOrderAttributes.php # Data patch stub
├── etc/
│   ├── adminhtml/
│   │   └── system.xml                     # Admin payment method config
│   ├── config.xml                         # Default payment method settings
│   ├── db_schema.xml                      # Custom columns on quote and sales_order
│   ├── di.xml                             # DI wiring
│   ├── events.xml                         # Observer registration
│   └── extension_attributes.xml          # Extension attributes for Quote and Order
├── view/
│   ├── adminhtml/
│   │   ├── layout/
│   │   │   └── sales_order_view.xml       # Injects info block into order view
│   │   └── templates/order/view/
│   │       └── paradise-developer-info.phtml  # Admin order display
│   └── frontend/
│       ├── layout/
│       │   └── hyva_checkout_components.xml   # Wires component into Hyva Checkout
│       └── templates/checkout/
│           └── paradise-developer-info.phtml  # Checkout form (intentional CSP violations)
├── composer.json
├── registration.php
├── COPYING.txt
├── LICENSE.txt
└── SECURITY.md

```

Technical Details
-----------------

[](#technical-details)

### Payment Method

[](#payment-method)

Defined in `Model/PaymentMethod.php` as an offline method (no capture, no authorization). Default configuration in `etc/config.xml`:

- Active by default
- Sort order: 999
- New order status: pending

### Magewire Component

[](#magewire-component)

`Magewire/Components/Checkout/PaymentMethods/ParadiseDeveloper.php` manages the checkout form:

- Live validation on every field update
- Persists data directly to quote extension attributes on each change
- Emits validation errors to the Hyva Checkout messenger

### Data Flow

[](#data-flow)

```
Checkout form (Magewire)
  → quote extension attributes
  → CartRepository plugin → quote columns (paradise_developer_*)
  → QuoteSubmitBeforeObserver → order columns (paradise_developer_*)
  → OrderRepository plugin → order extension attributes
  → Admin order view template

```

### Database Schema

[](#database-schema)

Custom columns added by `etc/db_schema.xml` (declarative schema):

TableColumnType`quote``paradise_developer_name`varchar(100)`quote``paradise_developer_song`varchar(150)`quote``paradise_developer_ready`smallint`sales_order``paradise_developer_name`varchar(100)`sales_order``paradise_developer_song`varchar(150)`sales_order``paradise_developer_ready`smallint### Extension Attributes

[](#extension-attributes)

Defined on both `CartInterface` and `OrderInterface` in `etc/extension_attributes.xml`:

- `paradise_developer_name` (string)
- `paradise_developer_song` (string)
- `paradise_developer_ready` (boolean)

Intentional CSP Violations
--------------------------

[](#intentional-csp-violations)

The frontend checkout template (`view/frontend/templates/checkout/paradise-developer-info.phtml`) contains intentional CSP violations as part of the workshop teaching exercise:

- Inline JavaScript without `$hyvaCsp->registerInlineScript()`
- Alpine inline expressions that are not CSP-safe
- Event handler patterns that need to be extracted to methods

Students are expected to identify and fix these violations using the patterns learned in the Frontend module and the `hyva-csp-helper.php` migration tool.

Dependencies
------------

[](#dependencies)

- Magento Framework 102.0+ or 103.0+
- Hyva Checkout 1.1.0+
- Module dependencies: `Magento_Payment`, `Magento_Sales`, `Magento_Quote`, `Hyva_Checkout`

License
-------

[](#license)

[Open Software License ("OSL") v. 3.0](LICENSE.txt)

Support
-------

[](#support)

- Hyva Documentation:
- Paradise Event:
- Community: Hyva Slack &amp; Discord

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance80

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

107d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1905417db5fbd31a61553b29bd441fdc66945da7cfb14f1b20a72275c68184e8?d=identicon)[vinai](/maintainers/vinai)

![](https://www.gravatar.com/avatar/1548630acefd0c1ac8002a37135d67741307f978296ac628422e3923b7a3766b?d=identicon)[JeroenBoersma](/maintainers/JeroenBoersma)

### Embed Badge

![Health badge](/badges/friends-of-hyva-magento2-paradise-csp-workshop-checkout/health.svg)

```
[![Health](https://phpackages.com/badges/friends-of-hyva-magento2-paradise-csp-workshop-checkout/health.svg)](https://phpackages.com/packages/friends-of-hyva-magento2-paradise-csp-workshop-checkout)
```

###  Alternatives

[adyen/module-payment

Official Magento2 Plugin to connect to Payment Service Provider Adyen.

1673.2M10](/packages/adyen-module-payment)[mollie/magento2-hyva-checkout

Hyvä Themes Checkout module for Mollie Payments

11240.0k](/packages/mollie-magento2-hyva-checkout)[checkoutcom/magento2

Checkout.com Payment Gateway for Magento 2

34276.3k1](/packages/checkoutcom-magento2)[vipps/module-payment

Vipps MobilePay Payment Module for Magento 2

1098.4k](/packages/vipps-module-payment)

PHPackages © 2026

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