2017 © Pedro Peláez
 

library php-funpay-sms-parser

FunPay Transaction Verification SMS Parser written for contrived emulator.

image

antonkomarev/php-funpay-sms-parser

FunPay Transaction Verification SMS Parser written for contrived emulator.

  • Wednesday, July 4, 2018
  • by antonkomarev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

PHP FunPay SMS Parser

ak-php-funpay-sms-parser, (*1)

Releases Build Status StyleCI License , (*2)

Introduction

PHP FunPay SMS Parser library allows to parse SMS messages from transaction confirmation gateway., (*3)

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

Contents

Installation

Install as package

Pull in the package through Composer in your application:, (*5)

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

Standalone

Clone or download project from PHP FunPay SMS Parser git repository., (*6)

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

Generate class autoload file and install PHPUnit., (*7)

$ composer install

Demo

Demo script could be executed using PHP CLI:, (*8)

$ php public/demo.php

You could experiment with $message variable value., (*9)

More examples could be found in tests/ParserTest.php file., (*10)

Usage

Instantiate Parser

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

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

Available Methods

Get Yandex.Money account number

$parsedMessage->account(): string

Get transaction money amount

$parsedMessage->moneyAmount(): float

Get confirmation pin-code

$parsedMessage->pin(): string

Exceptions

  • ParserException (abstract)
  • MoneyAmountNotFound
  • PinNotFound
  • YandexAccountNotFound
  • YandexAccountInvalid

Testing

Run the tests with:, (*11)

$ vendor/bin/phpunit

Author

@antonkomarev
Anton Komarev

License

The Versions

04/07 2018

dev-feature/message-entity

dev-feature/message-entity https://github.com/antonkomarev/php-funpay-sms-parser

FunPay Transaction Verification SMS Parser written for contrived emulator.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

parser sms verification pin transaction

04/07 2018

dev-master

9999999-dev https://github.com/antonkomarev/php-funpay-sms-parser

FunPay Transaction Verification SMS Parser written for contrived emulator.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

parser sms verification pin transaction

04/07 2018

1.0.1

1.0.1.0 https://github.com/antonkomarev/php-funpay-sms-parser

FunPay Transaction Verification SMS Parser written for contrived emulator.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

parser sms verification pin transaction

04/07 2018

1.0.0

1.0.0.0 https://github.com/antonkomarev/php-funpay-sms-parser

FunPay Transaction Verification SMS Parser written for contrived emulator.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

parser sms verification pin transaction