Index: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/browser/pages.py
===================================================================
--- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/browser/pages.py	(revision 15014)
+++ main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/browser/pages.py	(revision 15015)
@@ -34,2 +34,17 @@
     form_fields = grok.AutoFields(ICustomSessionConfiguration)
 
+class CustomCertificatePage(CertificatePage):
+    """Index page for certificates.
+    """
+    form_fields = grok.AutoFields(ICertificate).omit(
+        'school_fee_2', 'school_fee_3', 'school_fee_4', 'ratio',
+        'custom_textline_1', 'custom_textline_2',
+        'custom_float_1', 'custom_float_2')
+
+class CustomCertificateManageFormPage(CertificateManageFormPage):
+    """Manage the properties of a `Certificate` instance.
+    """
+    form_fields = grok.AutoFields(ICertificate).omit(
+        'school_fee_2', 'school_fee_3', 'school_fee_4', 'ratio',
+        'custom_textline_1', 'custom_textline_2',
+        'custom_float_1', 'custom_float_2')
Index: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interfaces.py
===================================================================
--- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interfaces.py	(revision 15014)
+++ main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interfaces.py	(revision 15015)
@@ -87,4 +87,10 @@
         )
 
+    certificate_fee = schema.Float(
+        title = _(u'Certificate Fee'),
+        default = 0.0,
+        required = False,
+        )
+
     def getSessionString():
         """Returns the session string from the vocabulary.
Index: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/browser.py
===================================================================
--- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/browser.py	(revision 15014)
+++ main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/browser.py	(revision 15015)
@@ -30,5 +30,5 @@
 from kofacustom.edopoly.interfaces import MessageFactory as _
 
-PRODUCT_ID = '6207' # must be provided by Interswitch
+PRODUCT_ID = '7571' # must be provided by Interswitch
 SITE_NAME = 'edopoly-kofa.waeup.org'
 PROVIDER_ACCT = '0773411069'
@@ -37,12 +37,13 @@
 INSTITUTION_NAME = 'EdoPoly'
 CURRENCY = '566'
-GATEWAY_AMT = 300.0
-
-#POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay'
-POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay'
-#HOST = 'webpay.interswitchng.com'
-HOST = 'sandbox.interswitchng.com'
-#URL = '/paydirect/api/v1/gettransaction.json'
-URL = '/webpay/api/v1/gettransaction.json'
+GATEWAY_AMT = 250.0
+MAC = '672ABFB2F3755A7793DE545BDA00F44878DF59140B43A1E7DF16245D299F3108AFF65502F16D95256B3242B43CBC3F512A208EB1BA977080D65328800C49912C'
+
+POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay'
+#POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay'
+HOST = 'webpay.interswitchng.com'
+#HOST = 'sandbox.interswitchng.com'
+URL = '/paydirect/api/v1/gettransaction.json'
+#URL = '/webpay/api/v1/gettransaction.json'
 
 httplib.HTTPSConnection.debuglevel = 0
@@ -58,5 +59,5 @@
     currency = CURRENCY
     product_id = PRODUCT_ID
-    mac = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3'  # must be provided by Interswitch
+    mac = MAC
 
     def update(self):
@@ -73,9 +74,15 @@
         xmldict['provider_bank_id'] = PROVIDER_BANK_ID
         xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
+        provider_amt = 0.0
+        if self.context.p_category == 'ict_entre':
+            provider_amt = 3000.0
+        if self.context.p_category == 'clearance':
+            provider_amt = 1500.0
+        if self.context.p_category in ('transcript', 'certificate'):
+            provider_amt = 2000.0
         # Institution data
         xmldict['institution_acct'] = '1015666713'
         xmldict['institution_bank_id'] = '121'
         xmldict['institution_amt'] = '0.0'
-        provider_amt = 0.0
         self.pay_item_id = '101' # must be provided by Interswitch
         xmldict['provider_amt'] = 100 * provider_amt
@@ -120,7 +127,7 @@
     site_name = SITE_NAME
     currency = CURRENCY
-    pay_item_id = '0000' # must be provided by Interswitch
-    product_id = PRODUCT_ID
-    mac = ''
+    pay_item_id = '101' # must be provided by Interswitch
+    product_id = PRODUCT_ID
+    mac = MAC
 
     def update(self):
@@ -131,7 +138,7 @@
             return
         xmldict = {}
-        provider_amt = 400.0
-        xmldict['institution_acct'] = '00000000000'
-        xmldict['institution_bank_id'] = '00'
+        provider_amt = 1000.0
+        xmldict['institution_acct'] = '1015666713'
+        xmldict['institution_bank_id'] = '121'
         xmldict['detail_ref'] = self.context.p_id
         xmldict['provider_amt'] = 100 * provider_amt
@@ -171,5 +178,5 @@
     gateway_host = HOST
     gateway_url = URL
-    mac = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3'
+    mac = MAC
 
 class CustomInterswitchPaymentVerifyWebservicePageStudent(
@@ -181,4 +188,5 @@
     gateway_host = HOST
     gateway_url = URL
+    mac = MAC
 
 class CustomInterswitchPaymentRequestWebservicePageApplicant(
@@ -190,4 +198,5 @@
     gateway_host = HOST
     gateway_url = URL
+    mac = MAC
 
 class CustomInterswitchPaymentVerifyWebservicePageApplicant(
@@ -199,2 +208,3 @@
     gateway_host = HOST
     gateway_url = URL
+    mac = MAC
Index: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/tests.py
===================================================================
--- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/tests.py	(revision 15014)
+++ main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/tests.py	(revision 15015)
@@ -53,4 +53,5 @@
     def test_interswitch_form(self):
         # Manager can access InterswitchForm
+        # School Fee
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open(self.payments_path)
@@ -71,5 +72,5 @@
         self.payment_url = self.browser.url
         self.browser.getLink("CollegePAY", index=0).click()
-        self.assertTrue('<input type="hidden" name="pay_item_id" value="0000" />' in
+        self.assertTrue('<input type="hidden" name="pay_item_id" value="101" />' in
                            self.browser.contents)
         self.assertEqual(self.student.current_mode, 'ug_ft')
@@ -78,5 +79,26 @@
             self.browser.contents)
         self.assertTrue(
-            'item_name="School Fee" item_amt="3985000" bank_id="00" acct_num="00000000"' in
+            'item_name="Tuition Fee" item_amt="3975000" bank_id="121" acct_num="1015666713"' in
+            self.browser.contents)
+        # Clearance Fee
+        self.browser.open(self.payments_path + '/addop')
+        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')
+        self.value = ctrl.options[1]
+        self.browser.getLink(self.value).click()
+        self.assertTrue(
+            '<span>3456.0</span>' in self.browser.contents)
+        self.payment_url = self.browser.url
+        self.browser.getLink("CollegePAY", index=0).click()
+        self.assertTrue('<input type="hidden" name="pay_item_id" value="101" />' in
+                           self.browser.contents)
+        self.assertTrue(
+            '<input type="hidden" name="amount" value="345600" />' in
+            self.browser.contents)
+        self.assertTrue(
+            'item_name="Acceptance Fee" item_amt="170600" bank_id="121" acct_num="1015666713"' in
             self.browser.contents)
 
@@ -92,5 +114,5 @@
         self.browser.open(self.payments_path + '/xyz')
         self.browser.getLink("CollegePAY", index=0).click()
-        self.assertMatches('...<input type="hidden" name="pay_item_id" value="0000" />...',
+        self.assertMatches('...<input type="hidden" name="pay_item_id" value="101" />...',
                            self.browser.contents)
         self.assertMatches('...Total Amount Authorized:...',
Index: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/locales/en/LC_MESSAGES/waeup.kofa.po
===================================================================
--- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/locales/en/LC_MESSAGES/waeup.kofa.po	(revision 15014)
+++ main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/locales/en/LC_MESSAGES/waeup.kofa.po	(revision 15015)
@@ -14,2 +14,18 @@
 msgid "Academics"
 msgstr "Schools"
+
+#: school_fee_1
+msgid "Initial School Fee"
+msgstr "Tuition Fee"
+
+#: school_fee_2
+msgid "Returning School Fee"
+msgstr "Tuition Fee 2 (not used)"
+
+#: school_fee_3
+msgid "Foreigner Initial School Fee"
+msgstr "Tuition Fee 3 (not used)"
+
+#: school_fee_4
+msgid "Foreigner Returning School Fee"
+msgstr "Tuition Fee 4 (not used)"
Index: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py
===================================================================
--- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py	(revision 15014)
+++ main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py	(revision 15015)
@@ -118,15 +118,8 @@
                 return _('Study course data are incomplete.'), None
             if previous_session:
-                # Students can pay for previous sessions in all
-                # workflow states.  Fresh students are excluded by the
-                # update method of the PreviousPaymentAddFormPage.
-                if previous_level == 100:
-                    amount = getattr(certificate, 'school_fee_1', 0.0)
-                else:
-                    amount = getattr(certificate, 'school_fee_2', 0.0)
+                amount = getattr(certificate, 'school_fee_1', 0.0)
             else:
-                if student.state == CLEARED:
-                    amount = getattr(certificate, 'school_fee_1', 0.0)
-                elif student.state == RETURNING:
+                amount = getattr(certificate, 'school_fee_1', 0.0)
+                if student.state == RETURNING:
                     # In case of returning school fee payment the
                     # payment session and level contain the values of
@@ -139,5 +132,5 @@
                             u'Session configuration object is not available.'
                             ), None
-                    amount = getattr(certificate, 'school_fee_2', 0.0)
+                    
                 elif student.is_postgrad and student.state == PAID:
                     # Returning postgraduate students also pay for the
@@ -150,5 +143,4 @@
                             u'Session configuration object is not available.'
                             ), None
-                    amount = getattr(certificate, 'school_fee_2', 0.0)
         elif category == 'clearance':
             try:
@@ -179,4 +171,8 @@
         elif category == 'siwess_combo':
             amount = academic_session.siwess_combo_fee
+        elif category == 'transcript':
+            amount = academic_session.transcript_fee
+        elif category == 'certificate':
+            amount = academic_session.certificate_fee
         if amount in (0.0, None):
             return _('Amount could not be determined.'), None
Index: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/utils/utils.py
===================================================================
--- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/utils/utils.py	(revision 15014)
+++ main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/utils/utils.py	(revision 15015)
@@ -33,5 +33,7 @@
         'ict_entre': 'ICT & Entrepreneur Fee',
         'logbook_combo': 'Logbook Combo Fee',
-        'siwess_combo': 'SIWESS Combo Fee'
+        'siwess_combo': 'SIWESS Combo Fee',
+        'transcript': 'Transcript Fee',
+        'certificate': 'Certificate Fee',
         }
 
