Index: main/waeup.custom/trunk/src/waeup/custom/students/tests/__init__.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/tests/__init__.py	(revision 7894)
+++ main/waeup.custom/trunk/src/waeup/custom/students/tests/__init__.py	(revision 7894)
@@ -0,0 +1,1 @@
+# Make this a package.
Index: main/waeup.custom/trunk/src/waeup/custom/students/tests/sample_student_data.csv
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/tests/sample_student_data.csv	(revision 7894)
+++ main/waeup.custom/trunk/src/waeup/custom/students/tests/sample_student_data.csv	(revision 7894)
@@ -0,0 +1,4 @@
+firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,lga,nationality
+Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234
+Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234
+Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234
Index: main/waeup.custom/trunk/src/waeup/custom/students/tests/test_interswitch.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/tests/test_interswitch.py	(revision 7894)
+++ main/waeup.custom/trunk/src/waeup/custom/students/tests/test_interswitch.py	(revision 7894)
@@ -0,0 +1,86 @@
+## $Id$
+##
+## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+import os
+import shutil
+import tempfile
+from hurry.workflow.interfaces import IWorkflowState
+from zope.component.hooks import setSite, clearSite
+from waeup.kofa.app import University
+from waeup.kofa.students.tests.test_browser import StudentsFullSetup
+from waeup.kofa.testing import FunctionalTestCase
+from waeup.kofa.students.batching import StudentProcessor as StudentProcessorBase
+from waeup.custom.students.batching import StudentProcessor
+from waeup.custom.testing import FunctionalLayer
+from waeup.custom.configuration import SessionConfiguration
+
+class StudentUITests(StudentsFullSetup):
+    """Tests for customized student class views and pages
+    """
+
+    layer = FunctionalLayer
+
+    def callback_url(self, payment_url, resp, apprAmt):
+        return payment_url + (
+            '/callback?echo=' +
+            '&resp=%s' +
+            '&desc=Something went wrong' +
+            '&txnRef=p1331792385335' +
+            '&payRef=' + '&retRef=' +
+            '&cardNum=0' +
+            '&apprAmt=%s' +
+            '&url=http://xyz') % (resp, apprAmt)
+
+    def test_manage_payments(self):
+
+        # Managers can add online payment tickets
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.payments_student_path)
+        IWorkflowState(self.student).setState('cleared')
+        self.browser.open(self.payments_student_path + '/addop')
+        self.browser.getControl("Create ticket").click()
+        self.assertMatches('...ticket created...',
+                           self.browser.contents)
+        ctrl = self.browser.getControl(name='val_id')
+        value = ctrl.options[0]
+        self.browser.getLink(value).click()
+        self.assertMatches('...Amount Authorized...',
+                           self.browser.contents)
+        payment_url = self.browser.url
+        
+        # Manager can access InterswitchForm
+        self.browser.getLink("CollegePAY", index=0).click()
+        self.assertMatches('...Total Amount Authorized:...',
+                           self.browser.contents)
+        self.assertMatches(
+            '...<input type="hidden" name="amount" value="4000000" />...',
+            self.browser.contents)
+
+        # Manager can call callback manually
+        self.browser.open(self.callback_url(payment_url, 'XX', '300'))
+        self.assertMatches('...Unsuccessful callback: Something went wrong...',
+                          self.browser.contents)
+        self.assertMatches('...Failed...',
+                           self.browser.contents)
+        self.browser.open(payment_url + '/callback')
+        self.assertMatches('...Unsuccessful callback: Incomplete query string...',
+                          self.browser.contents)
+        self.assertMatches('...Failed...',
+                           self.browser.contents)
+        self.browser.open(self.callback_url(payment_url, '00', '300'))
+        self.assertMatches('...Valid callback received...',
+                          self.browser.contents)
