Skip to content

Add Mir card validation support #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

TheDrunkenBear
Copy link
Contributor

@TheDrunkenBear TheDrunkenBear commented Apr 2, 2025

This PR introduces validation for Mir cards (Russian payment system) to the validators library.

Key Changes:

  • Added mir() validator function with BIN checks (2200-2204)
  • Ensures compliance with Luhn algorithm
  • Includes length validation (16 digits standard)
  • Added unit tests for valid/invalid cases

Why This Matters:

  • Mir is a nationally critical payment system (used in Russia and neighboring countries)
  • Required for apps processing payments in RUB
  • Maintains parity with other card validators (Visa, Mastercard, Unionpay etc.)

@TheDrunkenBear
Copy link
Contributor Author

cmd:

python -m ruff check --fix .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant