Index: main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py
===================================================================
--- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py	(revision 11678)
+++ main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py	(revision 11682)
@@ -244,4 +244,5 @@
         provider_amt = 300.0
         dalash_amt = 200.0
+        gateway_amt = GATEWAY_AMT
         if self.applicant.applicant_id.startswith('hnd'):
             xmldict['institution_acct'] = '1771440667'
@@ -341,6 +342,6 @@
         xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
         xmldict['institution_amt'] = 100 * (
-            self.context.amount_auth - provider_amt - GATEWAY_AMT - dalash_amt)
-        xmldict['institution_item_name'] = self.context.p_category
+            self.context.amount_auth - provider_amt - gateway_amt - dalash_amt)
+        xmldict['institution_item_name'] = self.category
         xmldict['institution_name'] = INSTITUTION_NAME
 
@@ -374,5 +375,5 @@
         self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
         self.context.provider_amt = provider_amt
-        self.context.gateway_amt = GATEWAY_AMT
+        self.context.gateway_amt = gateway_amt
         self.context.thirdparty_amt = dalash_amt
         return
Index: main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
===================================================================
--- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py	(revision 11678)
+++ main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py	(revision 11682)
@@ -371,4 +371,22 @@
         self.assertEqual(self.student['payments'][value].thirdparty_amt, 200.0)
 
+        self.app['configuration']['2004'].loss_idcard_fee = 3000.0
+        self.browser.open(self.payments_path + '/addop')
+        self.browser.getControl(name="form.p_category").value = ['loss_idcard']
+        self.browser.getControl("Create ticket").click()
+        ctrl = self.browser.getControl(name='val_id')
+        value = ctrl.options[6]
+        self.browser.getLink(value).click()
+        self.assertMatches('...Amount Authorized...', self.browser.contents)
+        self.assertMatches(
+            '...<span>3000.0</span>...', self.browser.contents)
+        self.payment_url = self.browser.url
+        self.browser.getLink("CollegePAY", index=0).click()
+        self.assertEqual(self.student['payments'][value].amount_auth, 3000.0)
+        self.assertEqual(self.student['payments'][value].provider_amt, 9.0)
+        self.assertEqual(self.student['payments'][value].gateway_amt, 15.0)
+        self.assertEqual(self.student['payments'][value].thirdparty_amt, 6.0)
+
+
     @external_test
     def test_webservice(self):
@@ -511,5 +529,5 @@
             in self.browser.contents)
         self.assertTrue(
-            '<item_detail item_id="1" item_name="application" '
+            '<item_detail item_id="1" item_name="Application Fee" '
             'item_amt="253300" bank_id="120" acct_num="1771440667" />'
             in self.browser.contents)
@@ -523,5 +541,5 @@
         self.browser.getLink("CollegePAY", index=0).click()
         self.assertTrue(
-            '<item_detail item_id="1" item_name="application" '
+            '<item_detail item_id="1" item_name="Application Fee" '
             'item_amt="253300" bank_id="120" acct_num="1771440667" />'
             in self.browser.contents)
@@ -544,5 +562,5 @@
         self.browser.getLink("CollegePAY", index=0).click()
         self.assertTrue(
-            '<item_detail item_id="1" item_name="application" '
+            '<item_detail item_id="1" item_name="Application Fee" '
             'item_amt="303300" bank_id="8" acct_num="2013910271" />'
             in self.browser.contents)
@@ -559,5 +577,5 @@
         self.browser.getLink("CollegePAY", index=0).click()
         self.assertTrue(
-            '<item_detail item_id="1" item_name="application" '
+            '<item_detail item_id="1" item_name="Application Fee" '
             'item_amt="303300" bank_id="10" acct_num="0106259811" />'
             in self.browser.contents)
@@ -606,5 +624,5 @@
         self.browser.getLink("CollegePAY", index=0).click()
         self.assertTrue(
-            '<item_detail item_id="1" item_name="transcript_local" '
+            '<item_detail item_id="1" item_name="ND Transcript (local)" '
             'item_amt="450000" bank_id="9" acct_num="7000016724" />'
             in self.browser.contents)
