Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Comgate

No security coverage Maintenance fixes only 1 sites

This module provides a simple integration with the Czech payment gateway Comgate, allowing for the creation of payments, handling of returns, and reading of payment statuses. It can be used independently of Drupal Commerce.

Basic integration of a Czech payment gateway Comgate.

This module provides a simple API that allows calling Comgate methods for creating payments, handling returns from the gateway and reading payment statuses. Basically this is just a Comgate PHP SDK wrapped in a simple Drupal package (with the author's blessing).

Please note that this module does not depend on Drupal Commerce intentionally and can be used without it.

Features

  • API for payment creation
  • Controller for secure payment status handling
  • Simple configuration using settings.php
  • Necessary Drupal permissions only

Post-Installation

After enabling the module, you should put following block to your settings.php and make sure to grant the "use comgate" permission.

/**
 * Comgate payments integration.
 */
if (getenv('COMGATE_MERCHANT')) {
  $settings['comgate'] = [
    'merchant' => getenv('COMGATE_MERCHANT'),
    'secret' => getenv('COMGATE_SECRET'),
    'test' => getenv('COMGATE_TEST'),
  ];
}

*You will get the merchant and secret values in your Comgate account.

Example usage

   // Inject the service.
   private ComgateService $comgateService = ...;

   // Prepare a payment.
   $comgate_payment = \Drupal\comgate\Dto\Payment::create()
      ->withPrice(200.00)
      ->withCurrency('CZK')
      ->withMethod('ALL')
      ->withCountry('ALL')
      ->withLabel('Invoice 1234')
      ->withReferenceId('1234')
      ->withEmail('[email protected]');

    // Contact the gateway.
    $redirect = $comgateService->createPayment($comgate_payment);

Maintenance and development

The module is considered feature complete and supported by the author as it is being operated in production. Security is our main concern with this module.
In future we would like to remove the Comgate SDK code and use it as Composer dependency instead (contributions are welcome).

Ask your assistant about Comgate

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Feb 2024
Latest release
3 weeks ago
Releases (12 mo)
1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.2.x-dev Dev 9–10 Sep 24, 2026
1.1.x-dev Dev 9–10 May 26, 2025
1.0.0-beta1 Pre-release 9 Feb 26, 2024