Add iran-pay 0.1.0 + parsitext 0.1.1 (tantivy, IBAN gen)#6
Merged
Conversation
iran-pay (new):
Unified async SDK for six Iranian payment gateways behind one
strongly-typed Gateway trait — ZarinPal, IDPay, NextPay, Pay.ir, Zibal,
Vandar. Each driver targets a specific upstream API version; URLs and
field names are sourced from the providers' published documentation
(verified May 2026 — see VERSIONING.md for the upgrade policy).
Highlights:
* Trait-level API, dyn-safe, runtime-pluggable across providers.
* Toman/Rial Amount type that prevents the unit-mixup bug that ships
to production at every Iranian e-commerce merchant.
* Sandbox per provider; .with_api_base() to redirect at wiremock for
tests; .with_client() for custom timeouts/proxies.
* MockGateway (no I/O) + scriptable Behavior for unit-testing your
own checkout code.
* security:: helpers — constant_time_eq, verify_hmac_sha256 (pure
safe-Rust SHA-256 + HMAC implementation, RFC test-vector-checked),
check_amount, check_authority_format.
* validators feature re-exports parsitext::validators (national_id,
sheba, bank_card with bank lookup, phone with operator detection,
landline with province detection, postal_code, car_plate).
* tracing::instrument on every API call.
* Per-feature Cargo gates so binaries can ship only the providers
they actually use.
* 53 tests (lib + integration + security), criterion benches, full
doc coverage, four runnable examples.
* Per-crate CI workflow with seven feature-combo build matrices plus
cargo package.
parsitext 0.1.1:
* NEW: validators::sheba::generate(bank_code, account_type, account)
— generates a fully-checksummed Iranian IBAN (matches the
iranianbank crate's Iban::new feature; we previously only
validated, not generated).
* NEW: tantivy feature with PersianTokenizer + per-token stem filter
+ optional pre-normalization, ZWNJ-aware so compound words like
"میروم" stay intact in the search index.
jalali-calendar 0.1.1:
* Re-publish at the new workspace version; no functional changes.
* Audited against persian-rs (crates.io); we already strictly exceed
its surface (date conversion + 2 validators).
Workspace:
* Workspace package version bumped to 0.1.1.
* iran-pay overrides version to 0.1.0 (initial release).
* iran-pay depends on parsitext = "0.1.1" so its CI cargo-package
step needs parsitext 0.1.1 published first.
1b52099 to
cd58ff3
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
r21gh
added a commit
that referenced
this pull request
May 5, 2026
Two fixes for the failing run on PR #6: 1. Rust 1.95's clippy added `clippy::manual_is_multiple_of` (`% N == 0`). The workspace MSRV is now 1.88 which has the method on unsigned types, so switch the four affected sites to `.is_multiple_of(N)`: - parsitext: bank_card Luhn checksum, ISBN-10 mod-11, ISBN-13 mod-10 (also flipped the ISBN `sum` from i32 to u32 since the method is not available on signed integers). - iran-pay: amount thousand-separator stride, hex-string parity check. 2. iran-pay's `cargo package` step in CI failed because the path-dep on parsitext required "^0.1.1", but only 0.1.0 is on crates.io. iran-pay only uses APIs that exist in 0.1.0, so loosen the requirement to "0.1" — the path build still resolves locally to 0.1.1, and the published-package verify resolves it to whatever 0.1.x is on crates.io.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iran-pay (new):
Unified async SDK for six Iranian payment gateways behind one
strongly-typed Gateway trait — ZarinPal, IDPay, NextPay, Pay.ir, Zibal,
Vandar. Each driver targets a specific upstream API version; URLs and
field names are sourced from the providers' published documentation
(verified May 2026 — see VERSIONING.md for the upgrade policy).
Highlights:
* Trait-level API, dyn-safe, runtime-pluggable across providers.
* Toman/Rial Amount type that prevents the unit-mixup bug that ships to production at every Iranian e-commerce merchant.
* Sandbox per provider; .with_api_base() to redirect at wiremock for tests; .with_client() for custom timeouts/proxies.
* MockGateway (no I/O) + scriptable Behavior for unit-testing your own checkout code.
* security:: helpers — constant_time_eq, verify_hmac_sha256 (pure safe-Rust SHA-256 + HMAC implementation, RFC test-vector-checked), check_amount, check_authority_format.
* validators feature re-exports parsitext::validators (national_id, sheba, bank_card with bank lookup, phone with operator detection, landline with province detection, postal_code, car_plate).
* tracing::instrument on every API call.
* Per-feature Cargo gates so binaries can ship only the providers they actually use.
* 53 tests (lib + integration + security), criterion benches, full doc coverage, four runnable examples.
* Per-crate CI workflow with seven feature-combo build matrices plus cargo package.
parsitext 0.1.1:
jalali-calendar 0.1.1:
Workspace: