Skip to content

TASK #00000 : Add logs on Payment success#733

Merged
mahajanmahesh935 merged 1 commit into
tekdi:aspire-leadersfrom
mahajanmahesh935:PaymentSuccessEmail
May 4, 2026
Merged

TASK #00000 : Add logs on Payment success#733
mahajanmahesh935 merged 1 commit into
tekdi:aspire-leadersfrom
mahajanmahesh935:PaymentSuccessEmail

Conversation

@mahajanmahesh935
Copy link
Copy Markdown
Collaborator

@mahajanmahesh935 mahajanmahesh935 commented May 4, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Improved system logging for payment certificate generation and premium certificate purchase email notification flows to enhance operational visibility.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 45f7c92c-4f07-4220-9cc8-a45ad74072c0

📥 Commits

Reviewing files that changed from the base of the PR and between 9919802 and 9647f9b.

📒 Files selected for processing (2)
  • src/payments/services/payment.service.ts
  • src/payments/services/premium-certificate-purchase-email.service.ts

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


Walkthrough

Two logging changes are made across payment services: certificate generation logging is updated to report only the count of unique course IDs, and email service logging now records when premium certificate purchase email is skipped due to disabled configuration.

Changes

Certificate Generation Logging Update

Layer / File(s) Summary
Logging Changes
src/payments/services/payment.service.ts
Post-certificate generation log message is updated to output uniqueCourseIds.length instead of detailed message containing user id, intent id, and course id list.

Email Disabled State Logging

Layer / File(s) Summary
Logging Changes
src/payments/services/premium-certificate-purchase-email.service.ts
When SEND_EMAIL_AFTER_PAYMENT_SUCCESS is not enabled, an informational log is added to indicate the premium certificate purchase email was skipped for the given payment intent id before returning.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds logging to track when premium certificate purchase emails are skipped due to configuration settings. A review comment identifies a leftover debug log in the PaymentService that should be removed to maintain code quality and consistency.

`Certificate(s) generated and targets unlocked for user ${userId} (intent ${paymentIntentId}, courses: ${uniqueCourseIds.join(', ')})`,
);

this.logger.log(uniqueCourseIds.length,"uniqueCourseIds.length")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line appears to be a leftover debug log statement. It is redundant because the preceding log message already includes the list of courses, and it does not follow the project's indentation or logging style (e.g., it uses the length as the message and a string as the context). It should be removed to maintain code quality.

Suggested change
this.logger.log(uniqueCourseIds.length,"uniqueCourseIds.length")
\n

@mahajanmahesh935 mahajanmahesh935 merged commit ecd8304 into tekdi:aspire-leaders May 4, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant