Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py	(revision 15727)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py	(revision 15755)
@@ -34,4 +34,6 @@
 from kofacustom.nigeria.interfaces import MessageFactory as _
 
+GATEWAY_AMT = 300.0
+
 # Buttons
 
@@ -306,4 +308,5 @@
     xml_data = None
     hashvalue = None
+    gateway_amt = GATEWAY_AMT
 
     def init_update(self):
@@ -317,4 +320,6 @@
         if time_delta.days > 7:
             return _("This payment ticket is too old. Please create a new ticket.")
+        if self.context.r_company and self.context.r_company != 'interswitch':
+            return _("Payment ticket has been used for another payment gateway.")
         student = self.context.student
         certificate = getattr(student['studycourse'],'certificate',None)
@@ -326,5 +331,4 @@
             self.context.p_item, self.context.p_session):
             return _("This type of payment has already been made.")
-        self.amount_auth = int(100 * self.context.amount_auth)
         xmldict = {}
         if certificate is not None:
@@ -341,5 +345,4 @@
         self.student = student
         self.xmldict = xmldict
-        self.context.r_company = u'interswitch'
         return
 
@@ -351,4 +354,12 @@
             self.flash(error, type='danger')
             self.redirect(self.url(self.context, '@@index'))
+        # Already now it becomes an Interswitch 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'interswitch'
+        self.amount_auth = int(100 * self.context.amount_auth)
         return
 
@@ -363,5 +374,4 @@
     label = _('Submit data to CollegePAY (Interswitch Payment Gateway)')
     submit_button = _('Submit')
-    hashvalue = None
 
     action = None
@@ -371,4 +381,6 @@
     product_id = None
     xml_data = None
+    hashvalue = None
+    gateway_amt = GATEWAY_AMT
 
     def init_update(self):
@@ -379,4 +391,6 @@
             return _("Payment ticket can't be send to CollegePAY. "
                      "Application period has expired.")
+        if self.context.r_company and self.context.r_company != 'interswitch':
+            return _("Payment ticket has been used for another payment gateway.")
         tz = getUtility(IKofaUtils).tzinfo
         time_delta = datetime.utcnow() - self.context.creation_date
@@ -384,5 +398,4 @@
             return _("This payment ticket is too old. Please create a new ticket.")
         self.applicant = self.context.__parent__
-        self.amount_auth = int(100 * self.context.amount_auth)
         self.category = self.context.category
         tz = getUtility(IKofaUtils).tzinfo
@@ -390,5 +403,4 @@
             self.context.creation_date, tz).strftime("%Y-%m-%d %H:%M:%S %Z")
         self.site_redirect_url = self.url(self.context, 'request_webservice')
-        self.context.r_company = u'interswitch'
         return
 
@@ -400,3 +412,11 @@
             self.flash(error, type='danger')
             self.redirect(self.url(self.context, '@@index'))
-        return
+        # Already now it becomes an Interswitch 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'interswitch'
+        self.amount_auth = int(100 * self.context.amount_auth)
+        return
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py	(revision 15727)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py	(revision 15755)
@@ -103,9 +103,9 @@
         # Split amounts have been set.
         self.assertEqual(self.student['payments'][value].provider_amt, 0.0)
-        self.assertEqual(self.student['payments'][value].gateway_amt, 0.0)
+        self.assertEqual(self.student['payments'][value].gateway_amt, 300.0)
         self.assertMatches('...<input type="hidden" name="pay_item_id" />...',
                            self.browser.contents)
-        self.assertMatches(
-            '...<input type="hidden" name="amount" value="2000000" />...',
+        self.assertTrue(
+            '<input type="hidden" name="amount" value="2030000" />' in
             self.browser.contents)
 
@@ -118,6 +118,6 @@
                            self.browser.contents)
         self.assertEqual(self.student.current_mode, 'ug_ft')
-        self.assertMatches(
-            '...<input type="hidden" name="amount" value="4000000" />...',
+        self.assertTrue(
+            '<input type="hidden" name="amount" value="4030000" />' in
             self.browser.contents)
         delta = timedelta(days=8)
