Tiered loyalty & rewards program engine#411
Merged
Cybermaxi7 merged 5 commits intoApr 26, 2026
Merged
Conversation
- Add RewardsModule to PaymentsModule for dependency injection - Inject RewardsService into PaymentsService to enable points redemption - Add pointsToUse field to InitiatePaymentDto to allow customers to use points during checkout - Implement logic in initiatePayment to apply reward points discount before payment - Points are converted to discount (100 points = ) and deducted from final payment amount - Gracefully handle points redemption failures without blocking payment This completes the integration of the Tiered Loyalty & Rewards Program Engine with the checkout flow.
- Update from deprecated zricethezav/gitleaks-action@v8 to gitleaks/gitleaks-action@v2 - Resolves CI/CD error: Unable to resolve action zricethezav/gitleaks-action@v8
- Include src/rewards/**/*.ts in format:check - Include payments module files (payments.module.ts, payments.service.ts, payment.dto.ts) in format:check - Ensures new loyalty rewards code follows project formatting standards
- Keep both RewardsModule and LoggerModule in payments module - Keep both RewardsService and LoggerService in payments service - Resolve logging method conflicts (use logger.info) - This maintains both loyalty program and structured logging features
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.
Summary
Provide a short description of the change. Reference related issue(s):
Resolves: # (if applicable)
Type of change
Checklist
Migration Notes
If this change requires schema or data migrations, include:
How to run tests locally
Provide the commands and any env/setup required to run the tests locally, for example:
Verification steps
List manual steps a reviewer can use to validate the change.
Additional context
If this PR touches sensitive domains (payments, escrow, reconciliation, migrations involving money), add a high-level design note and request a core-team reviewer.
See docs/pr-checklist.md for more guidance on expectations for tests, migrations, and documentation.
Summary
Short description of the change and the problem it solves.
Related Issue
Checklist (required for all PRs)
npm run pr:checklocally and it passes.Testing Steps
Describe how to run the tests and verify the change locally.
Migration Notes
If this change requires database migrations or data migrations, document them here (how to run, rollback plan, risk notes).
Docs / Release Notes
If this change affects usage, configuration, or public APIs, include the updated docs and a short release note.