Index: /main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py	(revision 8525)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py	(revision 8526)
@@ -153,8 +153,4 @@
     factory = u'waeup.CustomApplicantOnlinePayment'
 
-    def _fillCustomFields(self, payment, session_config):
-        # No custom fields at the moment
-        return payment
-
 class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage):
     """Deliver a PDF slip of the context.
Index: /main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests.py	(revision 8525)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests.py	(revision 8526)
@@ -30,4 +30,5 @@
 from waeup.kofa.university.department import Department
 from waeup.kofa.testing import FunctionalTestCase
+from waeup.kofa.configuration import SessionConfiguration
 from waeup.kofa.applicants.container import ApplicantsContainer
 from waeup.kofa.applicants.tests.test_batching import ApplicantImportExportSetup
@@ -63,8 +64,14 @@
         self.pgcontainer.code = u'pgft2011'
         self.pgcontainer.prefix = u'pgft'
+        self.pgcontainer.year = 2011
+        self.pgcontainer.application_fee = 300.0
+        self.pgcontainer.title = u'This is the pgft2011 container'
         self.app['applicants']['pgft2011'] = self.pgcontainer
         self.ugcontainer = ApplicantsContainer()
-        self.ugcontainer.code = u'app2011'
-        self.ugcontainer.prefix = u'app'
+        self.ugcontainer.code = u'putme2011'
+        self.ugcontainer.prefix = u'putme'
+        self.ugcontainer.year = 2011
+        self.ugcontainer.application_fee = 200.0
+        self.ugcontainer.title = u'This is the app2011 container'
         self.app['applicants']['app2011'] = self.ugcontainer
 
@@ -96,4 +103,8 @@
         self.ugapplicant = self.app['applicants']['app2011'][
             self.ugapplication_number]
+        self.pgapplicant_path = ('http://localhost/app/applicants/pgft2011/%s'
+            % self.pgapplication_number)
+        self.ugapplicant_path = ('http://localhost/app/applicants/app2011/%s'
+            % self.ugapplication_number)
 
         self.browser = Browser()
@@ -106,32 +117,5 @@
         return
 
-    def test_manage_and_view_applicant(self):
-        # Managers can manage pg applicants
-        pgapplicant_path = ('http://localhost/app/applicants/pgft2011/%s'
-            % self.pgapplication_number)
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        # The IPGApplicant interface is really used in all pages
-        self.browser.open(pgapplicant_path)
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertTrue('Employer' in self.browser.contents)
-        self.browser.open(pgapplicant_path + '/manage')
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertTrue('Employer' in self.browser.contents)
-        self.browser.open(pgapplicant_path + '/edit')
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertTrue('Employer' in self.browser.contents)
-        self.browser.open(pgapplicant_path + '/application_slip.pdf')
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        # If we view the applicant in the ug container,
-        # the employer field doesn't appear
-        ugapplicant_path = ('http://localhost/app/applicants/app2011/%s'
-            % self.ugapplication_number)
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(ugapplicant_path)
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertFalse('Employer' in self.browser.contents)
-        self.browser.open(ugapplicant_path + '/manage')
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        # We can save the applicant
+    def fill_correct_values(self):
         self.browser.getControl(name="form.reg_number").value = '1234'
         self.browser.getControl(name="form.firstname").value = 'John'
@@ -142,12 +126,83 @@
         self.browser.getControl(name="form.sex").value = ['m']
         self.browser.getControl(name="form.email").value = 'xx@yy.zz'
+
+    def test_manage_and_view_applicant(self):
+        # Managers can manage pg applicants
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        # The IPGApplicant interface is really used in all pages
+        self.browser.open(self.pgapplicant_path)
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertTrue('Employer' in self.browser.contents)
+        self.browser.open(self.pgapplicant_path + '/manage')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertTrue('Employer' in self.browser.contents)
+        self.browser.open(self.pgapplicant_path + '/edit')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertTrue('Employer' in self.browser.contents)
+        self.browser.open(self.pgapplicant_path + '/application_slip.pdf')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        # If we view the applicant in the ug container,
+        # the employer field doesn't appear
+        self.browser.open(self.ugapplicant_path)
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertFalse('Employer' in self.browser.contents)
+        self.browser.open(self.ugapplicant_path + '/manage')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        # We can save the applicant
+        self.fill_correct_values()
         self.browser.getControl("Save").click()
         self.assertMatches('...Form has been saved...', self.browser.contents)
         self.assertFalse('Employer' in self.browser.contents)
-        self.browser.open(ugapplicant_path + '/edit')
+        self.browser.open(self.ugapplicant_path + '/edit')
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertFalse('Employer' in self.browser.contents)
-        self.browser.open(ugapplicant_path + '/application_slip.pdf')
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.browser.open(self.ugapplicant_path + '/application_slip.pdf')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        return
+
+    def test_application_payment(self):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+
+        # UG (UTME) applicant
+        self.browser.open(self.ugapplicant_path)
+        self.browser.open(self.ugapplicant_path + '/manage')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.fill_correct_values()
+        self.browser.getControl("Save").click()
+        self.assertMatches('...Form has been saved...', self.browser.contents)
+        self.fill_correct_values()
+        self.browser.getControl("Save").click()
+        self.browser.getControl("Add online payment ticket").click()
+        self.assertMatches('...Payment ticket created...',
+                           self.browser.contents)
+        self.assertMatches('...Amount Authorized...',
+                           self.browser.contents)
+        payment_id = self.ugapplicant.keys()[0]
+        payment = self.ugapplicant[payment_id]
+        self.assertEqual(payment.p_item,'This is the app2011 container')
+        self.assertEqual(payment.p_session,2011)
+        self.assertEqual(payment.p_category,'application')
+        self.assertEqual(payment.amount_auth, 200.0)
+
+        # PG applicants pay more
+        self.browser.open(self.pgapplicant_path)
+        self.browser.open(self.pgapplicant_path + '/manage')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.fill_correct_values()
+        self.browser.getControl(name="form.reg_number").value = '2345'
+        self.browser.getControl(name="form.firstname").value = 'Anna'
+        self.browser.getControl("Save").click()
+        self.assertMatches('...Form has been saved...', self.browser.contents)
+        self.browser.getControl("Add online payment ticket").click()
+        self.assertMatches('...Payment ticket created...',
+                           self.browser.contents)
+        self.assertMatches('...Amount Authorized...',
+                           self.browser.contents)
+        payment_id = self.pgapplicant.keys()[0]
+        payment = self.pgapplicant[payment_id]
+        self.assertEqual(payment.p_item,'This is the pgft2011 container')
+        self.assertEqual(payment.p_session,2011)
+        self.assertEqual(payment.p_category,'application')
+        self.assertEqual(payment.amount_auth, 300.0)
         return
 
Index: /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py	(revision 8525)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py	(revision 8526)
@@ -19,4 +19,5 @@
 """
 
+from time import time
 import sys
 import grok
@@ -35,5 +36,5 @@
         'sandwich': ['Part Time Degree in Education', 'SAND'],
         'pt': ['Part-Time Degree Programmes', 'PTP'],
-        'pume': ['Post UME Screening Test', 'PUME'],
+        'putme': ['Post UTME Screening Test', 'PUTME'],
         'app': ['General Studies', 'APP'],
         'cest': ['Common Entry Screening Test', 'CEST'],
@@ -56,2 +57,15 @@
         'form.presently_inst': _(u'Presently attending a course or programme'),
         }
+
+    def setPaymentDetails(self, container, payment):
+        """Set the payment data of an applicant.
+        """
+        timestamp = "%d" % int(time()*1000)
+        payment.p_id = "p%s" % timestamp
+        payment.p_item = container.title
+        payment.p_session = container.year
+        payment.p_category = 'application'
+        # We are using the container specific application fee
+        # instead of the session configuration application fee.
+        payment.amount_auth = container.application_fee
+        return None
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py	(revision 8525)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py	(revision 8526)
@@ -102,5 +102,5 @@
 
     application_fee = schema.Float(
-        title = _(u'Application Fee'),
+        title = _(u'Application Fee (ignored)'),
         default = 0.0,
         required = False,
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 8525)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 8526)
@@ -130,15 +130,7 @@
         #IWorkflowState(self.student).setState('started')
         super(InterswitchTestsApplicants, self).fill_correct_values()
+        self.applicantscontainer.application_fee = 1000.0
         self.browser.getControl(name="transition").value = ['start']
         self.browser.getControl("Save").click()
-        self.browser.getControl("Add online").click()
-        self.assertTrue(
-            'Session configuration object is not available'
-            in self.browser.contents)
-        configuration = SessionConfiguration()
-        configuration.academic_session = 2009
-        configuration.application_fee = 1000.0
-        self.app['configuration'].addSessionConfiguration(configuration)
-        self.browser.open(self.manage_path)
         self.browser.getControl("Add online").click()
         self.assertMatches('...ticket created...',
Index: /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 8525)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 8526)
@@ -182,5 +182,5 @@
         'pg_pt': 'Postgraduate Part Time',
         'jm_ft': 'Joint Matriculation Full Time',
-        'ume_ft': 'UME Full Time',
+        'utme_ft': 'UTME Full Time',
         'de_ft': 'Direct Entry Full Time',
         'ph_ft': 'Post Higher Education Full Time',
@@ -194,5 +194,5 @@
 
     APP_CATS_DICT = {
-        'basic': 'PUME, PDE, PCE, PRENCE',
+        'basic': 'PUTME, PDE, PCE, PRENCE',
         'no': 'no application',
         'pg_ft': 'Postgraduate Full-Time',
