Index: main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py	(revision 7631)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py	(revision 7633)
@@ -26,5 +26,6 @@
 from waeup.sirp.interfaces import (
     IUniversity, IQueryResultItem, academic_sessions_vocab)
-from waeup.sirp.students.interfaces import IStudent
+from waeup.sirp.students.interfaces import (IStudent, ICourseTicket,
+    IStudentOnlinePayment)
 from waeup.sirp.university.vocabularies import course_levels
 
@@ -115,2 +116,26 @@
 #: an instance of `SimpleFieldSearch` looking up students catalog.
 simple_search = SimpleFieldSearch()
+
+class CourseTicketIndexes(grok.Indexes):
+    """A catalog for course tickets.
+    """
+    grok.site(IUniversity)
+    grok.name('coursetickets_catalog')
+    grok.context(ICourseTicket)
+
+    level = index.Field(attribute='getLevel')
+    session = index.Field(attribute='getLevelSession')
+    code = index.Field(attribute='code')
+
+class StudentPaymentIndexes(grok.Indexes):
+    """A catalog for payments.
+    """
+    grok.site(IUniversity)
+    grok.name('payments_catalog')
+    grok.context(IStudentOnlinePayment)
+
+    p_session = index.Field(attribute='p_session')
+    p_category = index.Field(attribute='p_category')
+    p_item = index.Field(attribute='p_item')
+    p_state = index.Field(attribute='p_state')
+    r_pay_reference = index.Text(attribute='r_pay_reference')
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py	(revision 7631)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py	(revision 7633)
@@ -377,4 +377,12 @@
         )
 
+    def getLevel():
+        """Returns the id of the level the ticket has been added to.
+        """
+
+    def getLevelSession():
+        """Returns the session of the level the ticket has been added to.
+        """
+
 class ICourseTicketAdd(ICourseTicket):
     """An interface for adding course tickets.
@@ -434,5 +442,5 @@
 
     def getSessionString():
-        """Returns the the title of academic_sessions_vocab term.
+        """Returns the title of academic_sessions_vocab term.
 
         """
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/studylevel.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/studylevel.py	(revision 7631)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/studylevel.py	(revision 7633)
@@ -100,4 +100,15 @@
         return self.__parent__.__parent__.__parent__
 
+    def getLevel(self):
+        """Returns the id of the level the ticket has been added to.
+        """
+        return self.__parent__.level
+
+    def getLevelSession(self):
+        """Returns the session of the level the ticket has been added to.
+        """
+        return self.__parent__.level_session
+
+
 CourseTicket = attrs_to_fields(CourseTicket)
 
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_catalog.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_catalog.py	(revision 7631)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_catalog.py	(revision 7633)
@@ -26,9 +26,10 @@
 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
 from waeup.sirp.students.student import Student
+from waeup.sirp.students.studylevel import StudentStudyLevel, CourseTicket
 from waeup.sirp.university.faculty import Faculty
 from waeup.sirp.university.department import Department
 
 class CatalogTestSetup(FunctionalTestCase):
-    # A setup for testing students catalog related stuff.
+    # A setup for testing catalog related stuff.
     #
     # sets up a site with some student already created.
@@ -54,5 +55,5 @@
             self.certificate)
 
-        # Create student with studycourse subobject
+        # Create student with subobjects
         student = Student()
         student.firstname = u'Bob'
@@ -62,6 +63,21 @@
         self.student = self.app['students'][self.student_id]
         self.student['studycourse'].certificate = self.certificate
-        # Update the catalog
+        # Update the students_catalog
         notify(grok.ObjectModifiedEvent(self.student))
+        studylevel = StudentStudyLevel()
+        studylevel.level = 100
+        studylevel.level_session = 2010
+        self.student['studycourse']['100'] = studylevel
+        ticket = CourseTicket()
+        ticket.code = 'Course1'
+        self.student['studycourse']['100']['Course1'] = ticket
+        payment = createObject(u'waeup.StudentOnlinePayment')
+        payment.p_id = 'p1234567890'
+        payment.p_item = u'any item'
+        payment.p_session = 2010
+        payment.p_category = 'schoolfee'
+        payment.p_state = 'paid'
+        payment.r_pay_reference = u'GTB|WEB|FUT'
+        self.student['payments'][payment.p_id] = payment
         return
 
@@ -111,2 +127,92 @@
         assert len(results) == 1
         assert results[0] is self.app['students'][self.student_id]
+
+class CourseTicketCatalogTests(CatalogTestSetup):
+
+    layer = FunctionalLayer
+
+    def test_get_catalog(self):
+        # We can get an students catalog if we wish
+        cat = queryUtility(ICatalog, name='coursetickets_catalog')
+        assert cat is not None
+
+    def test_search_by_code(self):
+        # We can find a certain course ticket by its code
+        cat = queryUtility(ICatalog, name='coursetickets_catalog')
+        results = cat.searchResults(code=('Course1', 'Course1'))
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'studycourse']['100']['Course1']
+
+    def test_search_by_level(self):
+        # We can find a certain course ticket by the level
+        cat = queryUtility(ICatalog, name='coursetickets_catalog')
+        results = cat.searchResults(level=(100, 100))
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'studycourse']['100']['Course1']
+
+    def test_search_by_session(self):
+        # We can find a certain course ticket by the level session
+        cat = queryUtility(ICatalog, name='coursetickets_catalog')
+        results = cat.searchResults(session=(2010, 2010))
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'studycourse']['100']['Course1']
+
+class PaymentCatalogTests(CatalogTestSetup):
+
+    layer = FunctionalLayer
+
+    def test_get_catalog(self):
+        # We can get an students catalog if we wish
+        cat = queryUtility(ICatalog, name='payments_catalog')
+        assert cat is not None
+
+    def test_search_by_session(self):
+        # We can find a payment ticket by the payment session
+        cat = queryUtility(ICatalog, name='payments_catalog')
+        results = cat.searchResults(p_session=(2010, 2010))
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'payments']['p1234567890']
+
+    def test_search_by_category(self):
+        # We can find a payment ticket by the payment category
+        cat = queryUtility(ICatalog, name='payments_catalog')
+        results = cat.searchResults(p_category=('schoolfee','schoolfee'))
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'payments']['p1234567890']
+
+    def test_search_by_item(self):
+        # We can find a payment ticket by the payment item
+        cat = queryUtility(ICatalog, name='payments_catalog')
+        results = cat.searchResults(p_item=('any item','any item'))
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'payments']['p1234567890']
+
+    def test_search_by_state(self):
+        # We can find a payment ticket by the payment state
+        cat = queryUtility(ICatalog, name='payments_catalog')
+        results = cat.searchResults(p_state=('paid','paid'))
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'payments']['p1234567890']
+
+    def test_search_by_reference(self):
+        # We can find a payment ticket by parts of the response reference
+        cat = queryUtility(ICatalog, name='payments_catalog')
+        results = cat.searchResults(r_pay_reference='GTB')
+        results = [x for x in results] # Turn results generator into list
+        assert len(results) == 1
+        assert results[0] is self.app['students'][self.student_id][
+            'payments']['p1234567890']
