Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

comgate

1 sites No security coverage
View on drupal.org

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
10 months ago
Release cadence
Stability
0% stable

Releases

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