- Timestamp:
- 22 Oct 2012, 13:03:07 (12 years ago)
- Location:
- main/waeup.futminna/trunk/src/waeup/futminna/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/interswitch/browser.py
r9292 r9386 227 227 if self.context.student.current_mode == 'jm_ft': 228 228 xmldict['institution_acct'] = "000000000000" 229 xmldict['institution_bank_id'] = '0 '229 xmldict['institution_bank_id'] = '00' 230 230 elif self.context.student.current_mode == 'pg_ft': 231 231 xmldict['institution_acct'] = "2522040000134" … … 265 265 self.pay_item_id = "11706" 266 266 267 xmldict['institution_item_name'] = self.context.p_category268 267 xmldict['institution_name'] = INSTITUTION_NAME 269 268 # Interswitch amount is not part of the xml data … … 272 271 xmltext = """<payment_item_detail> 273 272 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 274 <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" />273 <item_detail item_id="1" item_name="School Fee" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 275 274 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 276 275 </item_details> … … 279 278 xmltext = """<payment_item_detail> 280 279 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 281 <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" />280 <item_detail item_id="1" item_name="Acceptance Fee" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 282 281 </item_details> 283 282 </payment_item_detail>""" % xmldict -
main/waeup.futminna/trunk/src/waeup/futminna/interswitch/tests.py
r9285 r9386 50 50 IWorkflowState(self.student).setState('cleared') 51 51 self.browser.open(self.payments_path + '/addop') 52 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 52 53 self.browser.getControl("Create ticket").click() 53 54 self.assertMatches('...Payment ticket created...', 54 55 self.browser.contents) 56 57 def test_interswitch_form(self): 58 # School fee ticket already created in setUp method 55 59 ctrl = self.browser.getControl(name='val_id') 56 60 value = ctrl.options[0] … … 63 67 self.payment_url = self.browser.url 64 68 65 def test_interswitch_form(self):66 67 69 # Manager can access InterswitchForm 68 70 self.browser.getLink("CollegePAY", index=0).click() 71 # The total amount to be processed by Interswitch 72 # has been reduced by the Interswitch fee of 150 Nairas 69 73 self.assertMatches('...Total Amount Authorized:...', 70 74 self.browser.contents) … … 72 76 '...<input type="hidden" name="amount" value="13150000.0" />...', 73 77 self.browser.contents) 78 self.assertMatches( 79 '...item_name="School Fee" item_amt="12970000" bank_id="89" acct_num="0030001000017110"...', 80 self.browser.contents) 81 self.assertMatches( 82 '...item_name="BT Education" item_amt="150000" bank_id="89" acct_num="0061001000021095"...', 83 self.browser.contents) 84 85 # Create clearance fee ticket 86 self.browser.open(self.payments_path + '/addop') 87 self.browser.getControl(name="form.p_category").value = ['clearance'] 88 self.browser.getControl("Create ticket").click() 89 self.assertMatches('...ticket created...', 90 self.browser.contents) 91 ctrl = self.browser.getControl(name='val_id') 92 value = ctrl.options[1] 93 self.browser.getLink(value).click() 94 self.assertMatches('...Amount Authorized...', 95 self.browser.contents) 96 self.assertMatches( 97 '...<span>20000.0</span>...', 98 self.browser.contents) 99 # Manager can access InterswitchForm 100 self.browser.getLink("CollegePAY", index=0).click() 101 self.assertMatches('...Total Amount Authorized:...', 102 self.browser.contents) 103 # The total amount to be processed by Interswitch 104 # has been reduced by the Interswitch fee of 150 Nairas 105 self.assertMatches('...Total Amount Authorized:...', 106 self.browser.contents) 107 self.assertMatches( 108 '...<input type="hidden" name="amount" value="2000000.0" />...', 109 self.browser.contents) 110 self.assertMatches( 111 '...item_name="Acceptance Fee" item_amt="1970000" bank_id="120" acct_num="1750005063"...', 112 self.browser.contents) 113 # BT does nor charge a fee for clearance 114 self.assertFalse("BT Education" in self.browser.contents) 115 74 116 75 117 @external_test
Note: See TracChangeset for help on using the changeset viewer.