Changeset 9617 for main/waeup.kwarapoly/trunk/src
- Timestamp:
- 11 Nov 2012, 17:08:27 (12 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py
r9616 r9617 233 233 xmldict['institution_item_name'] = self.category 234 234 xmldict['institution_name'] = INSTITUTION_NAME 235 xmldict['institution_amt'] = 100 * self.context.amount_auth235 xmldict['institution_amt'] = 100 * (self.context.amount_auth -300) 236 236 xmldict['dalash_amt'] = 0 237 237 self.pay_item_id = '000' … … 259 259 self.context.amount_auth - 1200 - 300 - 1800) 260 260 261 elif 'maintenance' in self.context.p_category: 262 self.pay_item_id = '000' 263 xmldict['institution_acct'] = "0039050937" 264 xmldict['institution_bank_id'] = '31' 265 261 266 hashargs = ( 262 267 self.context.p_id + … … 269 274 270 275 # Interswitch amount is not part of the xml data 271 xmltext = """<payment_item_detail> 276 277 if self.context.p_category == 'schoolfee': 278 xmltext = """<payment_item_detail> 272 279 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 273 280 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> … … 276 283 </item_details> 277 284 </payment_item_detail>""" % xmldict 285 286 elif 'maintenance' in self.context.p_category: 287 xmltext = """<payment_item_detail> 288 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 289 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 290 </item_details> 291 </payment_item_detail>""" % xmldict 292 278 293 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 279 294 return -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r9616 r9617 171 171 self.browser.contents) 172 172 self.assertMatches( 173 '...item_name="Hostel Maintenance Fee" item_amt=" 98700" bank_id="0" acct_num="0000000000000"...',173 '...item_name="Hostel Maintenance Fee" item_amt="68700" bank_id="31" acct_num="0039050937"...', 174 174 self.browser.contents) 175 175 # BT does nor charge a fee for maintenance fee
Note: See TracChangeset for help on using the changeset viewer.