Index: main/waeup.sirp/trunk/src/waeup/sirp/payments/payment.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/payments/payment.py	(revision 6874)
+++ main/waeup.sirp/trunk/src/waeup/sirp/payments/payment.py	(revision 6875)
@@ -20,6 +20,4 @@
 from datetime import datetime
 from grok import index
-from zope.component.interfaces import IFactory
-from zope.interface import implementedBy
 from waeup.sirp.payments.interfaces import (
     IPayment, ISCPayment, IOnlinePayment)
@@ -73,17 +71,2 @@
 
 OnlinePayment = attrs_to_fields(OnlinePayment)
-
-# Online payments must be importable. So we might need a factory.
-class OnlinePaymentFactory(grok.GlobalUtility):
-    """A factory for online payments.
-    """
-    grok.implements(IFactory)
-    grok.name(u'waeup.OnlinePayment')
-    title = u"Create a new online payment.",
-    description = u"This factory instantiates new online payment instances."
-
-    def __call__(self, *args, **kw):
-        return OnlinePayment()
-
-    def getInterfaces(self):
-        return implementedBy(OnlinePayment)
Index: main/waeup.sirp/trunk/src/waeup/sirp/payments/tests.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/payments/tests.py	(revision 6874)
+++ main/waeup.sirp/trunk/src/waeup/sirp/payments/tests.py	(revision 6875)
@@ -22,5 +22,5 @@
 from waeup.sirp.payments.container import PaymentsContainer
 from waeup.sirp.payments.payment import (
-    SCPayment, OnlinePayment, OnlinePaymentFactory)
+    SCPayment, OnlinePayment)
 from waeup.sirp.testing import (FunctionalLayer, FunctionalTestCase)
 
@@ -64,23 +64,2 @@
         self.assertRaises(
             NotImplementedError, container.clear)
-
-class OnlinePaymentFactoryTest(FunctionalTestCase):
-
-    layer = FunctionalLayer
-
-    def setUp(self):
-        super(OnlinePaymentFactoryTest, self).setUp()
-        self.factory = OnlinePaymentFactory()
-        return
-
-    def tearDown(self):
-        super(OnlinePaymentFactoryTest, self).tearDown()
-        return
-
-    def test_factory(self):
-        obj = self.factory()
-        assert isinstance(obj, OnlinePayment)
-
-    def test_getInterfaces(self):
-        implemented_by = self.factory.getInterfaces()
-        assert implemented_by.isOrExtends(IOnlinePayment)
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/payments.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/payments.py	(revision 6874)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/payments.py	(revision 6875)
@@ -20,6 +20,8 @@
 from grok import index
 from zope.component.interfaces import IFactory
+from zope.interface import implementedBy
 from waeup.sirp.students.interfaces import IStudentPaymentsContainer, IStudentNavigation
-from waeup.sirp.payments import PaymentsContainer
+from waeup.sirp.payments import PaymentsContainer, OnlinePayment
+from waeup.sirp.payments.interfaces import IOnlinePayment
 from waeup.sirp.utils.helpers import attrs_to_fields
 
@@ -38,2 +40,33 @@
 
 StudentPaymentsContainer = attrs_to_fields(StudentPaymentsContainer)
+
+class StudentOnlinePayment(OnlinePayment):
+    """This is an online payment.
+    """
+    grok.implements(IOnlinePayment, IStudentNavigation)
+    grok.provides(IOnlinePayment)
+
+    def __init__(self):
+        super(StudentOnlinePayment, self).__init__()
+        p_id = None
+        return
+
+    def getStudent(self):
+        return self.__parent__.__parent__
+
+StudentOnlinePayment = attrs_to_fields(StudentOnlinePayment)
+
+# Student online payments must be importable. So we might need a factory.
+class StudentOnlinePaymentFactory(grok.GlobalUtility):
+    """A factory for student online payments.
+    """
+    grok.implements(IFactory)
+    grok.name(u'waeup.StudentOnlinePayment')
+    title = u"Create a new online payment.",
+    description = u"This factory instantiates new online payment instances."
+
+    def __call__(self, *args, **kw):
+        return StudentOnlinePayment()
+
+    def getInterfaces(self):
+        return implementedBy(StudentOnlinePayment)
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_payment.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_payment.py	(revision 6875)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_payment.py	(revision 6875)
@@ -0,0 +1,46 @@
+## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""Tests for student payments.
+
+"""
+
+from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
+from waeup.sirp.students.payments import (
+    StudentOnlinePayment, StudentOnlinePaymentFactory)
+from waeup.sirp.payments.interfaces import IOnlinePayment
+from waeup.sirp.students.interfaces import IStudentNavigation
+
+class StudentOnlinePaymentFactoryTest(FunctionalTestCase):
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(StudentOnlinePaymentFactoryTest, self).setUp()
+        self.factory = StudentOnlinePaymentFactory()
+        return
+
+    def tearDown(self):
+        super(StudentOnlinePaymentFactoryTest, self).tearDown()
+        return
+
+    def test_factory(self):
+        obj = self.factory()
+        assert isinstance(obj, StudentOnlinePayment)
+
+    def test_getInterfaces(self):
+        implemented_by = self.factory.getInterfaces()
+        assert implemented_by.isOrExtends(IOnlinePayment)
+        assert implemented_by.isOrExtends(IStudentNavigation)
