-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
C-refactorCategory: RefactorCategory: RefactorE-mediumEffort: Requires a fair amount of workEffort: Requires a fair amount of workhacktoberfestIssues that are up for grabs for Hacktoberfest participantsIssues that are up for grabs for Hacktoberfest participantsrescript
Description
Summary
Centralize the Fetch Payment Method List V2 endpoint by moving it from PaymentHelpersV2
into APIUtils.res
under the V2 section.
Type
refactor
Context
Currently, the Fetch Payment Method List V2 URL is hardcoded inside PaymentHelpersV2.res
. To keep consistency with V1 endpoints and improve maintainability, we should move it into APIUtils.res
as a centralized constant.
Starter tasks
- Identify the Fetch Payment Method List V2 endpoint in
PaymentHelpersV2.res
. - Move these URLs into
APIUtils.res
. - Organize them under clear sections for V1 and V2 endpoints.
- Replace references in the original files to use the centralized constants.
Implementation hints
- refer to
generateApiUrl
inAPIUtils.res
, follow the same logic, how it is implemented for some of the api calls.
Acceptance criteria
- All hardcoded paths in generateApiUrl replaced by constants defined at the top of APIUtils.res.
- Constants grouped into V1 and V2 sections for clarity.
- No change in functionality (existing tests pass).
- Code is cleaner and easier to extend for future endpoints.
Contribution Guidelines:
- Fork the repository and create a new branch for your work.
- Ensure the WebSDK follows best practices for API integration and field rendering.
- Write clean, well-documented code with clear commit messages.
- Add unit tests to ensure the dynamic field rendering works as expected.
- Make sure to follow our coding standards and contribution guidelines.
Resources:
- Link to WebSDK documentation: WebSDK Docs
- Link to the API endpoint specifications: API Docs
Submission Process:
- Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
- Once assigned, submit a pull request (PR).
- Maintainers will review and provide feedback, if any.
- Maintainers can unassign issues due to inactivity, read more here.
- For this issue, please submit a PR on @juspay/hyperswitch-web repo, and link it to the issue.
Refer here for Terms and conditions for the contest.
If you have any questions or need help getting started, feel free to ask in the comments!
Mentor contact
@aritro2002, @AbhishekChorotiya , @sakksham7
Pre-flight
- I read the Contributing Guide and setup
- I searched existing issues and PRs
Metadata
Metadata
Assignees
Labels
C-refactorCategory: RefactorCategory: RefactorE-mediumEffort: Requires a fair amount of workEffort: Requires a fair amount of workhacktoberfestIssues that are up for grabs for Hacktoberfest participantsIssues that are up for grabs for Hacktoberfest participantsrescript