punchcommerce / punchcommerce-spryker-module
PunchCommerce integration module for Spryker Commerce OS
Package info
gitlab.netzdirektion.de/packages/punchcommerce-spryker-module
pkg:composer/punchcommerce/punchcommerce-spryker-module
Requires
- php: >=8.2
- netzdirektion/punchcommerce-client-php: ^1.1
- spryker-shop/customer-page: ^2.70
- spryker/cart: ^7.15
- spryker/customer: ^7.69
- spryker/kernel: ^3.79
- spryker/log: ^3.18
- spryker/persistent-cart: ^3.13
- spryker/router: ^1.23
- spryker/session: ^4.19
- spryker/transfer: ^3.41
- spryker/zed-request: ^3.23
Requires (Dev)
- spryker/code-sniffer: ^0.17.28
- spryker/testify: ^3.61
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-24 12:53:10 UTC
README
This module integrates PunchCommerce into the Spryker Commerce OS. It provides functionality for punchout sessions, cart transfer, and management of PunchCommerce-specific customer data.
Compatibility
| Module Version | Spryker | PHP | Notes |
|---|---|---|---|
| 2.x | 202608+ | ≥ 8.3 | Root namespace Punchcommerce (see CHANGELOG upgrade guide) |
| 1.x | 202507 | ≥ 8.2 | Root namespace PunchCommerce, requires router workaround |
Spryker 202608 itself requires PHP ≥ 8.3, which is why 2.x raises the floor.
Tested against the Spryker B2B Marketplace Demo (spryker-feature/*: ^202608.0) on PHP 8.3 and 8.4.
Features
- Punchout Authentication: Customer authentication via PunchCommerce.
- Cart Transfer: Seamless transfer of the Spryker cart back to the procurement system through the PunchCommerce gateway.
- Punchout Cart Lifecycle: Punchout carts do not pile up — stale punchout carts are deleted on the next punchout login, the cart is removed after a successful handback (best effort), and punchout carts never appear in the storefront cart list.
- Checkout Button Widget: Ships a drop-in widget that renders the Return-to-ERP form during punchout sessions and the regular checkout button otherwise — no project-level override needed.
- Customer Management: Extends Spryker customer data with PunchCommerce identifiers, including the Backoffice customer forms.
- Backoffice Integration: View PunchCommerce details directly in the Zed customer view.
- iFrame Embedding: ships the CSP/
X-Frame-Optionsrelaxation a punchout session needs inside the procurement system's iFrame (see INSTALL.md §8 for the security scoping). - Punchout Entry Actions: the gateway's deep links —
restore-basket,detail,searchandbackground-search— are executed after login, combinable in a single call and protocol-agnostic. No project registration required. - Integration Check:
vendor/bin/console punchcommerce:integration:checkverifies the whole project integration and pinpoints the classic silent failure modes.
Installation
docker/sdk cli "composer require punchcommerce/punchcommerce-spryker-module:^2.0"
Note: All PHP/Composer commands must be executed inside the Docker container via
docker/sdk cli "command".
For the step-by-step integration guide (namespace registration, quote allowlist, plugin wiring, permissions, verification), see INSTALL.md.
Configuration
The base configuration goes into config_default.php:
use Punchcommerce\Shared\PunchcommerceSprykerModule\PunchcommerceSprykerModuleConstants;
$config[PunchcommerceSprykerModuleConstants::PUNCHCOMMERCE_API_BASE_URL] = 'https://www.punchcommerce.de';
Punchout Entry Actions
The PunchCommerce gateway normalises OCI, cXML and IDS Connect intents onto four shop-side actions, appended to the punchout entry URL:
actions[] | Extra parameters | Shop behaviour |
|---|---|---|
restore-basket | items=NR:QTY,NR:QTY,… | Re-adds the listed articles to the fresh punchout cart; unknown numbers are skipped with a notice. Used by OCI re-entry, cXML operation="edit" and IDS WKS. |
detail | ordernumber | Redirects to the product detail page; an unknown article falls back to the landing page with a notice, never a 404. |
search | keyword | Redirects to the search result page. |
background-search | keyword | Renders no page for a human: runs the search server-side and auto-posts a basket payload to the gateway. Answers OCI BACKGROUND_SEARCH and IDS availability/price enquiries. |
Actions may be combined; restore-basket always runs first and never produces a
response of its own. The protocol identifier (type) is stored opaquely and is never
used to gate an action. See INSTALL.md §13.
Documentation
- Installation Guide (INSTALL.md)
- Changelog & v1→v2 Upgrade Guide
- Security Policy
- PunchCommerce Website
- PunchCommerce API Documentation
- Spryker Documentation
Repository & Issues
- Source: https://gitlab.netzdirektion.de/packages/punchcommerce-spryker-module
- Issues: https://gitlab.netzdirektion.de/packages/punchcommerce-spryker-module/-/issues
License
See the LICENSE file for license information.