def create_inapp_receipt(contrib):
 if contrib.is_inapp_simulation():
  storedata = {'id': 0, 'contrib': int(contrib.pk), 'inapp_id': contrib.inapp_product.guid}
  return create_test_receipt(settings.SITE_URL, 'ok', storedata=storedata)
 return create_receipt(contrib.addon, None, 'anonymous-user', flavour='inapp', contrib=contrib)

def create_inapp_receipt ( contrib ) : if contrib . is_inapp_simulation ( ) : storedata = { 'id' : 0 , 'contrib' : int ( contrib . pk ) , 'inapp_id' : contrib . inapp_product . guid } return create_test_receipt ( settings . SITE_URL , 'ok' , storedata = storedata ) return create_receipt ( contrib . addon , None , 'anonymous-user' , flavour = 'inapp' , contrib = contrib )
creates a receipt for an in-app purchase .