Description
This PR simplifies the payment logic by extracting all code related to product payment to a specific custom hook. This separation allows us to clearly distinguish between subscription and one-time payment (lifetime plans) flows, enabling each scenario to be managed independently.
In addition, we have removed unnecessary or overly verbose code to improve readability and maintainability.
Related Issues
--
Related Pull Requests
--
Checklist
- Changes have been tested locally.
- Unit tests have been written or updated as necessary.
- The code adheres to the repository's coding standards.
- Relevant documentation has been added or updated.
- No new warnings or errors have been introduced.
- SonarCloud issues have been reviewed and addressed.
- QA Passed
Testing Process
Subscriptions: Go to Settings > select any subscription plan > purchase the plan and check that everything works fine.
Lifetimes: Go to Settings > select any lifetime plan > purchase the plan and check that everything works fine.
Additional Notes
--