fix: renamed cardForm to createCardForm - #19
Merged
Merged
Conversation
sakksham7
approved these changes
Sep 4, 2026
aritro2002
approved these changes
Sep 4, 2026
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.
Type of Change
Description
Follows the Web SDK's rename of the card form factory from
cardForm()tocreateCardForm(), for parity with the verb-first factories beside it (create,getElement,updateIntent).OrcaJs.resbinds the SDK's JS object keys directly, so this is required for correctness rather than cosmetic — left unchanged,session.cardForm()would resolve toundefinedagainst the new SDK.Renamed on both surfaces and followed through the wrapper:
OrcaJs.res—element.createCardFormandpaymentMethodsSession.createCardForm, matching the SDK's new keys.Context.res—elementsType.createCardFormand 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.