PHPackages                             cool-studio/globalpayments-magento2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. cool-studio/globalpayments-magento2

ActiveMagento2-module[Payment Processing](/categories/payments)

cool-studio/globalpayments-magento2
===================================

Demonstrates integration with payment gateway from GlobalPayments, modified for PHP8.3

0129[8 PRs](https://github.com/cool-studio/globalpayments-magento2/pulls)PHP

Since Sep 12Pushed 1y ago2 watchersCompare

[ Source](https://github.com/cool-studio/globalpayments-magento2)[ Packagist](https://packagist.org/packages/cool-studio/globalpayments-magento2)[ RSS](/packages/cool-studio-globalpayments-magento2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (9)Used By (0)

Cool Studio Modification
------------------------

[](#cool-studio-modification)

After a conversation with GlobalPayments, they did not have a timeline for supporting PHP8.3, but claimed that it should work just fine, even though you can't install it becasue of the dependency check in Composer.

Synopsis
--------

[](#synopsis)

An extension to add integration with Payment Gateway. This payment method can be restricted to work only with specific Shipping method.

Motivation
----------

[](#motivation)

This is one of a collection of examples to demonstrate the features of Magento 2. The intent of this sample is to demonstrate how to create own Payment Gateway integration

Technical feature
-----------------

[](#technical-feature)

### Module configuration

[](#module-configuration)

1. Package details [composer.json](composer.json).
2. Module configuration details (sequence) in [module.xml](etc/module.xml).
3. Module configuration available through Stores-&gt;Configuration [system.xml](etc/adminhtml/system.xml)

Payment gateway module depends on `Sales`, `Payment` and `Checkout` Magento modules. For more module configuration details, please look through [module development docs](http://devdocs.magento.com/guides/v2.0/extension-dev-guide/module-load-order.html).

### Gateway configuration

[](#gateway-configuration)

On the next step, we might specify gateway domain configuration in [config.xml](etc/config.xml).

##### Let's look into configuration attributes:

[](#lets-look-into-configuration-attributes)

- `debug` enables debug mode by default, e.g log for request/response
- `active` is payment active by default
- `model` `Payment Method Facade` used for integration with `Sales` and `Checkout` modules
- `merchant_gateway_key` encrypted merchant credential
- `order_status` default order status
- `payment_action` default action of payment
- `title` default title for a payment method
- `currency` supported currency
- `can_authorize` whether payment method supports authorization
- `can_capture` whether payment method supports capture
- `can_void` whether payment method supports void
- `can_use_checkout` checkout availability
- `is_gateway` is an integration with gateway
- `sort_order` payment method order position on checkout/system configuration pages
- `debugReplaceKeys` request/response fields, which will be masked in log
- `paymentInfoKeys` transaction request/response fields displayed on payment information block
- `privateInfoKeys` paymentInfoKeys fields which should not be displayed in customer payment information block

### Dependency Injection configuration

[](#dependency-injection-configuration)

> To get more details about dependency injection configuration in Magento 2, please see [DI docs](http://devdocs.magento.com/guides/v2.0/extension-dev-guide/depend-inj.html).

In a case of Payment Gateway, DI configuration is used to define pools of `Gateway Commands` with related infrastructure and to configure `Payment Method Facade` (used by `Sales` and `Checkout` modules to perform commands)

Payment Method Facade configuration:

```

        \GlobalPayments\PaymentGateway\Model\Ui\ConfigProvider::CODE
        Magento\Payment\Block\Form
        GlobalPayments\PaymentGateway\Block\Info
        GlobalPaymentsPaymentGatewayValueHandlerPool
        GlobalPaymentsPaymentGatewayCommandPool

```

- `code` Payment Method code
- `formBlockType` Block class name, responsible for Payment Gateway Form rendering on a checkout. Since Opepage Checkout uses knockout.js for rendering, this renderer is used only during Checkout process from Admin panel.
- `infoBlockType` Block class name, responsible for Transaction/Payment Information details rendering in Order block.
- `valueHandlerPool` Value handler pool used for queries to configuration
- `commandPool` Pool of Payment Gateway commands

#### Pools

[](#pools)

> ! All `Payment\Gateway` provided pools implementations use lazy loading for components, i.e configured with component type name instead of component object

##### Value Handlers

[](#value-handlers)

There should be at least one Value Handler with `default` key provided for ValueHandlerPool.

```
!-- Value handlers infrastructure -->

            GlobalPaymentsPaymentGatewayConfigValueHandler

        GlobalPaymentsPaymentGatewayConfig

```

##### Commands

[](#commands)

All gateway commands should be added to CommandPool instance

```

            GlobalPaymentsPaymentGatewayAuthorizeCommand
            GlobalPaymentsPaymentGatewayCaptureCommand
            GlobalPaymentsPaymentGatewayVoidCommand

```

Example of Authorization command configuration:

```

        GlobalPaymentsPaymentGatewayAuthorizationRequest
        GlobalPaymentsPaymentGatewayResponseHandlerComposite
        GlobalPayments\PaymentGateway\Gateway\Http\TransferFactory
        GlobalPayments\PaymentGateway\Gateway\Http\Client\ClientMock

            GlobalPayments\PaymentGateway\Gateway\Request\AuthorizationRequest
            GlobalPayments\PaymentGateway\Gateway\Request\MockDataRequest

        GlobalPaymentsPaymentGatewayConfig

            GlobalPayments\PaymentGateway\Gateway\Response\TxnIdHandler
            GlobalPayments\PaymentGateway\Gateway\Response\FraudHandler

```

- `GlobalPaymentsPaymentGatewayAuthorizeCommand` - instance of GatewayCommand provided by `Payment\Gateway` configured with request builders, response handlers and transfer client
- `GlobalPaymentsPaymentGatewayAuthorizationRequest` - Composite of request parts used for Authorization
- `GlobalPaymentsPaymentGatewayResponseHandlerComposite` - Composite\\List of response handlers.

Installation
------------

[](#installation)

This module is intended to be installed using composer. After including this component and enabling it, you can verify it is installed by going the backend at: STORES -&gt; Configuration -&gt; ADVANCED/Advanced -&gt; Disable Modules Output Once there check that the module name shows up in the list to confirm that it was installed correctly.

Tests
-----

[](#tests)

Unit tests could be found in the [Test/Unit](Test/Unit) directory.

Contributors
------------

[](#contributors)

Magento Core team

License
-------

[](#license)

[Open Source License](LICENSE.txt)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1fe93f3af24eb2d61cebec6c4cb2921f42176b38038aeaa8841179e79c759cc?d=identicon)[JordanBCX](/maintainers/JordanBCX)

---

Top Contributors

[![JordanBCX](https://avatars.githubusercontent.com/u/9353117?v=4)](https://github.com/JordanBCX "JordanBCX (3 commits)")

### Embed Badge

![Health badge](/badges/cool-studio-globalpayments-magento2/health.svg)

```
[![Health](https://phpackages.com/badges/cool-studio-globalpayments-magento2/health.svg)](https://phpackages.com/packages/cool-studio-globalpayments-magento2)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
