You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description:
The CardWidget component's event handlers in the React SDK are not functioning as described in the documentation. While implementing the CardWidget with event handlers according to the documentation, we found that most events are not being emitted or are using mock implementations.
Expected Behavior
Expected Behavior:
According to the documentation, the CardWidget should emit events with specific data structures:
{
elementType: 'payment', // The type of element that emitted this event
complete: false, // If all required fields are complete
empty: false, // if the value is empty
value: { type: "card" }, // current selected payment method
}
These events should be handled through props like onChange, onReady, onFocus, onBlur, etc.
Actual Behavior
Actual Behavior:
Only onReady, onFocus, and onBlur events are working
The onChange event, which is crucial for form validation and completion status, is not emitting events as documented
The event system appears to be using mock implementations (visible in the SDK source code)
Unable to properly track card completion status due to non-functioning change events
Steps To Reproduce:
Steps To Reproduce
Install the Hyperswitch React SDK
Implement the CardWidget component with event handlers:
<CardWidget
options={options}
onReady={(e) => console.log("ready:", e)}
onFocus={(e) => console.log("focus:", e)}
onBlur={(e) => console.log("blur:", e)}
onChange={(e) => console.log("change:", e)}
/>
Fill out the card form
Check console logs - only ready, focus, and blur events will be logged
Context For The Bug:
We are implementing a payment form that needs to track the card input completion status to enable/disable the submit button. Without proper change events, we cannot reliably determine when the card details are complete and valid.
Context For The Bug
No response
Environment
Environment:
Using Hyperswitch hosted version: Yes
React version: 18.3.1
@juspay-tech/react-hyper-js: latest version
Browser: Chrome latest version
Nextjs but this is client side stuff
Have you spent some time checking if this bug has been raised before?
Bug Description
Bug Description:
The CardWidget component's event handlers in the React SDK are not functioning as described in the documentation. While implementing the CardWidget with event handlers according to the documentation, we found that most events are not being emitted or are using mock implementations.
Expected Behavior
Expected Behavior:
According to the documentation, the CardWidget should emit events with specific data structures:
{
elementType: 'payment', // The type of element that emitted this event
complete: false, // If all required fields are complete
empty: false, // if the value is empty
value: { type: "card" }, // current selected payment method
}
These events should be handled through props like onChange, onReady, onFocus, onBlur, etc.
Actual Behavior
Actual Behavior:
Only onReady, onFocus, and onBlur events are working
The onChange event, which is crucial for form validation and completion status, is not emitting events as documented
The event system appears to be using mock implementations (visible in the SDK source code)
Unable to properly track card completion status due to non-functioning change events
Steps To Reproduce:
Steps To Reproduce
Install the Hyperswitch React SDK
Implement the CardWidget component with event handlers:
<CardWidget
options={options}
onReady={(e) => console.log("ready:", e)}
onFocus={(e) => console.log("focus:", e)}
onBlur={(e) => console.log("blur:", e)}
onChange={(e) => console.log("change:", e)}
/>
Fill out the card form
Check console logs - only ready, focus, and blur events will be logged
Context For The Bug:
We are implementing a payment form that needs to track the card input completion status to enable/disable the submit button. Without proper change events, we cannot reliably determine when the card details are complete and valid.
Context For The Bug
No response
Environment
Environment:
Using Hyperswitch hosted version: Yes
React version: 18.3.1
@juspay-tech/react-hyper-js: latest version
Browser: Chrome latest version
Nextjs but this is client side stuff
Have you spent some time checking if this bug has been raised before?
Have you read the Contributing Guidelines?
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: