DRY up setcart code by putting it in concerns, implement tests for orders and redirect if cart is empty
use figaro gem to hide secret key base