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

Receipts endpoint #78

Merged
merged 2 commits into from
Aug 21, 2017
Merged

Receipts endpoint #78

merged 2 commits into from
Aug 21, 2017

Conversation

biilmann
Copy link
Member

This adds a /orders/:order_id/receipt endpoint that will return the HTML receipt for the order.

By default this uses the same HTML templates as the OrderConfirmation Mailer, but the endpoint takes an optional template query parameter that specifies another template inside the website that can be used to generate different variation of the receipt (one for the client, maybe one for printing on a box, one representing a ticket, etc)....

Was considering URL param for better caching, but since this endpoint is mainly for
authenticated requsts, HTTP caching will probably never be used much for it and a
query parameter is more intuitive
@biilmann biilmann merged commit f634daa into master Aug 21, 2017
@biilmann biilmann deleted the receipts branch August 21, 2017 06:31
@@ -150,7 +150,7 @@ func (a *API) orderRoutes(r *router) {
})

r.Get("/downloads", a.DownloadList)
r.Post("/receipt", a.ResendOrderReceipt)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you intend to remove the POST endpoint?

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.

None yet

2 participants