Index: /main/waeup.aaua/trunk/CHANGES.txt
===================================================================
--- /main/waeup.aaua/trunk/CHANGES.txt	(revision 11636)
+++ /main/waeup.aaua/trunk/CHANGES.txt	(revision 11637)
@@ -4,4 +4,7 @@
 1.2dev (unreleased)
 ===================
+
+* Use base classes InterswitchPageApplicant and InterswitchPageStudent from
+  kofacustom.nigeria.
 
 * File input fields brought into shape with Bootstrap 3.
Index: /main/waeup.aaua/trunk/src/waeup/aaua/interswitch/browser.py
===================================================================
--- /main/waeup.aaua/trunk/src/waeup/aaua/interswitch/browser.py	(revision 11636)
+++ /main/waeup.aaua/trunk/src/waeup/aaua/interswitch/browser.py	(revision 11637)
@@ -20,11 +20,9 @@
 import grok
 from zope.interface import Interface
-from zope.component import getUtility, queryAdapter
+from zope.component import queryAdapter
 from kofacustom.nigeria.interswitch.browser import (
-    InterswitchPaymentRequestWebservicePageStudent
+    InterswitchPaymentRequestWebservicePageStudent,
+    InterswitchPageStudent
     )
-from waeup.kofa.browser.layout import KofaPage, UtilityView
-from waeup.kofa.interfaces import IKofaUtils
-from waeup.kofa.utils.helpers import to_timezone
 from waeup.aaua.students.interfaces import ICustomStudentOnlinePayment
 from waeup.aaua.applicants.interfaces import ICustomApplicantOnlinePayment
@@ -60,14 +58,10 @@
     return static['interswitch_verve_mastercard.gif']()
 
-class InterswitchPageStudent(KofaPage):
+class CustomInterswitchPageStudent(InterswitchPageStudent):
     """ View which sends a POST request to the Interswitch
     CollegePAY payment gateway.
     """
     grok.context(ICustomStudentOnlinePayment)
-    grok.name('goto_interswitch')
     grok.template('student_goto_interswitch')
-    grok.require('waeup.payStudent')
-    label = _('Submit data to CollegePAY (Interswitch Payment Gateway)')
-    submit_button = _('Submit')
     action = POST_ACTION
     site_name = SITE_NAME
@@ -80,25 +74,6 @@
 
     def update(self):
-        #if self.context.p_state != 'unpaid':
-        if self.context.p_state == 'paid':
-            self.flash(_("Payment ticket can't be re-send to CollegePAY."))
-            self.redirect(self.url(self.context, '@@index'))
-            return
-
-        student = self.student = self.context.student
-        certificate = getattr(student['studycourse'],'certificate',None)
-        self.amount_auth = 100 * self.context.amount_auth
-        xmldict = {}
-        if certificate is not None:
-            xmldict['department'] = certificate.__parent__.__parent__.code
-            xmldict['faculty'] = certificate.__parent__.__parent__.__parent__.code
-        else:
-            xmldict['department'] = None
-            xmldict['faculty'] = None
-        self.category = getUtility(IKofaUtils).PAYMENT_CATEGORIES[self.context.p_category]
-        tz = getUtility(IKofaUtils).tzinfo
-        self.local_date_time = to_timezone(
-            self.context.creation_date, tz).strftime("%Y-%m-%d %H:%M:%S %Z")
-        self.site_redirect_url = self.url(self.context, 'request_webservice')
+        student, certificate, xmldict = super(
+            CustomInterswitchPageStudent, self).update()
         # Provider data
         xmldict['detail_ref'] = self.context.p_id
@@ -157,5 +132,5 @@
         return
 
-class InterswitchPaymentRequestWebservicePageStudent(
+class CustomInterswitchPaymentRequestWebservicePageStudent(
     InterswitchPaymentRequestWebservicePageStudent):
     """ Request webservice view for the CollegePAY gateway
Index: in/waeup.aaua/trunk/src/waeup/aaua/interswitch/browser_templates/student_goto_interswitch.pt
===================================================================
--- /main/waeup.aaua/trunk/src/waeup/aaua/interswitch/browser_templates/student_goto_interswitch.pt	(revision 11636)
+++ 	(revision )
@@ -1,80 +1,0 @@
-<form i18n:domain="waeup.aaua"
-  tal:attributes="action view/action" method="POST">
-
-  <p i18n:translate="">
-    These data will be submitted to the CollegePAY payment gateway,
-    please check:
-  </p>
-
-  <table class="form-table" i18n:domain="waeup.kofa">
-    <thead>
-    </thead>
-    <tbody>
-      <tr>
-        <td i18n:translate="" class="fieldname">
-          Total Amount Authorized:</td>
-        <td>
-          <span tal:replace="view/context/amount_auth">AMOUNT</span>
-        </td>
-      </tr>
-      <tr>
-        <td i18n:translate="" class="fieldname">
-          Transaction Reference:</td>
-        <td>
-          <span tal:replace="view/context/p_id">TXNREF</span>
-        </td>
-      </tr>
-      <tr>
-        <td i18n:translate="" class="fieldname">
-          Customer Id:</td>
-        <td>
-          <span tal:replace="view/student/student_id">CUSTID</span>
-        </td>
-      </tr>
-      <tr>
-        <td i18n:translate="" class="fieldname">
-          Customer Name:</td>
-        <td>
-          <span tal:replace="view/student/display_fullname">CUSTNAME</span>
-        </td>
-      </tr>
-      <tr>
-        <td i18n:translate="" class="fieldname">
-          Payment Item:</td>
-        <td>
-          <span tal:replace="view/context/display_item">PAYMENTITEM</span>
-        </td>
-      </tr>
-      <tr>
-        <td i18n:translate="" class="fieldname">
-          Payment Category:</td>
-        <td>
-          <span tal:replace="view/category">PAYMENTCATEGORY</span>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-
-  <input type="hidden" name="product_id" tal:attributes="value view/product_id" />
-  <input type="hidden" name="currency" tal:attributes="value view/currency" />
-  <input type="hidden" name="pay_item_id" tal:attributes="value view/pay_item_id" />
-  <input type="hidden" name="site_redirect_url" tal:attributes="value view/site_redirect_url" />
-  <input type="hidden" name="site_name" tal:attributes="value view/site_name" />
-  <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" />
-  <input type="hidden" name="amount" tal:attributes="value view/amount_auth" />
-  <input type="hidden" name="txn_ref" tal:attributes="value view/context/p_id" />
-  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/display_item" />
-  <input type="hidden" name="cust_id_desc" tal:attributes="value view/category" />
-  <input type="hidden" name="cust_id" tal:attributes="value view/student/student_id" />
-  <input type="hidden" name="cust_name" tal:attributes="value view/student/display_fullname" />
-
-  <input type="hidden" name="payment_params" value="college_split" />
-  <span tal:replace="structure view/xml_data"></span>
-
-  <input type="submit" class="btn btn-primary" tal:attributes="value view/submit_button"/>
-
-  <br /><br />
-
-  <img src="/static/img/interswitch_verve_mastercard.gif" />
-
-</form>
