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

Support free tickets #651

Closed
rohangpta opened this issue Apr 13, 2024 · 1 comment · Fixed by #658
Closed

Support free tickets #651

rohangpta opened this issue Apr 13, 2024 · 1 comment · Fixed by #658
Assignees
Labels

Comments

@rohangpta
Copy link
Member

in the view initiate_checkout, we exit early if cart total is 0.

Let's instead make it check individual tickets: all(t.price == 0 for t in cart.tickets.all()) and then simply "sell the tickets" to the person and then exit.

This also should be accompanied with a refactor. We have "sell the tickets" logic in complete_checkout. Move this to a separate helper function so that both the free ticket purchase path and paid ticket purchase path can use this shared function.

We also need one more refactor: the response returned should indicate that the tickets have been sold and the frontend doesn't need to call complete_checkout. This will require changing the response schema.

@aviupadhyayula
Copy link
Member

Resolved in #658.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants