Index: main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 13765)
+++ main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 13771)
@@ -37,4 +37,6 @@
 PROVIDER_ITEM_NAME = 'BT Education'
 INSTITUTION_NAME = 'Uniben'
+INSTITUTION_ACCT = '2017506430'
+INSTITUTION_BANK_ID = '8'
 CURRENCY = '566'
 GATEWAY_AMT = 150.0
@@ -74,6 +76,6 @@
         xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
         # Institution data
-        xmldict['institution_acct'] = '000000000000'
-        xmldict['institution_bank_id'] = '00'
+        xmldict['institution_acct'] = INSTITUTION_ACCT
+        xmldict['institution_bank_id'] = INSTITUTION_BANK_ID
         xmldict['institution_amt'] = '0.0'
         provider_amt = 0.0
@@ -84,54 +86,17 @@
             if student.current_mode.endswith('_ft'):
                 self.pay_item_id = '5700'
-                if student.current_mode in ('ug_ft','de_ft','ume_ft'):
-                    xmldict['institution_acct'] = '2017506430'
-                    xmldict['institution_bank_id'] = '8'
-                elif student.current_mode in ('dp_ft','dp_pt','ct_pt','ct_ft'):
-                    xmldict['institution_acct'] = '0058653774'
-                    xmldict['institution_bank_id'] = '72'
-                elif student.current_mode in ('pg_ft'):
-                    xmldict['institution_acct'] = '6230033428'
-                    xmldict['institution_bank_id'] = '51'
             elif student.current_mode.endswith('_pt'):
                 self.pay_item_id = '5701'
-                if student.current_mode in ('ug_pt','de_pt'):
-                    xmldict['institution_acct'] = '0122009929'
-                    xmldict['institution_bank_id'] = '16'
-                elif student.current_mode in ('pg_pt', 'special_pg_pt'):
-                    xmldict['institution_acct'] = '4150033274'
-                    xmldict['institution_bank_id'] = '51'
             elif student.faccode == 'JUPEB':
                 self.pay_item_id = '5718'
-                xmldict['institution_acct'] = '0231462068'
-                xmldict['institution_bank_id'] = '16'
         elif self.context.p_category == 'clearance':
             self.pay_item_id = '5702'
             provider_amt = 1500.0
-            if student.faccode == 'FCETA':
-                xmldict['institution_acct'] = '5210007943'
-                xmldict['institution_bank_id'] = '51'
-            else:
-                xmldict['institution_bank_id'] = '10'
-                xmldict['institution_acct'] = '0031716047'
         elif self.context.p_category == 'gown':
             self.pay_item_id = '5704'
-            xmldict['institution_bank_id'] = '16'
-            xmldict['institution_acct'] = '0122011401'
         elif self.context.p_category.startswith('bed_allocation'):
             self.pay_item_id = '5716'
-            students_utils = getUtility(IStudentsUtils)
-            stage = students_utils.getAccommodationDetails(student)['bt']
-            stage = stage.split('_')[2]
-            if stage == 'fr':
-                union_dues = 500.0
-            else:
-                union_dues = 300.0
-            xmldict['institution_bank_id'] = '129'
-            xmldict['institution_acct'] = '0014419432'
-            xmldict['union_dues'] = 100 * union_dues
         elif self.context.p_category.startswith('hostel_maintenance'):
             self.pay_item_id = '5705'
-            xmldict['institution_bank_id'] = '129'
-            xmldict['institution_acct'] = '0014419432'
 
         xmldict['provider_amt'] = 100 * provider_amt
@@ -141,29 +106,8 @@
             self.context.amount_auth - provider_amt - GATEWAY_AMT)
 
-        if self.context.p_category == 'bed_allocation':
-            xmldict['institution_amt'] = 100 * (
-                self.context.amount_auth - GATEWAY_AMT - union_dues)
+        if provider_amt == 0:
             xmltext = """<payment_item_detail>
 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
-<item_detail item_id="2" item_name="UNION DUES" item_amt="%(union_dues)d" bank_id="31" acct_num="0005986952" />
-</item_details>
-</payment_item_detail>""" % xmldict
-        elif provider_amt == 0:
-            xmltext = """<payment_item_detail>
-<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
-<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
-</item_details>
-</payment_item_detail>""" % xmldict
-        elif self.context.p_category == 'schoolfee' and \
-            student.current_mode == 'ug_ft':
-            xmldict['institution_amt'] = 100 * (
-                self.context.amount_auth - provider_amt - GATEWAY_AMT - 3000)
-            xmltext = """<payment_item_detail>
-<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
-<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
-<item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
-<item_detail item_id="3" item_name="T-SHIP" item_amt="200000" bank_id="72" acct_num="0061647254" />
-<item_detail item_id="4" item_name="MTN-NET LIBRARY" item_amt="100000" bank_id="8" acct_num="20177722298" />
 </item_details>
 </payment_item_detail>""" % xmldict
@@ -199,29 +143,8 @@
         xmldict = {}
         provider_amt = 400.0
-        if self.applicant.applicant_id[:3] in ('pga', 'pgd'): # CERHI
-            xmldict['institution_acct'] = '1014312532'
-            xmldict['institution_bank_id'] = '117'
-        elif self.applicant.applicant_id.startswith('pg'):
-            xmldict['institution_acct'] = '0031716030'
-            xmldict['institution_bank_id'] = '10'
-        elif self.applicant.applicant_id.startswith('dp'):
-            xmldict['institution_acct'] = '9201805071'
-            xmldict['institution_bank_id'] = '17'
-        elif self.applicant.applicant_id.startswith('pt'):
-            xmldict['institution_acct'] = '9201805071'
-            xmldict['institution_bank_id'] = '17'
-        elif self.applicant.applicant_id.startswith('pre'):
-            xmldict['institution_acct'] = '0025186411'
-            xmldict['institution_bank_id'] = '129'
-        elif self.applicant.applicant_id.startswith('cbt'):
-            xmldict['institution_acct'] = '5030058259'
-            xmldict['institution_bank_id'] = '51'
+        if self.applicant.applicant_id.startswith('cbt'):
             provider_amt = 200.0
-        elif self.applicant.applicant_id.startswith('afak'):
-            xmldict['institution_acct'] = '1014446565'
-            xmldict['institution_bank_id'] = '117'
-        else:
-            xmldict['institution_acct'] = '1014326805'
-            xmldict['institution_bank_id'] = '117'
+        xmldict['institution_acct'] = INSTITUTION_ACCT
+        xmldict['institution_bank_id'] = INSTITUTION_BANK_ID
         xmldict['detail_ref'] = self.context.p_id
         xmldict['provider_amt'] = 100 * provider_amt
@@ -229,5 +152,6 @@
         xmldict['provider_bank_id'] = PROVIDER_BANK_ID
         xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
-        xmldict['institution_amt'] = 100 * (self.context.amount_auth - provider_amt - GATEWAY_AMT)
+        xmldict['institution_amt'] = 100 * (
+            self.context.amount_auth - provider_amt - GATEWAY_AMT)
         xmldict['institution_item_name'] = self.context.p_category
         xmldict['institution_name'] = INSTITUTION_NAME
Index: main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 13765)
+++ main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py	(revision 13771)
@@ -95,14 +95,8 @@
             in self.browser.contents)
         self.assertTrue(
-            'item_name="School Fee" item_amt="3535000" bank_id="8" acct_num="2017506430"'
+            'item_name="School Fee" item_amt="3835000" bank_id="8" acct_num="2017506430"'
             in self.browser.contents)
         self.assertTrue(
             'item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1010764827"'
-            in self.browser.contents)
-        self.assertTrue(
-            'item_name="T-SHIP" item_amt="200000" bank_id="72" acct_num="0061647254"'
-            in self.browser.contents)
-        self.assertTrue(
-            'item_name="MTN-NET LIBRARY" item_amt="100000" bank_id="8" acct_num="20177722298"'
             in self.browser.contents)
 
@@ -144,5 +138,5 @@
             in self.browser.contents)
         self.assertTrue(
-            'item_name="School Fee" item_amt="1835000" bank_id="16" acct_num="0122009929"'
+            'item_name="School Fee" item_amt="1835000" bank_id="8" acct_num="2017506430"'
             in self.browser.contents)
         self.assertTrue(
@@ -202,5 +196,5 @@
             in self.browser.contents)
         self.assertTrue(
-            '<item_detail item_id="1" item_name="Gown Hire Fee" item_amt="8400" bank_id="16" acct_num="0122011401" />'
+            '<item_detail item_id="1" item_name="Gown Hire Fee" item_amt="8400" bank_id="8" acct_num="2017506430" />'
             in self.browser.contents)
         self.assertFalse(
@@ -298,5 +292,5 @@
             in self.browser.contents)
         self.assertTrue(
-            'item_name="School Fee" item_amt="5000" bank_id="16" acct_num="0122009929"'
+            'item_name="School Fee" item_amt="5000" bank_id="8" acct_num="2017506430"'
             in self.browser.contents)
         self.assertFalse(
