Install

Works with Drupal: ^10.3 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 12.38 KB
MD5: 8e921b0f19a41a0876f5fe8a441a49c1
SHA-1: 84d2d4012dd9379d62d0dd5af155c412297c8582
SHA-256: 5d34fce4b49036181a659ad6f0ec22d5f4fbe38b586043d194898cced7e215d9
Download zip 16.17 KB
MD5: 42e4d419fe5f35c96e46cbe267549edd
SHA-1: cf5849abebe2f265d3af37a65cd123470112aed0
SHA-256: ecaf631be78877edebc22d1e361dbf8f6087afb43ae848c47ea05e1c460b253d

Release notes

## [2.0.0-beta1] - 2026-05-29

This is a major release that targets Drupal Commerce 3.x. It is **not**
backwards compatible with Commerce 2.x.

### Added
- Dependency injection for the payment gateway plugin and the offsite
redirect form (`http_client`, `logger.channel.cm_commerce`, entity type
manager), replacing all static `\Drupal::` service calls.
- A `logger.channel.cm_commerce` logger channel (`cm_commerce.services.yml`).

### Changed
- **Support Drupal Commerce 3.x** (`drupal/commerce: ^3`); the gateway plugin
constructor was updated for the Commerce 3.x property-injection pattern.
- Raised the core requirement to Drupal 10.3 or 11
(`core_version_requirement: ^10.3 || ^11`).
- The CM order amount is now calculated as a typed integer (minor units)
instead of relying on string/integer coercion.
- The offsite form now resolves the billing profile via
`OrderInterface::getBillingProfile()`.

### Removed
- **Dropped support for Drupal Commerce 2.x.**
- Removed the unused/broken `getActiveEndpointUrl()` method.

### Fixed
- Caught `GuzzleException` is now imported, so request failures in `onReturn()`
and `onNotify()` no longer cause a fatal error.
- Failed CM API calls (`pushShopper()` / `pushOrder()`) now throw a
`PaymentGatewayException` instead of returning `NULL`, preventing a fatal
error further down the checkout flow.
- The `$configuration` variable is resolved correctly inside `pushOrder()` and
`pushShopper()`.
- `processFeedback()` guards against a missing order and only writes the
optional `field_cm_order_id` / `field_cm_payment_id` fields when they exist.
- The config schema key now matches the plugin id (`cm`) and includes all
stored settings.

### Security
- The gateway configuration (including credentials) is no longer written to the
log on notifications.
- The billing address (personal data) is only logged when debugging is enabled.

[2.0.0-beta1]: https://www.drupal.org/project/cm_commerce/releases/2.0.0-beta1

Created by: immoreel
Created on: 29 May 2026 at 11:40 UTC
Last updated: 29 May 2026 at 11:40 UTC
Bug fixes

Other releases