Skip to content

fix: renamed cardForm to createCardForm - #19

Merged
ArushKapoorJuspay merged 1 commit into
mainfrom
fix/rename-card-form
Sep 4, 2026
Merged

ArushKapoorJuspay merged 1 commit into
mainfrom
fix/rename-card-form

Conversation

@ArushKapoorJuspay

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Follows the Web SDK's rename of the card form factory from cardForm() to createCardForm(), for parity with the verb-first factories beside it (create, getElement, updateIntent).

OrcaJs.res binds the SDK's JS object keys directly, so this is required for correctness rather than cosmetic — left unchanged, session.cardForm() would resolve to undefined against the new SDK.

Renamed on both surfaces and followed through the wrapper:

  • OrcaJs.reselement.createCardForm and paymentMethodsSession.createCardForm, matching the SDK's new keys.
  • Context.reselementsType.createCardForm and its default, keeping the context mirror aligned with the object it copies from.
  • Elements.res / HyperElements.res — the two places that copy the factory off the SDK's elements object.
  • CardForm.res — the two call sites: session.createCardForm() for the vault surface, elementsState.createCardForm() for payments.

No behaviour change; the object returned and every method on it are identical. Nothing in the public component API moves — <CardForm>, useCardForm() and the field components are untouched.

Pairs with hyperswitch-web PR juspay/hyperswitch-web#1753.

@ArushKapoorJuspay
ArushKapoorJuspay merged commit 25a7f8f into main Sep 4, 2026
7 checks passed
@ArushKapoorJuspay
ArushKapoorJuspay deleted the fix/rename-card-form branch September 4, 2026 15:54
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