Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 13004)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 13005)
@@ -4,4 +4,8 @@
 1.3.2.dev0 (unreleased)
 =======================
+
+* Add `Payment` class attribute `created_online` to mark payment tickets
+  which are added online and not by import. This attribute is needed in
+  custom packages when sending data to payment gateways.
 
 * Remove quite old bug in `doImport`: Replace empty strings *and* lists with
Index: /main/waeup.kofa/trunk/docs/source/userdocs/students.rst
===================================================================
--- /main/waeup.kofa/trunk/docs/source/userdocs/students.rst	(revision 13004)
+++ /main/waeup.kofa/trunk/docs/source/userdocs/students.rst	(revision 13005)
@@ -172,4 +172,9 @@
 -----------------------
 
+`waeup.kofa.students.interfaces.IStudentOnlinePayment` inherits from `waeup.kofa.payments.interfaces.IOnlinePayment` and has only two additional schema fields: `p_current` and `p_level` which are student-specific. It also promises three additional methods which
+
+
+xxxxxxxxxxxxxxxx
+
 .. literalinclude:: ../../../src/waeup/kofa/students/interfaces.py
    :pyobject: IStudentOnlinePayment
Index: /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py	(revision 13004)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py	(revision 13005)
@@ -47,4 +47,5 @@
     """
     p_id = Attribute('Payment identifier')
+    created_online = Attribute('True if not imported')
 
     p_category = schema.Choice(
Index: /main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py	(revision 13004)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py	(revision 13005)
@@ -44,9 +44,5 @@
     logger_format_str = '"%(asctime)s","%(user)s",%(message)s'
 
-    #def logger_info(self, comment=None):
-    #    """Get the logger's info method.
-    #    """
-    #    self.logger.info('%s' % comment)
-    #    return
+    created_online = False
 
     def __init__(self):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/payments/tests.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/payments/tests.py	(revision 13004)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/payments/tests.py	(revision 13005)
@@ -26,5 +26,5 @@
 from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase)
 
-class PaymentsContainerTestCase(FunctionalTestCase):
+class PaymentsTestCase(FunctionalTestCase):
 
     layer = FunctionalLayer
@@ -57,2 +57,6 @@
         self.assertRaises(
             NotImplementedError, container.clear)
+        # created_online is always False
+        payment = OnlinePayment()
+        self.assertEqual(payment.created_online, False)
+        return
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 13004)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 13005)
@@ -1741,4 +1741,5 @@
             self.flash(error, type="danger")
             return
+        payment.created_online = True
         self.context[payment.p_id] = payment
         self.flash(_('Payment ticket created.'))
@@ -1780,4 +1781,5 @@
             self.flash(error, type="danger")
             return
+        payment.created_online = True
         self.context[payment.p_id] = payment
         self.flash(_('Payment ticket created.'))
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 13004)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 13005)
@@ -904,4 +904,5 @@
                            self.browser.contents)
         self.assertEqual(self.student['payments'][value].amount_auth, 40000.0)
+        self.assertEqual(self.student['payments'][value].created_online, True)
         payment_url = self.browser.url
         logfile = os.path.join(
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 13004)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 13005)
@@ -744,9 +744,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
 
-            ',0.0,2012-04-01 13:12:01#,,1,,,,,unpaid,,0.0,,,,,\r\n'
+            ',0.0,0,2012-04-01 13:12:01#,,1,,,,,unpaid,,0.0,,,,,\r\n'
             )
         return
@@ -762,9 +762,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
 
-            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
+            '666,12.12,0,2012-04-01 13:12:01#,schoolfee,1,my-id,'
             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
             'r-code,,A111111,created,2012\r\n'
@@ -781,9 +781,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
 
-            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
+            '666,12.12,0,2012-04-01 13:12:01#,schoolfee,1,my-id,'
             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
             'r-code,,A111111,created,2012\r\n'
@@ -800,9 +800,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
 
-            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
+            '666,12.12,0,2012-04-01 13:12:01#,schoolfee,1,my-id,'
             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
             'r-code,,A111111,created,2012\r\n'
@@ -822,9 +822,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
 
-            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
+            '666,12.12,0,2012-04-01 13:12:01#,schoolfee,1,my-id,'
             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
             'r-code,,A111111,created,2012\r\n'
@@ -857,9 +857,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
 
-            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
+            '666,12.12,0,2012-04-01 13:12:01#,schoolfee,1,my-id,'
             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
             'r-code,,A111111,created,2012\r\n'
@@ -873,5 +873,5 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
@@ -884,5 +884,5 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
@@ -917,5 +917,5 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
@@ -927,9 +927,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
             'r_code,r_desc,student_id,state,current_session\r\n'
 
-            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
+            '666,12.12,0,2012-04-01 13:12:01#,schoolfee,1,my-id,'
             'p-item,100,2012,unpaid,2012-04-01 14:12:01#,12.12,'
             'r-code,,A111111,created,2012\r\n'
@@ -955,10 +955,10 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,p_category,p_current,p_id,p_item,'
+            'ac,amount_auth,created_online,creation_date,p_category,p_current,p_id,p_item,'
             'p_level,p_session,p_state,payment_date,r_amount_approved,r_code,'
             'r_desc,student_id,matric_number,reg_number,firstname,middlename,lastname,'
             'state,current_session,entry_session,entry_mode,faccode,depcode,certcode\r\n'
 
-            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,p-item,100,2012,'
+            '666,12.12,0,2012-04-01 13:12:01#,schoolfee,1,my-id,p-item,100,2012,'
             'paid,2012-04-01 14:12:01#,12.12,r-code,,A111111,234,123,'
             'Anna,M.,Tester,created,2012,2010,ug_ft,NA,NA,CERT1\r\n'
