ruudvdd/ogm 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ruudvdd/ogm

最新稳定版本:0.2.0

Composer 安装命令:

composer require ruudvdd/ogm

包简介

Package to validate and generate Belgian OGMs

README 文档

README

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)

Setup / installation

$ composer require ruudvdd/ogm

Usage

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

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

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

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

统计信息

  • 总下载量: 12.92k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-04