Return a different status code for "already purchased" (bug 891000)

Not sure of the name and position of the new middleware.