Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 9868)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 9869)
@@ -95,6 +95,9 @@
         xmldict['institution_bank_id'] = '00'
         xmldict['institution_amt'] = '0.0'
+        provider_amt = 0.0
+        self.pay_item_id = '0000'
         if self.context.p_category == 'schoolfee':
-            provider_amt = 1500.0
+            if not self.context.p_item == 'Balance':
+                provider_amt = 1500.0
             if student.current_mode.endswith('_ft'):
                 self.pay_item_id = '5700'
@@ -139,10 +142,8 @@
         elif self.context.p_category == 'gown':
             self.pay_item_id = '5704'
-            provider_amt = 0.0
             xmldict['institution_bank_id'] = '7'
             xmldict['institution_acct'] = '1016232382'
         elif self.context.p_category.startswith('hostel_maintenance'):
             self.pay_item_id = '5705'
-            provider_amt = 0.0
             xmldict['institution_bank_id'] = '129'
             xmldict['institution_acct'] = '0014414547'
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 9868)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 9869)
@@ -258,5 +258,31 @@
             self.browser.contents)
 
-
+        # Create balance payment ticket
+        self.browser.open(self.payments_path + '/addbp')
+        self.browser.getControl(name="form.p_category").value = ['schoolfee']
+        self.browser.getControl(name="form.balance_session").value = ['2003']
+        self.browser.getControl(name="form.balance_level").value = ['300']
+        self.browser.getControl(name="form.balance_amount").value = '200'
+        self.browser.getControl("Create ticket").click()
+        ctrl = self.browser.getControl(name='val_id')
+        value = ctrl.options[6]
+        self.browser.getLink(value).click()
+        self.assertMatches(
+            '...<span>200.0</span>...',
+            self.browser.contents)
+        # Manager can access InterswitchForm
+        self.browser.getLink("CollegePAY", index=0).click()
+        self.assertEqual(self.student['payments'][value].provider_amt, 0.0)
+        self.assertEqual(self.student['payments'][value].gateway_amt, 150.0)
+        self.assertMatches('...<input type="hidden" name="pay_item_id" value="5701" />...',
+                           self.browser.contents)
+        self.assertMatches(
+            '...<input type="hidden" name="amount" value="20000.0" />...',
+            self.browser.contents)
+        self.assertMatches(
+            '...item_name="School Fee" item_amt="5000" bank_id="16" acct_num="0122009929"...',
+            self.browser.contents)
+        self.assertFalse(
+            'item_name="BT Education"' in self.browser.contents)
 
 #    @external_test
