Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

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

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
1
Tracked since
May 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.1.x-dev Dev 9–10 May 26, 2025