juspay/hyperswitch

[FEATURE] Integrate Haptic Feedback on Payment Completion

Open

#6,230 opened on Sep 13, 2024

View on GitHub
 (4 comments) (0 reactions) (1 assignee)Rust (4,676 forks)batch import
enhancementgood first issuehacktoberfestrescript

Repository metrics

Stars
 (42,690 stars)
PR merge metrics
 (Avg merge 6d 22h) (213 merged PRs in 30d)

Description

Description

When users open the payment sheet in the Hyperswitch SDK, the buttons should provide haptic feedback. This means a gentle vibration when they tap a button, giving them a nice confirmation of their actions. This feature makes the payment experience feel more engaging and responsive on mobile devices.

Getting started

  1. Get familiar with ReScript.
  2. Check the README.md for project structure and setup instructions.
  3. To setup locally, follow these steps
#  Clone repository
cd hyperswitch-client-core
git submodule update --init --recursive
yarn install
yarn run server     # This starts the mock server
yarn run re:start   # In another terminal

Expected Behavior:

  • Upon successful payment completion, users should receive a short, gentle haptic response to confirm the action.
  • The feedback should be subtle and non-intrusive, enhancing the user experience.

Actual Behavior:

  • Currently, there is no haptic feedback upon payment completion, leaving users without tactile confirmation of success.

Tasks

Integrate Haptic Feedback:

Implement haptic feedback in the payment completion workflow.

Select Appropriate Haptic Pattern:

Choose a subtle and non-intrusive haptic pattern, such as a short, gentle vibration, to indicate a successful payment.

Platform-Specific Implementation:

Use platform-specific APIs for haptic feedback:

  • Android: Utilize the Vibrator class.
  • iOS: Use UIImpactFeedbackGenerator or equivalent.

Testing:

Test haptic feedback on different devices and platforms to ensure consistent and expected behavior across iOS and Android.

Contribution Guidelines:

  • Fork the repository and create a new branch for your work.
  • Write clean, well-documented code with clear commit messages.
  • Make sure to follow our coding standards and contribution guidelines.

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 https://github.com/juspay/hyperswitch-client-core 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!

Contributor guide