Good call on combining with store_subcards.  They both need this common processing to 1) find the subcards (is @subcards used?  how?) and 2) rollback if errors.