Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/applicantsbrowser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/applicantsbrowser.py	(revision 15734)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/applicantsbrowser.py	(revision 15755)
@@ -33,5 +33,5 @@
 
 from kofacustom.nigeria.etranzact.tests import (
-    TERMINAL_ID, HOST, HTTPS, SECRET_KEY, LOGO_URL)
+    TERMINAL_ID, HOST, HTTPS, SECRET_KEY, LOGO_URL, GATEWAY_AMT)
 
 grok.templatedir('browser_templates')
@@ -93,4 +93,5 @@
     terminal_id = TERMINAL_ID
     logo_url = LOGO_URL
+    gateway_amt = GATEWAY_AMT
 
     @property
@@ -101,4 +102,6 @@
 
     def init_update(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            return _("Etranzact payments deactivated.")
         if self.context.p_state == 'paid':
             return _("Payment ticket can't be re-sent to Etranzact.")
@@ -116,7 +119,6 @@
         # which authenticates the response.
         self.responseurl = self.url(self.context, 'receive_etranzact')
-        # Already now it becomes a Etranzact payment
-        self.context.r_company = u'etranzact'
-        hashargs = 	self.amount + self.terminal_id+self.transaction_id \
+        self.transaction_id = self.context.p_id
+        hashargs = 	self.amount + self.terminal_id + self.transaction_id \
             + self.responseurl + self.secret_key
         self.hashvalue = hashlib.md5(hashargs).hexdigest()
@@ -125,7 +127,11 @@
 
     def update(self):
-        if not module_activated(self.context.__parent__.__parent__.year):
-            return
-        self.transaction_id = self.context.p_id
+        # Already now it becomes an Etranzact payment. We set the net amount
+        # and add the gateway amount.
+        if not self.context.r_company:
+            self.context.net_amt = self.context.amount_auth
+            self.context.amount_auth += self.gateway_amt
+            self.context.gateway_amt = self.gateway_amt
+            self.context.r_company = u'etranzact'
         self.amount = "%.1f" % self.context.amount_auth
         error = self.init_update()
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/helpers.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/helpers.py	(revision 15734)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/helpers.py	(revision 15755)
@@ -181,5 +181,4 @@
     payment.r_card_num = "%s %s" % (form.get('CARD_TYPE', None),
                                     form.get('CARD_NO', None))
-    payment.r_company = u'etranzact'
     if payment.r_code != '0':
         msg = _('Unsuccessful response: ${a}', mapping = {'a': payment.r_desc})
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py	(revision 15734)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py	(revision 15755)
@@ -39,5 +39,5 @@
 from kofacustom.nigeria.students.interfaces import INigeriaStudentOnlinePayment
 from kofacustom.nigeria.applicants.interfaces import INigeriaApplicantOnlinePayment
-from kofacustom.nigeria.etranzact.tests import HOST, TERMINAL_ID, HTTPS
+from kofacustom.nigeria.etranzact.tests import HOST, TERMINAL_ID, HTTPS, GATEWAY_AMT
 from kofacustom.nigeria.etranzact.helpers import query_payoutlet
 
@@ -84,5 +84,5 @@
 
 class EtranzactEnterPinPageStudent(KofaPage):
-    """
+    """Enter confirmation PIN and submit to `EtranzactQueryHistoryPageStudent`
     """
     grok.context(INigeriaStudentOnlinePayment)
@@ -95,13 +95,23 @@
     action = 'query_payoutlet_history'
     placeholder = _('Confirmation Number (PIN)')
+    gateway_amt = GATEWAY_AMT
 
     def update(self):
         if not module_activated(self.context.student.current_session):
             return
+        if self.context.r_company and self.context.r_company != 'etranzact':
+            return _("Payment ticket has been used for another payment gateway.")
         super(EtranzactEnterPinPageStudent, self).update()
+        # Already now it becomes an Etranzact payment. We set the net amount
+        # and add the gateway amount.
+        if not self.context.r_company:
+            self.context.net_amt = self.context.amount_auth
+            self.context.amount_auth += self.gateway_amt
+            self.context.gateway_amt = self.gateway_amt
+            self.context.r_company = u'etranzact'
         return
 
 class EtranzactEnterPinPageApplicant(EtranzactEnterPinPageStudent):
-    """
+    """Enter confirmation PIN and submit to `EtranzactQueryHistoryPageApplicant`
     """
     grok.require('waeup.payApplicant')
@@ -155,5 +165,4 @@
         if not module_activated(self.context.__parent__.__parent__.year):
             return
-        ob_class = self.__implemented__.__name__
         if self.context.p_state == 'paid':
             self.flash(_('This ticket has already been paid.'))
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/studentsbrowser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/studentsbrowser.py	(revision 15734)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/studentsbrowser.py	(revision 15755)
@@ -33,5 +33,5 @@
 
 from kofacustom.nigeria.etranzact.tests import (
-    TERMINAL_ID, HOST, HTTPS, SECRET_KEY, LOGO_URL)
+    TERMINAL_ID, HOST, HTTPS, SECRET_KEY, LOGO_URL, GATEWAY_AMT)
 
 grok.templatedir('browser_templates')
@@ -93,4 +93,5 @@
     terminal_id = TERMINAL_ID
     logo_url = LOGO_URL
+    gateway_amt = GATEWAY_AMT
 
     @property
@@ -101,4 +102,6 @@
 
     def init_update(self):
+        if not module_activated(self.context.student.current_session):
+            return _("Etranzact payments deactivated.")
         if self.context.p_state == 'paid':
             return _("Payment ticket can't be re-sent to Etranzact.")
@@ -116,7 +119,6 @@
         # which authenticates the response.
         self.responseurl = self.url(self.context, 'receive_etranzact')
-        # Already now it becomes a Etranzact payment
-        self.context.r_company = u'etranzact'
-        hashargs = 	self.amount + self.terminal_id+self.transaction_id \
+        self.transaction_id = self.context.p_id
+        hashargs = 	self.amount + self.terminal_id + self.transaction_id \
             + self.responseurl + self.secret_key
         self.hashvalue = hashlib.md5(hashargs).hexdigest()
@@ -125,7 +127,11 @@
 
     def update(self):
-        if not module_activated(self.context.student.current_session):
-            return
-        self.transaction_id = self.context.p_id
+        # Already now it becomes an Etranzact payment. We set the net amount
+        # and add the gateway amount.
+        if not self.context.r_company:
+            self.context.net_amt = self.context.amount_auth
+            self.context.amount_auth += self.gateway_amt
+            self.context.gateway_amt = self.gateway_amt
+            self.context.r_company = u'etranzact'
         self.amount = "%.1f" % self.context.amount_auth
         error = self.init_update()
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/tests.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/tests.py	(revision 15734)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/tests.py	(revision 15755)
@@ -41,5 +41,5 @@
 #   do exist really and are not bothered by being spammed by a test programme.
 
-EXTERNAL_TESTS = True
+EXTERNAL_TESTS = False
 
 TERMINAL_ID = '5003021194'
@@ -48,4 +48,5 @@
 SECRET_KEY = 'DEMO_KEY'
 LOGO_URL = 'https://iuokada.waeup.org/static_custom/iou_logo.png'
+GATEWAY_AMT = 500.0
 
 # Valid transaction id in Etranzact system
