PHPackages                             vamajordy/payment-gateway-logger - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. vamajordy/payment-gateway-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

vamajordy/payment-gateway-logger
================================

Logging capabilities for Omnipay gateways

1.2(5y ago)0201MITPHP

Since Apr 16Pushed 5y agoCompare

[ Source](https://github.com/vamajordy/payment-gateway-logger)[ Packagist](https://packagist.org/packages/vamajordy/payment-gateway-logger)[ RSS](/packages/vamajordy-payment-gateway-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (15)Used By (1)

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

[](#installation)

Package is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "vimeo/payment-gateway-logger": "^1.0"
    }
}
```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

Usage
-----

[](#usage)

Logging capabilities for Omnipay gateways via an `EventSubscriberInterface` subscriber for Omnipay payment gateway-specific events. These events are dispatched via the HTTP client's `EventDispatcherInterface`.

- The omnipay gateway needs to be updated to emit any of the `RequestEvent`, `ResponseEvent` or `ErrorEvent` objects. For example in the gateway's `sendData()` methods we can do:

    ```
    $event_dispatcher = $this->httpClient->getEventDispatcher();
    $event_dispatcher->dispatch(Constants::OMNIPAY_REQUEST_BEFORE_SEND, new RequestEvent($request));
    ```

    Logging Errors and Responses events can be emitted like so

    ```
    $event_dispatcher->dispatch(Constants::OMNIPAY_REQUEST_ERROR new ErrorEvent($exception, $request));
    $event_dispatcher->dispatch(Constants::OMNIPAY_RESPONSE_SUCCESS, new ResponseEvent($response));
    ```

`OmnipayGatewayRequestSubscriber.php` takes in a logger of type `LoggerInterface` which will listen to and log these events.

The subscriber can be set up to listen to these events when instantiating the HTTP client for the gateway like so:

```
$httpClient = new GuzzleClient();
$gateway = Omnipay::create('Vindicia', $httpClient);
$eventDispatcher = $httpClient->getEventDispatcher();
$eventDispatcher->addSubscriber(new OmnipayGatewayRequestSubscriber($gateway_name, new LoggerClassThatImplementsPSRInterface()));
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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.

###  Release Activity

Cadence

Every ~115 days

Recently: every ~169 days

Total

7

Last Release

1888d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/635fa0c467d6c98a2d8145378d4f5cb98c1ee3a22fa25e7529197400630b721c?d=identicon)[Yellow Images](/maintainers/Yellow%20Images)

---

Top Contributors

[![jcmanzo](https://avatars.githubusercontent.com/u/3589097?v=4)](https://github.com/jcmanzo "jcmanzo (4 commits)")[![muglug](https://avatars.githubusercontent.com/u/2292638?v=4)](https://github.com/muglug "muglug (3 commits)")

### Embed Badge

![Health badge](/badges/vamajordy-payment-gateway-logger/health.svg)

```
[![Health](https://phpackages.com/badges/vamajordy-payment-gateway-logger/health.svg)](https://phpackages.com/packages/vamajordy-payment-gateway-logger)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[authbucket/oauth2-php

The standard compliant OAuth2.0 library based on the Symfony Components

82107.6k4](/packages/authbucket-oauth2-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2818.1k4](/packages/markrogoyski-simplelog-php)

PHPackages © 2026

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