replaced valid_attributes with factory in checkout controller