Skip to content

Release v1.0.1 — brand-aware card number and CVV length limits - #26

Merged
RZEROSTERN merged 3 commits into
masterfrom
develop
Nov 10, 2026
Merged

RZEROSTERN merged 3 commits into
masterfrom
develop

Conversation

@RZEROSTERN

Copy link
Copy Markdown
Contributor

Release v1.0.1

Patch release of mx.dev1.openpay:openpay-sdk that fixes two input bugs in the card form. It contains everything merged into develop through #25.

What's fixed

Card number length

  • The card form accepted up to 19 digits for every brand.
  • It now stops at 15 digits when American Express is detected (prefixes 34/37) and at 16 digits for every other brand.
  • Editing a 16-digit number so that it becomes Amex re-caps it to 15.

Security code (CVV) length

  • Typing was already capped at 4 digits for Amex and 3 otherwise, but a 4-digit code typed for an Amex card survived when the card number was changed to another brand.
  • The security code is now cut to the length of the newly detected brand whenever the card number changes.
  • Validation is unchanged: Amex requires exactly 4 digits, every other brand exactly 3.

API changes

  • Added: CardBrand.cardNumberLength (15 for AMERICAN_EXPRESS, 16 for VISA, MASTERCARD and UNKNOWN).
  • Behavior: OpenpayCardFormState.updateCardNumber caps the input by the detected brand and trims the security code to the brand length.
  • Source compatibility: CardBrand's constructor gained a parameter, but enum constructors are not callable by host apps, so no host code needs to change.

Not changed

  • CardValidator.isValidCardNumber still accepts 12–19 digit numbers that pass Luhn. Only the form input is capped.
  • CardNumberVisualTransformation keeps its grouping for hosts that use it outside the form state.

Version and docs

  • VERSION_NAME (gradle.properties) and OpenpaySdk.VERSION → 1.0.1.
  • Dependency snippets in README.md and the EN/ES/FR/PT getting started guides → 1.0.1.
  • docs/*/ui-components.md (EN/ES/FR/PT) describe the card number cap.

Included pull requests

After merging

CD runs on a v* tag and checks that the tag equals VERSION_NAME:

  1. Push the tag v1.0.1 on the master merge commit → CD runs the tests and coverage gate, uploads the signed artifacts, promotes the staging repository to the Central Portal and creates the GitHub release.
  2. Press Publish at central.sonatype.com → Publish → Deployments once validation passes. Nothing is public on Maven Central until then.

Test plan

🤖 Generated with Claude Code

RZEROSTERN and others added 3 commits November 10, 2026 00:47
The card form accepted up to 19 digits for every brand. The card number is
now capped at 15 digits when American Express is detected and at 16 for
every other brand. A security code typed for a previous brand is also cut
to the new brand length (4 digits for American Express, 3 otherwise) when
the card number changes.

Co-Authored-By: Claude <noreply@anthropic.com>
Aligns VERSION_NAME, OpenpaySdk.VERSION and the dependency snippets in the
README and the four-language getting started guides, so the v1.0.1 tag
passes the CD version guard.

Co-Authored-By: Claude <noreply@anthropic.com>
…ngths

fix: cap card number and CVV lengths by detected brand (v1.0.1)
@github-actions

Copy link
Copy Markdown

Unit test coverage

Overall Project 83.54% 🍏
Files changed 100% 🍏

Module Coverage
openpay-sdk 82.51% 🍏
Files
Module File Coverage
openpay-sdk CardBrand.kt 100% 🍏
OpenpaySdk.kt 100% 🍏
OpenpayCardFormState.kt 99.16% 🍏

@RZEROSTERN
RZEROSTERN merged commit 5c271d6 into master Nov 10, 2026
4 checks passed
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