Index: main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py	(revision 13531)
+++ main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py	(revision 13532)
@@ -45,5 +45,4 @@
 HTTPS = True
 
-URL = '/paydirect/services/TransactionQueryWs.asmx'
 httplib.HTTPSConnection.debuglevel = 0
 
@@ -54,5 +53,10 @@
     return 0.0
 
-def contr_agreement(student):
+def contr_agreement_applicant(applicant):
+    if applicant.__parent__.code[:2] in ('fp', 'pt'):
+        return 'first'
+    return 'second'
+
+def contr_agreement_student(student):
     if student.current_mode == 'found' or student.current_mode.endswith('_pt'):
         return 'first'
@@ -69,6 +73,4 @@
     site_name = SITE_NAME
     currency = CURRENCY
-    pay_item_id = '101'
-    product_id = PRODUCT_ID_PT
     mac = '74424F1DFECD6058F153148255CDD55E16724B4F380ADB2C63C5D1D7A5675759010C8153DCB930AAF2D38903CBF7CE32B8A6BA2C16BBC46721DF2E3F3E4548E3'
 
@@ -80,4 +82,10 @@
             self.redirect(self.url(self.context, '@@index'))
             return
+        if contr_agreement_applicant(self.context.__parent__) == 'first':
+            self.product_id = PRODUCT_ID_PT
+            self.pay_item_id = '101'
+        else:
+            self.product_id = PRODUCT_ID_REGULAR
+            self.pay_item_id = '109'
         xmldict = {}
         provider_amt = 1000.0
@@ -91,5 +99,5 @@
         xmldict['institution_amt'] = 100 * (
             self.context.amount_auth - provider_amt - GATEWAY_AMT)
-        xmldict['institution_item_name'] = self.context.p_category
+        xmldict['institution_item_name'] = self.category
         xmldict['institution_name'] = INSTITUTION_NAME
         # Interswitch amount is not part of the xml data
@@ -106,5 +114,5 @@
         hashargs = (
             self.context.p_id +
-            PRODUCT_ID_PT +
+            self.product_id +
             self.pay_item_id +
             str(int(self.amount_auth)) +
@@ -123,5 +131,5 @@
     site_name = SITE_NAME
     currency = CURRENCY
-    pay_item_id = '101'
+    #pay_item_id = '101'
     #mac = '74424F1DFECD6058F153148255CDD55E16724B4F380ADB2C63C5D1D7A5675759010C8153DCB930AAF2D38903CBF7CE32B8A6BA2C16BBC46721DF2E3F3E4548E3'
     mac = '9718FA00B0F5070B388A9896ADCED9B2FB02D30F71E12E68BDADC63F6852A3496FF97D8A0F9DA9F753B911A49BB09BB87B55FD02046BD325C74C46C0123CF023'
@@ -148,5 +156,5 @@
             self.redirect(self.url(self.context, '@@index'))
             return
-        if contr_agreement(student) == 'first':
+        if contr_agreement_student(student) == 'first':
             self.product_id = PRODUCT_ID_PT
         else:
@@ -187,5 +195,5 @@
         # Schoolfee
         if self.context.p_category.startswith('schoolfee'):
-            if contr_agreement(student) == 'first':
+            if contr_agreement_student(student) == 'first':
                 # First agreement
                 provider_amt = 1900.0
@@ -262,5 +270,5 @@
         # Clearance
         elif self.context.p_category.startswith('clearance'):
-            if contr_agreement(student) == 'first':
+            if contr_agreement_student(student) == 'first':
                 # First agreement
                 if student.current_mode == 'found':
@@ -408,8 +416,14 @@
     """
     grok.context(ICustomApplicantOnlinePayment)
-    product_id = PRODUCT_ID_PT
     gateway_host = HOST
-    gateway_url = URL
+    gateway_url = '/paydirect/api/v1/gettransaction.json'
     https = HTTPS
+    mac = '74424F1DFECD6058F153148255CDD55E16724B4F380ADB2C63C5D1D7A5675759010C8153DCB930AAF2D38903CBF7CE32B8A6BA2C16BBC46721DF2E3F3E4548E3'
+
+    @property
+    def product_id(self):
+        if contr_agreement_applicant(self.context.__parent__) == 'first':
+            return PRODUCT_ID_PT
+        return PRODUCT_ID_REGULAR
 
 class CustomInterswitchPaymentRequestWebservicePageStudent(
@@ -425,5 +439,5 @@
     @property
     def product_id(self):
-        if contr_agreement(self.context.student) == 'first':
+        if contr_agreement_student(self.context.student) == 'first':
             return PRODUCT_ID_PT
         return PRODUCT_ID_REGULAR
Index: main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py	(revision 13531)
+++ main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py	(revision 13532)
@@ -59,21 +59,30 @@
         super(InterswitchTestsApplicants, self).fill_correct_values()
         self.browser.getControl(name="form.programme_type").value = ['regular']
-        self.applicantscontainer.application_fee = 1000.0
+        self.applicantscontainer.application_fee = 10000.0
         self.browser.getControl(name="form.nationality").value = ['NG']
         self.browser.getControl(name="transition").value = ['start']
         self.browser.getControl("Save").click()
+
+    def test_interswitch_form_regular(self):
         self.browser.getControl("Add online").click()
         self.assertTrue('ticket created' in self.browser.contents)
         #self.browser.getLink(value).click()
         self.assertTrue('Amount Authorized' in self.browser.contents)
-        self.assertTrue('<span>1000.0</span>' in self.browser.contents)
-        self.payment_url = self.browser.url
-
-    def test_interswitch_form(self):
-        # Manager can access InterswitchForm
-        self.browser.getLink("CollegePAY", index=0).click()
-        self.assertTrue('Total Amount Authorized:' in self.browser.contents)
-        self.assertTrue(
-            '<input type="hidden" name="amount" value="100000" />'
+        self.assertTrue('<span>10000.0</span>' in self.browser.contents)
+        self.payment_url = self.browser.url
+        # Manager can access InterswitchForm
+        self.browser.getLink("CollegePAY", index=0).click()
+        self.assertTrue('Total Amount Authorized:' in self.browser.contents)
+        self.assertTrue(
+            '<input type="hidden" name="amount" value="1000000" />'
+            in self.browser.contents)
+        self.assertTrue(
+            'item_name="BT Education" item_amt="100000"'
+            in self.browser.contents)
+        self.assertTrue(
+            'item_name="Application Fee" item_amt="875000" bank_id="117" acct_num="1010835352"'
+            in self.browser.contents)
+        self.assertTrue(
+            '<input type="hidden" name="product_id" value="5845" />'
             in self.browser.contents)
         delta = timedelta(days=8)
