PHPackages                             ruudvdd/ogm - 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. ruudvdd/ogm

ActiveLibrary

ruudvdd/ogm
===========

Package to validate and generate Belgian OGMs

0.2.0(8y ago)213.5k↓27.3%MITPHPPHP &gt;=5.6

Since Jun 9Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

OGM
===

[](#ogm)

Library to generate and validate Belgian OGM's.

An OGM is a Belgian format used to automatically identify payments. The typical structure of an OGM is `+++090/9337/55493+++` or `***090/9337/55493***`. In total the OGM contains 12 digits. A group of 3, 4 and 5 digits separated by /, and starting and ending with '+++' or '\*\*\*'. The last 2 digits of a valid OGM is the remainder of the euclidean division of the first 10 digits of the OGM and 97. When the remainder is 0, the last 2 digits are 97. [Wikipedia (Dutch)](https://nl.wikipedia.org/wiki/Gestructureerde_mededeling)

Setup / installation
====================

[](#setup--installation)

```
$ composer require ruudvdd/ogm
```

Usage
=====

[](#usage)

Generate
--------

[](#generate)

```
$generator = new \Ruudvdd\OGM\Generator();

// Plain number (default)
$generator->generate(false);

// Formatted
$generator->generate(true);

// Choose the first x digits (max 10)
$generator->generate(false, 1234);
```

Validate
--------

[](#validate)

```
$validator = new \Ruudvdd\OGM\Validator();

// Validate a formatted OGM
$validator->isValid('+++090/9337/55493+++'); // true

// Validate a plain number (12 digits)
$validator->digitsAreValid('090933755493');
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~8 days

Total

2

Last Release

3248d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.6.

0.2.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/9050966682584ca520828c7702780b24f9b331d3d5c6f38b1632ef7ab4c38fc2?d=identicon)[ruudvdd](/maintainers/ruudvdd)

---

Top Contributors

[![ruudvdd](https://avatars.githubusercontent.com/u/4902556?v=4)](https://github.com/ruudvdd "ruudvdd (1 commits)")

---

Tags

BankogmBelgiumBelgiëOverschrijvingGestructureerdMededeling

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ruudvdd-ogm/health.svg)

```
[![Health](https://phpackages.com/badges/ruudvdd-ogm/health.svg)](https://phpackages.com/packages/ruudvdd-ogm)
```

###  Alternatives

[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k11.4M25](/packages/azuyalabs-yasumi)[shetabit/payment

Laravel Payment Gateway Integration Package

944330.1k5](/packages/shetabit-payment)[vinelab/neoeloquent

Laravel wrapper for the Neo4j graph database REST interface

65393.1k1](/packages/vinelab-neoeloquent)[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[larabook/gateway

A Laravel package for connecting to all Iraninan payment gateways

24553.7k](/packages/larabook-gateway)[ondrakoupil/csob-eapi-paygate

PHP Client library for easy integration of ČSOB payment gateway

44416.9k3](/packages/ondrakoupil-csob-eapi-paygate)

PHPackages © 2026

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