Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep track of paid course runs #2113

Open
annagav opened this issue Feb 23, 2024 · 2 comments
Open

Keep track of paid course runs #2113

annagav opened this issue Feb 23, 2024 · 2 comments

Comments

@annagav
Copy link
Contributor

annagav commented Feb 23, 2024

We should not delete PaidCourseRun on unenrolling the student. This model was created for tracking purposes and was meant to keep track of the payment status of the enrollment.

It was first introduced and described in this issue #738

The deletion of the model was introduced in this PR #1474.

@pdpinch
Copy link
Member

pdpinch commented Feb 26, 2024

@annagav is there a reason why this came up?

@annagav
Copy link
Contributor Author

annagav commented Apr 3, 2024

Here is another case of a missing PaidCourseRun https://github.com/mitodl/hq/issues/3929.

When we defer a user the PaidCourseRun gets deleted.
I think we need to add states to paidCourseRun instead of deleting.

Paid course run is used in multiple places:

  1. ecommerce/models.py has_user_purchased_same_courserun- to determine if the user has already paid for the run.
  2. in _validate_enrollment_post_request to validate enrollment request (to make sure it is not a duplicate request.)

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

No branches or pull requests

2 participants