Create purchase.js