Updated for use with spree 2.2

Also had to add app_id as a preference for it to work