Update purchase.js