Update purchase.rb