Goal
Add support for Anor Bank notification bot messages by implementing a new AnorbankDriver, alongside the existing ClickDriver, PaymeDriver, and UzumDriver.
This is a great first contribution — the pattern is well established, the driver base class does most of the work, and you only need to provide a few regex patterns plus tests.
Why
CONTRIBUTING.md lists new bank drivers (Anor, Asaka, TBC, Hamkorbank, Davr) as the highest-impact contribution right now. Each new driver lets more Uzbek merchants use the package without writing custom parsing.
What to do
-
Create the driver at src/Drivers/AnorbankDriver.php, extending AbstractRegexDriver. Look at src/Drivers/ClickDriver.php for a minimal reference — you'll override:
incomingMarkers(): array — Uzbek/Russian phrases that indicate incoming transfer (e.g. hisobingizga tushdi, qabul qilindi, зачислен, поступил).
amountPatterns(): array — regexes that capture the amount, with currency suffix (so'm, сум, UZS).
transactionPatterns(): array — regexes for transaction/cheque IDs if Anor Bank includes them.
-
Register the driver in config/algorix-pay.php under the drivers key. Mirror the existing entries — add an enabled flag and a default source (the bot's Telegram username, lower-case, no @). Also expose env vars (ALGORIX_ANOR_ENABLED, ALGORIX_ANOR_SOURCE).
-
Add tests at tests/Unit/AnorbankDriverTest.php with at minimum:
- one real incoming-transfer message that parses correctly (amount in tiyin, currency, optional
transactionId, optional sender/receiver card masks),
- one outgoing transfer message that must return
null,
- one unrelated message (login OTP, balance check, marketing) that must return
null.
-
Update README.md — add ALGORIX_ANOR_* to the env table and mention Anor Bank in the supported-banks list.
Helpful pointers
- Money is stored in tiyin (
1 so'm = 100 tiyin). AbstractRegexDriver::amountToTiyin() already handles thousand separators and decimals — you just need to capture the digit group.
looksLikeOutgoing() in the base class already filters common outgoing markers (yechildi, списан, etc.). Don't duplicate that logic.
declare(strict_types=1);, final class, and constructor property promotion are required per CONTRIBUTING.md.
Need real message samples?
If you don't have access to Anor Bank notifications yourself, that's fine — open a comment on this issue and we'll coordinate. Anonymized samples (mask card numbers, amounts can be real) are extremely welcome on their own, even without code.
Definition of done
Questions? Just drop a comment — happy to help you get unblocked.
Goal
Add support for Anor Bank notification bot messages by implementing a new
AnorbankDriver, alongside the existingClickDriver,PaymeDriver, andUzumDriver.This is a great first contribution — the pattern is well established, the driver base class does most of the work, and you only need to provide a few regex patterns plus tests.
Why
CONTRIBUTING.mdlists new bank drivers (Anor, Asaka, TBC, Hamkorbank, Davr) as the highest-impact contribution right now. Each new driver lets more Uzbek merchants use the package without writing custom parsing.What to do
Create the driver at
src/Drivers/AnorbankDriver.php, extendingAbstractRegexDriver. Look atsrc/Drivers/ClickDriver.phpfor a minimal reference — you'll override:incomingMarkers(): array— Uzbek/Russian phrases that indicate incoming transfer (e.g.hisobingizga tushdi,qabul qilindi,зачислен,поступил).amountPatterns(): array— regexes that capture the amount, with currency suffix (so'm,сум,UZS).transactionPatterns(): array— regexes for transaction/cheque IDs if Anor Bank includes them.Register the driver in
config/algorix-pay.phpunder thedriverskey. Mirror the existing entries — add anenabledflag and a defaultsource(the bot's Telegram username, lower-case, no@). Also expose env vars (ALGORIX_ANOR_ENABLED,ALGORIX_ANOR_SOURCE).Add tests at
tests/Unit/AnorbankDriverTest.phpwith at minimum:transactionId, optional sender/receiver card masks),null,null.Update
README.md— addALGORIX_ANOR_*to the env table and mention Anor Bank in the supported-banks list.Helpful pointers
1 so'm = 100 tiyin).AbstractRegexDriver::amountToTiyin()already handles thousand separators and decimals — you just need to capture the digit group.looksLikeOutgoing()in the base class already filters common outgoing markers (yechildi,списан, etc.). Don't duplicate that logic.declare(strict_types=1);,final class, and constructor property promotion are required perCONTRIBUTING.md.Need real message samples?
If you don't have access to Anor Bank notifications yourself, that's fine — open a comment on this issue and we'll coordinate. Anonymized samples (mask card numbers, amounts can be real) are extremely welcome on their own, even without code.
Definition of done
src/Drivers/AnorbankDriver.phpexists and extendsAbstractRegexDriver.config/algorix-pay.php.tests/Unit/AnorbankDriverTest.phppasses locally (vendor/bin/phpunit --testdox).Questions? Just drop a comment — happy to help you get unblocked.