PHPackages                             antonkomarev/php-funpay-sms-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. antonkomarev/php-funpay-sms-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

antonkomarev/php-funpay-sms-parser
==================================

FunPay Transaction Verification SMS Parser written for contrived emulator.

1.0.1(7y ago)27MITPHPPHP ^7.1

Since Jul 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/antonkomarev/php-funpay-sms-parser)[ Packagist](https://packagist.org/packages/antonkomarev/php-funpay-sms-parser)[ Docs](https://github.com/antonkomarev/php-funpay-sms-parser)[ RSS](/packages/antonkomarev-php-funpay-sms-parser/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

PHP FunPay SMS Parser
=====================

[](#php-funpay-sms-parser)

[![ak-php-funpay-sms-parser](https://user-images.githubusercontent.com/1849174/42195292-ec2e0330-7e80-11e8-9069-6046946ccb25.png)](https://user-images.githubusercontent.com/1849174/42195292-ec2e0330-7e80-11e8-9069-6046946ccb25.png)

[![Releases](https://camo.githubusercontent.com/f8fe97955688638a48ecd34dc8ed9e6661274e9bf75a199e2f331f4cf4787e02/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616e746f6e6b6f6d617265762f7068702d66756e7061792d736d732d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://github.com/antonkomarev/php-funpay-sms-parser/releases)[![Build Status](https://camo.githubusercontent.com/555b221e56f94f056ef4d6d828840f2c402f4c529f80e00ec98b7c0440f80a84/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f616e746f6e6b6f6d617265762f7068702d66756e7061792d736d732d7061727365722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/antonkomarev/php-funpay-sms-parser)[![StyleCI](https://camo.githubusercontent.com/ec600d0879bcc0a2c477aca3ea7c261d4542fc0061d993045007434bc98216b8/68747470733a2f2f7374796c6563692e696f2f7265706f732f3133393531373135372f736869656c64)](https://styleci.io/repos/139517157)[![License](https://camo.githubusercontent.com/693cf3620f304c730c5b92eed134679c870b3b05e8b0fcea28fe56210a5ac7ec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616e746f6e6b6f6d617265762f7068702d66756e7061792d736d732d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://github.com/antonkomarev/php-funpay-sms-parser/blob/master/LICENSE)

Introduction
------------

[](#introduction)

PHP FunPay SMS Parser library allows to parse SMS messages from transaction confirmation gateway.

This package was developed as a part of an FunPay interview, I'm not affiliated with FunPay in any way.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Install as composer package](#install-as-package)
    - [Standalone](#standalone)
- [Demo](#demo)
- [Usage](#usage)
    - [Instantiate Parser](#instantiate-parser)
    - [Available Methods](#available-methods)
    - [Exceptions](#exceptions)
- [Testing](#testing)
- [Author](#author)
- [License](#license)

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

[](#installation)

### Install as package

[](#install-as-package)

Pull in the package through Composer in your application:

```
$ composer install antonkomarev/php-funpay-sms-parser
```

### Standalone

[](#standalone)

Clone or download project from [PHP FunPay SMS Parser git repository](https://github.com/antonkomarev/php-funpay-sms-parser).

```
$ git clone git@github.com:antonkomarev/php-funpay-sms-parser.git && cd ./php-funpay-sms-parser
```

Generate class autoload file and install PHPUnit.

```
$ composer install
```

Demo
----

[](#demo)

Demo script could be executed using PHP CLI:

```
$ php public/demo.php
```

You could experiment with `$message` variable value.

More examples could be found in `tests/ParserTest.php` file.

Usage
-----

[](#usage)

### Instantiate Parser

[](#instantiate-parser)

```
$message = '
    Пароль: 0823
    Спишется 100,85р.
    Перевод на счет 410017080996934
';

$parsedMessage = new \AK\FunPay\SmsParser\Parser($message);
```

### Available Methods

[](#available-methods)

#### Get Yandex.Money account number

[](#get-yandexmoney-account-number)

```
$parsedMessage->account(): string
```

#### Get transaction money amount

[](#get-transaction-money-amount)

```
$parsedMessage->moneyAmount(): float
```

#### Get confirmation pin-code

[](#get-confirmation-pin-code)

```
$parsedMessage->pin(): string
```

### Exceptions

[](#exceptions)

- `ParserException` (abstract)
- `MoneyAmountNotFound`
- `PinNotFound`
- `YandexAccountNotFound`
- `YandexAccountInvalid`

Testing
-------

[](#testing)

Run the tests with:

```
$ vendor/bin/phpunit
```

Author
------

[](#author)

[![@antonkomarev](https://avatars.githubusercontent.com/u/1849174?s=110)
Anton Komarev](https://github.com/antonkomarev)License
-------

[](#license)

- `PHP FunPay SMS Parser` package is open-sourced software licensed under the [MIT license](LICENSE) by [Anton Komarev](https://komarev.com).
- `Decomposition` image licensed under [Creative Commons 3.0](https://creativecommons.org/licenses/by/3.0/us/) by Arthur Shlain.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~0 days

Total

2

Last Release

2867d ago

### Community

Maintainers

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

---

Top Contributors

[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (10 commits)")

---

Tags

emulatorparserphpsmstransactionverificationparsersmsverificationpintransaction

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/antonkomarev-php-funpay-sms-parser/health.svg)

```
[![Health](https://phpackages.com/badges/antonkomarev-php-funpay-sms-parser/health.svg)](https://phpackages.com/packages/antonkomarev-php-funpay-sms-parser)
```

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M729](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M702](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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