Summary
- Implement additional improvements for payment flows, credit note handling, webhook processing, and admin UI.
Payment & Checkout
- Add Pay Now (Instant Payment) support with correct transaction state handling (paid vs configured state)
- Implement async payment flow with early order data persistence (saveEarlyOrderData) before hosted checkout redirect
- Add external_reference_id field to mondu_order_data for better order tracking
- Clean up stale mondu_order_data entries from failed payment attempts on successful finalize (deleteStaleOrderData)
- Improve shipping address resolution with billing address fallback
- Fix CLI setup issues
Credit Notes
- Add credit note cancellation endpoint (/api/mondu/orders/{orderId}/credit_notes/{creditNoteId}/cancel)
- Mark cancelled credit notes with invoice_state = 'cancelled' in both live and versioned contexts
- Unlink cancelled credit notes from parent invoice (referencedDocumentId = null) so merchants can create new credit notes
- Intercept document deletions via PreWriteValidationEvent to cancel credit notes in Mondu API before CASCADE removes DB records
- Use referencedDocumentId for parent invoice lookup with fallback to invoiceNumber
- Skip zero-amount credit notes (grossAmountCents <= 0) to prevent Mondu API 422 errors
- Filter credit line items by cutoff date to only include items belonging to the current credit note
Invoices
- Add invoice_state column to mondu_invoice_data (migration)
- Track cancelled invoice state for accurate Claim at Mondu calculation
- Improve invoice cancellation flow with Storno document support (StornoSubscriber)
- Fix invoice re-submission after cancellation
- Handle Zugferd document types (zugferd_credit_note, zugferd_embedded_credit_note, etc.)
Webhooks
- Handle order/canceled and order/cancelled webhook topics (previously fell through to "Unregistered topic")
- Use getTransactions()->last() instead of first() to correctly handle payment retries (prevents picking up old cancelled transaction)
- Guard vIBAN update with null check to prevent WriteTypeIntendException when webhook arrives before order data is created
- Implement ShopUrlService for correct webhook URL registration across sales channels
- Add backward state transition protection to prevent invalid payment state regressions
Flow Builder Events
- Add custom Mondu events: MonduOrderConfirmedEvent, MonduOrderPendingEvent, MonduOrderDeclinedEvent, MonduOrderCancelledEvent, MonduOrderApprovedEvent
- Implement MonduBusinessEventCollector for Flow Builder integration
- Dispatch events from webhook handlers and finalize flow
Admin UI
- Add "Cancel Credit Note" button to order document card
- Add "Mondu Status" display on order detail page
- Add API test button in plugin configuration
- Update translations (EN, DE, FR, NL)
- Build admin assets with Vite (stable filename without content hash)
Configuration
- Add configurable order transaction state (paid/authorized) per sales channel
- Add auto-transition order state toggle
- Add extended logging toggle
- Add skip order state validation option (migration)
Logging
- Guard all mondu.INFO log entries with isExtendedLogsEnabled() check
- Add dedicated Mondu log channel via monolog configuration
Database Migrations
- Migration1728850000MigrateSkipOrderStateValidation — add skip validation config
- Migration1729027200AddExternalReferenceId — add external_reference_id to mondu_order_data
- Migration1745900000AddInvoiceState — add invoice_state to mondu_invoice_data (with TABLE_SCHEMA = DATABASE() fix)
## [1.6.1] - 2025-12-18
### Added
- **Payment Method Specific Logos**: Each Mondu payment method now displays its own unique logo in the admin panel and storefront footer
- Invoice (Net 30): `invoice_white_rectangle.png`
- SEPA Direct Debit: `sepa_white_rectangle.png`
- Installment Payments: `installments_white_rectangle.png`
- Pay Now: `instant_pay_white_rectangle.png`
- New `PAYMENT_METHOD_LOGOS` constant in `PaymentMethods` class for logo mapping
- `getPaymentMethodLogoMediaId()` method in `MediaProvider` for handling payment-specific logos
- `hasMediaAlreadyInstalledByName()` method for checking existing media by custom name
- **Address Additional Fields Handling**: New configuration options for handling Shopware's additional address fields
- `handlingAddressAdditionalField1` - Configure how to handle Address Additional Field 1
- `handlingAddressAdditionalField2` - Configure how to handle Address Additional Field 2
- Options: Ignore, Add to Mondu Address Line 1, or Add to Mondu Address Line 2
- Applies to both billing and shipping addresses
- New configuration methods: `getHandlingAddressAdditionalField1()` and `getHandlingAddressAdditionalField2()`
- **Payment State Handling**: Fixed transaction state handling when "Authorized" is configured as the payment state
- Previously, the configured "Authorized" state was not properly applied after successful order placement
- Now correctly calls `transactionStateHandler->authorize()` when "Authorized" is selected in plugin configuration
- Ensures proper order workflow for merchants using authorization-based payment flows
### Changed
- **Refactored Resource Path Handling**: Replaced hardcoded paths with Dependency Injection
- Added `$pluginPath` parameter to `MediaProvider` constructor
- Introduced `mondu.plugin.path` parameter in `services.xml`
- Resource paths now use `%kernel.project_dir%` Symfony parameter
- Improved testability and configurability
- Updated `updatePaymentMethodImage()` to use specific logos per payment method with fallback to default logo
### Fixed
- **Critical Bug**: Fixed `TypeError` during plugin uninstallation
- Changed `MonduClient::$key` property from `string` to nullable `?string`
- Resolved "Cannot assign null to property MonduClient::$key of type string" error
- Plugin can now be safely uninstalled without errors
### Technical Improvements
- Better adherence to Shopware 6 best practices for resource management
- Eliminated use of `dirname(__DIR__)` in favor of dependency-injected paths
- Enhanced code maintainability and readability
- All paths are now configurable through Symfony DI container
## New Features
- **Differentiated Transaction States**: Declined → `Failed`, Cancelled → `Cancelled` (previously both were `Failed`)
- **Flow Builder Translations**: Added proper German/English translations for all Mondu events
---
## Breaking Changes:
- **new naming of Mondu payment methods**
Now you have to include Mondu's Privacy Information for Buyers in your terms & conditions section. Please check this site for more details: https://docs.mondu.ai/v0.7/docs/mondu-data-processing
---
## Bug Fixes
### Critical Fixes
1. **Sales Channel Configuration**
- Fixed: Plugin now respects per-sales-channel settings instead of global configuration
- Impact: Multi-tenant setups work correctly
2. **Checkout Decline/Cancellation**
- Fixed: Order State no longer cancelled when user declines/cancels on checkout
- Impact: Users can retry payment, better checkout experience
3. **Skip All Validations Mode**
- Fixed: "Invoice number required" error
- Impact: Works with or without invoice document
---
## ? Behavior Changes
| Scenario | Transaction State | Order State | User |
|----------|-------------------|-------------|------|
| Checkout Decline | Failed | Open | Stays on checkout |
| Checkout Cancellation | Cancelled | Open | Stays on checkout |
| Webhook Decline | Failed | Cancelled* | Order cancelled |
| Webhook Cancellation | Cancelled | Cancelled* | Order cancelled |
\* Only if "Allow Mondu transition order state" enabled
Implement PayNow payment method
Implementation of Shopware 6.7 support
Implementation of the PayNow payment method
Fix the issue when the order status is not updated after the status is set from PENDING to CONFIRMED
This update fixes the error during the “back to the merchant” request.
Bugfixes and improvements.
Bugfixes and improvements
Bugfixes and improvements
Fix for Mondu orders can no longer be loaded if a product referenced
Added Order Transaction State configuration
Added Order Transaction State configuration
Changed Order Status to Paid after placing an order
Added support for Shopware 6.5.x
Added support for hosted checkout
Bug Fixes related to invoices
Added multi-currency support
Fixed incorrect document URL in invoice payload
- Improved performance on the CheckoutController
- Removed unnecessary development environment references
- Changed commands to use shared services instead of HTTP Requests
- Minor codebase improvements
- Dutch localization
- Fixed table collation issue
- New logos
- Fixed issue with deinstallation
- Stability improvements
- Fixed sub-shop API Validation
- Fixed translations
- Fixed Sales Channel Configuration issues
- Added installments payment methods
- Fixed plugin conflicts and order ID reservation
- Added a configuration flag to skip order state validation
- Multiple sales channels compatibility
- Added cancel credit note button to cancel credit notes on the Mondu API
- Added button to test API credentials
Sepa SDD payment method added. (#13) * Sepa SDD payment method added. * typo fix * compiled assets