Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 9388)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 9389)
@@ -198,5 +198,4 @@
     site_name = SITE_NAME
     currency = CURRENCY
-    pay_item_id = '5700'
     product_id = PRODUCT_ID
 
@@ -241,4 +240,5 @@
             #studycourse = student['studycourse']
             if student.current_mode.endswith('_ft'):
+                self.pay_item_id = '5700'
                 #post-grad full-time students of all faculties
                 if student.is_postgrad:
@@ -259,4 +259,5 @@
                     xmldict['institution_bank_id'] = '51'
             elif student.current_mode.endswith('_pt'):
+                self.pay_item_id = '5701'
                 #post-grad part-time students of all faculties
                 if student.is_postgrad:
@@ -271,4 +272,5 @@
                     xmldict['institution_bank_id'] = '16'
         elif self.context.p_category == 'clearance':
+            self.pay_item_id = '5702'
             provider_amt = 1500
             xmldict['institution_bank_id'] = '7'
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 9388)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 9389)
@@ -16,4 +16,5 @@
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 ##
+from zope.component import createObject
 from hurry.workflow.interfaces import IWorkflowState
 from waeup.kofa.students.tests.test_browser import StudentsFullSetup
@@ -53,9 +54,4 @@
         self.browser.getControl(name="form.p_category").value = ['schoolfee']
         self.browser.getControl("Create ticket").click()
-        self.assertMatches('...ticket created...',
-                           self.browser.contents)
-        ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[0]
-        self.browser.getLink(value).click()
 
 
@@ -74,4 +70,9 @@
 
         # School fee ticket already created in setUp method
+        self.assertMatches('...ticket created...',
+                           self.browser.contents)
+        ctrl = self.browser.getControl(name='val_id')
+        value = ctrl.options[0]
+        self.browser.getLink(value).click()
         self.assertMatches('...Amount Authorized...',
                            self.browser.contents)
@@ -82,8 +83,8 @@
         # Manager can access InterswitchForm
         self.browser.getLink("CollegePAY", index=0).click()
-        self.assertMatches('...Total Amount Authorized:...',
-                           self.browser.contents)
         # The total amount to be processed by Interswitch
         # has been reduced by the Interswitch fee of 150 Nairas
+        self.assertMatches('...<input type="hidden" name="pay_item_id" value="5700" />...',
+                           self.browser.contents)
         self.assertMatches('...Total Amount Authorized:...',
                            self.browser.contents)
@@ -93,4 +94,29 @@
         self.assertMatches(
             '...item_name="School Fee" item_amt="3835000" bank_id="00" acct_num="000000000000"...',
+            self.browser.contents)
+        self.assertMatches(
+            '...item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1010764827"...',
+            self.browser.contents)
+
+        # Create school fee ticket for returning students
+        self.certificate.study_mode = u'ug_pt'
+        IWorkflowState(self.student).setState('returning')
+        configuration = createObject('waeup.SessionConfiguration')
+        configuration.academic_session = 2005
+        self.app['configuration'].addSessionConfiguration(configuration)
+        self.browser.open(self.payments_path + '/addop')
+        self.browser.getControl(name="form.p_category").value = ['schoolfee']
+        self.browser.getControl("Create ticket").click()
+        ctrl = self.browser.getControl(name='val_id')
+        value = ctrl.options[1]
+        self.browser.getLink(value).click()
+        self.browser.getLink("CollegePAY", index=0).click()
+        self.assertMatches('...<input type="hidden" name="pay_item_id" value="5701" />...',
+                           self.browser.contents)
+        self.assertMatches(
+            '...<input type="hidden" name="amount" value="2000000.0" />...',
+            self.browser.contents)
+        self.assertMatches(
+            '...item_name="School Fee" item_amt="1835000" bank_id="00" acct_num="000000000000"...',
             self.browser.contents)
         self.assertMatches(
@@ -102,11 +128,7 @@
         self.browser.getControl(name="form.p_category").value = ['clearance']
         self.browser.getControl("Create ticket").click()
-        self.assertMatches('...ticket created...',
-                           self.browser.contents)
         ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[1]
+        value = ctrl.options[2]
         self.browser.getLink(value).click()
-        self.assertMatches('...Amount Authorized...',
-                           self.browser.contents)
         self.assertMatches(
             '...<span>45000.0</span>...',
@@ -114,8 +136,6 @@
         # Manager can access InterswitchForm
         self.browser.getLink("CollegePAY", index=0).click()
-        self.assertMatches('...Total Amount Authorized:...',
-                           self.browser.contents)
-        # The total amount to be processed by Interswitch
-        # has been reduced by the Interswitch fee of 150 Nairas
+        self.assertMatches('...<input type="hidden" name="pay_item_id" value="5702" />...',
+                           self.browser.contents)
         self.assertMatches('...Total Amount Authorized:...',
                            self.browser.contents)
