Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Comgate

1 sites No security coverage
View on drupal.org

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).

Activity

Total releases
1
First release
May 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
1.1.x-dev Dev May 26, 2025