added the receipt interface with a mockreceipt implementation, added toJSON method to Pproduct