Skip to content

SK-3004: add mock CVV value tokens, fix empty CVV mock and rename CollectElementInput.table to tableName - #189

Merged
saileshwar-skyflow merged 2 commits into
release/26.7.0from
SK-3004/cvv-mock-token
Jul 31, 2026
Merged

SK-3004: add mock CVV value tokens, fix empty CVV mock and rename CollectElementInput.table to tableName#189
saileshwar-skyflow merged 2 commits into
release/26.7.0from
SK-3004/cvv-mock-token

Conversation

@saileshwar-skyflow

@saileshwar-skyflow saileshwar-skyflow commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • CollectElementInput.tabletableName: renamed the constructor parameter for consistency; updated all internal SDK usages (Element, CollectContainer, ComposableContainer, TextField), samples, tests, and README
  • Empty-CVV mock fix: previously, CVV elements with no entered value were silently skipped by CVVMap.capture(), causing the real vault token to be returned to the app. Empty-value CVV elements are now captured and their tokens replaced with "". An explicit isEmpty guard at the replacement site ensures generateMockCVV is never called with length 0
  • generateMockCVV backstop: existing if (length <= 0) return "" guard confirmed and tested directly
  • Nested map serialization fix: AdditionalFieldsRecord.data values that are Map<*, *> are now serialized as JSONObject via anyToJsonValue() instead of .toString()
  • CVV nested-column replacement fix: rewrote replaceCVVTokensInRecord to use first-dot split + exact path field matching so nested columns (e.g. address.city.street) replace only the correct token entry

yaswanth-pula-skyflow and others added 2 commits July 31, 2026 11:08
… mock, add CVV tests

- Rename CollectElementInput.table parameter to tableName; update all
  usages across SDK (Element, CollectContainer, ComposableContainer,
  TextField), samples, tests, and README
- Fix CVV mock: capture empty-value CVV elements so their tokens are
  replaced with "" instead of leaking the real vault token; add explicit
  isEmpty guard at replacement site to avoid calling generateMockCVV(0,"")
- Add 14 unit tests for MockCVV covering empty-entered-value (flat and
  nested), generateMockCVV(0) backstop, and all prior nested-path cases

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@saileshwar-skyflow saileshwar-skyflow changed the title SK-3004: rename CollectElementInput.table to tableName, fix empty-CVV mock, add tests SK-3004: add mock CVV value tokens, fix empty CVV mock and rename CollectElementInput.table to tableName Jul 31, 2026
@saileshwar-skyflow
saileshwar-skyflow merged commit 3c3550e into release/26.7.0 Jul 31, 2026
3 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.

3 participants