Index: main/waeup.uniben/trunk/src/waeup/uniben/etranzact/browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/etranzact/browser.py	(revision 8259)
+++ main/waeup.uniben/trunk/src/waeup/uniben/etranzact/browser.py	(revision 8267)
@@ -30,8 +30,8 @@
 from waeup.uniben.applicants.interfaces import ICustomApplicantOnlinePayment
 
-
-TERMINAL_ID = '0500000003'
-QUERY_URL =   'https://www.etranzact.net/Query/queryPayoutletTransaction.jsp'
-
+#TERMINAL_ID = '0500000003'
+TERMINAL_ID = '0000000001'
+#QUERY_URL =   'https://www.etranzact.net/Query/queryPayoutletTransaction.jsp'
+QUERY_URL =   'http://demo.etranzact.com:8080/WebConnect/queryPayoutletTransaction.jsp'
 
 def query_etranzact(confirmation_number, user, payment, view):
Index: main/waeup.uniben/trunk/src/waeup/uniben/etranzact/tests.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/etranzact/tests.py	(revision 8259)
+++ main/waeup.uniben/trunk/src/waeup/uniben/etranzact/tests.py	(revision 8267)
@@ -18,4 +18,6 @@
 from hurry.workflow.interfaces import IWorkflowState
 from waeup.kofa.students.tests.test_browser import StudentsFullSetup
+from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
+from waeup.kofa.configuration import SessionConfiguration
 from waeup.uniben.testing import FunctionalLayer
 
@@ -24,5 +26,5 @@
 #   If you enable this, please make sure the external services
 #   do exist really and are not bothered by being spammed by a test programme.
-EXTERNAL_TESTS = False
+EXTERNAL_TESTS = True
 
 def external_test(func):
@@ -36,5 +38,5 @@
     return func
 
-class EtranzactTests(StudentsFullSetup):
+class EtranzactTestsStudent(StudentsFullSetup):
     """Tests for the eTranzact payment gateway.
     """
@@ -45,5 +47,5 @@
 
     def setUp(self):
-        super(EtranzactTests, self).setUp()
+        super(EtranzactTestsStudent, self).setUp()
         # Managers can add online payment tickets
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
@@ -72,11 +74,65 @@
         self.browser.open(self.payment_url + '/query_history?confirmation_number=%s'
             % self.CONFIRMATION_NO)
-        self.assertMatches('...Wrong amount...',
+        self.assertMatches('...Invalid or unsuccessful callback:...',
                           self.browser.contents)
+        #self.assertMatches('...Wrong amount...',
+        #                  self.browser.contents)
+        #self.student['payments'][value].amount_auth = self.student[
+        #    'payments'][value].r_amount_approved
+        #self.browser.open(self.payment_url + '/query_history?confirmation_number=%s'
+        #    % self.CONFIRMATION_NO)
+        #self.assertMatches('...Wrong transaction id...',
+        #                  self.browser.contents)
 
-        self.student['payments'][value].amount_auth = self.student[
-            'payments'][value].r_amount_approved
+class EtranzactTestsApplicants(ApplicantsFullSetup):
+    """Tests for the Interswitch payment gateway.
+    """
+
+    layer = FunctionalLayer
+
+    CONFIRMATION_NO = '500856521315472785095'
+
+    def setUp(self):
+        super(EtranzactTestsApplicants, self).setUp()
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.manage_path)
+        #IWorkflowState(self.student).setState('started')
+        super(EtranzactTestsApplicants, self).fill_correct_values()
+        self.browser.getControl(name="transition").value = ['start']
+        self.browser.getControl("Save").click()
+        self.browser.getControl("Add online").click()
+        self.assertTrue(
+            'Session configuration object is not available'
+            in self.browser.contents)
+        configuration = SessionConfiguration()
+        configuration.academic_session = 2009
+        configuration.application_fee = 1000.0
+        self.app['configuration'].addSessionConfiguration(configuration)
+        self.browser.getControl("Add online").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)
+        self.assertMatches(
+            '...<span>1000.0</span>...',
+            self.browser.contents)
+        self.payment_url = self.browser.url
+
+    @external_test
+    def test_etranzact_query_history(self):
+
         self.browser.open(self.payment_url + '/query_history?confirmation_number=%s'
             % self.CONFIRMATION_NO)
-        self.assertMatches('...Wrong transaction id...',
+        self.assertMatches('...Invalid or unsuccessful callback:...',
                           self.browser.contents)
+        #self.assertMatches('...Wrong amount...',
+        #                  self.browser.contents)
+        #self.applicant[value].amount_auth = self.applicant[
+        #    value].r_amount_approved
+        #self.browser.open(self.payment_url + '/query_history?confirmation_number=%s'
+        #    % self.CONFIRMATION_NO)
+        #self.assertMatches('...Wrong transaction id...',
+        #                  self.browser.contents)
