- Timestamp:
- 15 Oct 2015, 10:46:38 (9 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
r13237 r13329 51 51 httplib.HTTPConnection.debuglevel = 0 52 52 53 #All special payments moved to Skye Bank on 03-09-201553 #All special payments moved to GTBank on 15-10-2015 54 54 SPECIAL_PAYMENT_PARAMS = { 55 'certificate': ('111', 200.0, 300.0, ' 1771440667', '120'),56 'state_result': ('112', 200.0, 300.0, ' 1771440667', '120'),57 'transcript_local': ('113', 200.0, 300.0, ' 1771440667', '120'),58 'transcript_foreign': ('114', 200.0, 300.0, ' 1771440667', '120'),59 'ver_result': ('115', 200.0, 300.0, ' 1771440667', '120'),60 'change_course': ('116', 200.0, 300.0, ' 1771440667', '120'),61 'change_inst': ('117', 200.0, 300.0, ' 1771440667', '120'),62 'jamb_reject': ('118', 200.0, 300.0, ' 1771440667', '120'),63 'cert_of_cert': ('119', 200.0, 300.0, ' 1771440667', '120'),64 'ref_let': ('120', 200.0, 300.0, ' 1771440667', '120'),65 'proc_cert': ('121', 200.0, 300.0, ' 1771440667', '120'),66 'loss_idcard': ('122', 6.0, 9.0, ' 1771440667', '120'),67 'loss_examcard': ('123', 3.0, 4.5, ' 1771440667', '120'),68 'loss_result': ('124', 200.0, 300.0, ' 1771440667', '120'),69 'loss_receipt': ('125', 200.0, 300.0, ' 1771440667', '120'),70 'loss_clearance': ('126', 200.0, 300.0, ' 1771440667', '120'),71 'conv_brochure': ('127', 200.0, 300.0, ' 1771440667', '120'),72 'hnd_certificate': ('128', 200.0, 300.0, ' 1771440667', '120'),73 'hnd_state_result': ('129', 200.0, 300.0, ' 1771440667', '120'),74 'hnd_transcript_local': ('130', 200.0, 300.0, ' 1771440667', '120'),75 'hnd_transcript_foreign': ('131', 200.0, 300.0, ' 1771440667', '120'),76 'staff_loss_idcard': ('132', 6.0, 9.0, ' 1771440667', '120'),77 'hnd_conv_brochure': ('133', 200.0, 300.0, ' 1771440667', '120'),78 'pgd_state_result': ('134', 200.0, 300.0, ' 1771440667', '120'),79 'pgd_conv_brochure': ('135', 200.0, 300.0, ' 1771440667', '120'),80 'pgd_certificate': ('136', 200.0, 300.0, ' 1771440667', '120'),81 'log_book': ('137', 3.0, 4.5, ' 1771440667', '120'),82 'pgd_transcript_foreign': ('138', 200.0, 300.0, ' 1771440667', '120'),83 'pgd_transcript_local': ('139', 200.0, 300.0, ' 1771440667', '120'),84 'jamb_regularization': ('140', 200.0, 300.0, ' 1771440667', '120'),85 'utme_registration': ('142', 6.0, 9.0, ' 1771440667', '120'),86 'utme_cbt': ('143', 6.0, 9.0, ' 1771440667', '120'),87 'nysc_id_card': ('144', 6.0, 9.0, ' 1771440667', '120'),55 'certificate': ('111', 200.0, 300.0, '0106259811', '10'), 56 'state_result': ('112', 200.0, 300.0, '0106259811', '10'), 57 'transcript_local': ('113', 200.0, 300.0, '0106259811', '10'), 58 'transcript_foreign': ('114', 200.0, 300.0, '0106259811', '10'), 59 'ver_result': ('115', 200.0, 300.0, '0106259811', '10'), 60 'change_course': ('116', 200.0, 300.0, '0106259811', '10'), 61 'change_inst': ('117', 200.0, 300.0, '0106259811', '10'), 62 'jamb_reject': ('118', 200.0, 300.0, '0106259811', '10'), 63 'cert_of_cert': ('119', 200.0, 300.0, '0106259811', '10'), 64 'ref_let': ('120', 200.0, 300.0, '0106259811', '10'), 65 'proc_cert': ('121', 200.0, 300.0, '0106259811', '10'), 66 'loss_idcard': ('122', 6.0, 9.0, '0106259811', '10'), 67 'loss_examcard': ('123', 3.0, 4.5, '0106259811', '10'), 68 'loss_result': ('124', 200.0, 300.0, '0106259811', '10'), 69 'loss_receipt': ('125', 200.0, 300.0, '0106259811', '10'), 70 'loss_clearance': ('126', 200.0, 300.0, '0106259811', '10'), 71 'conv_brochure': ('127', 200.0, 300.0, '0106259811', '10'), 72 'hnd_certificate': ('128', 200.0, 300.0, '0106259811', '10'), 73 'hnd_state_result': ('129', 200.0, 300.0, '0106259811', '10'), 74 'hnd_transcript_local': ('130', 200.0, 300.0, '0106259811', '10'), 75 'hnd_transcript_foreign': ('131', 200.0, 300.0, '0106259811', '10'), 76 'staff_loss_idcard': ('132', 6.0, 9.0, '0106259811', '10'), 77 'hnd_conv_brochure': ('133', 200.0, 300.0, '0106259811', '10'), 78 'pgd_state_result': ('134', 200.0, 300.0, '0106259811', '10'), 79 'pgd_conv_brochure': ('135', 200.0, 300.0, '0106259811', '10'), 80 'pgd_certificate': ('136', 200.0, 300.0, '0106259811', '10'), 81 'log_book': ('137', 3.0, 4.5, '0106259811', '10'), 82 'pgd_transcript_foreign': ('138', 200.0, 300.0, '0106259811', '10'), 83 'pgd_transcript_local': ('139', 200.0, 300.0, '0106259811', '10'), 84 'jamb_regularization': ('140', 200.0, 300.0, '0106259811', '10'), 85 'utme_registration': ('142', 6.0, 9.0, '0106259811', '10'), 86 'utme_cbt': ('143', 6.0, 9.0, '0106259811', '10'), 87 'nysc_id_card': ('144', 6.0, 9.0, '0106259811', '10'), 88 88 } 89 89 … … 121 121 gateway_amt = GATEWAY_AMT 122 122 self.pay_item_id = '000' 123 xmldict['institution_acct'] = " 1751084083"124 xmldict['institution_bank_id'] = "1 20"123 xmldict['institution_acct'] = "0106259811" 124 xmldict['institution_bank_id'] = "10" 125 125 if self.context.p_category == 'schoolfee': 126 126 self.pay_item_id = '101' 127 127 dalash_amt = 1800.0 128 128 provider_amt = 1200.0 129 if not student.current_mode.endswith('_ pt'):129 if not student.current_mode.endswith('_we'): 130 130 if xmldict['faculty'] in ('CPGS',): 131 xmldict['institution_acct'] = " 1771586608" #changed account no. from 1771180233132 xmldict['institution_bank_id'] = '1 20'131 xmldict['institution_acct'] = "0106259811" 132 xmldict['institution_bank_id'] = '10' 133 133 elif xmldict['faculty'] in ('IAS',): 134 xmldict['institution_acct'] = " 1771586608" #Changed from FBN to SKYE Bank135 xmldict['institution_bank_id'] = '1 20'134 xmldict['institution_acct'] = "0106259811" 135 xmldict['institution_bank_id'] = '10' 136 136 self.pay_item_id = '107' 137 137 elif xmldict['faculty'] in ('IES',): 138 xmldict['institution_acct'] = "0 693033406" #Changed from FBN to Access Bank139 xmldict['institution_bank_id'] = ' 31'138 xmldict['institution_acct'] = "0106259811" 139 xmldict['institution_bank_id'] = '10' 140 140 self.pay_item_id = '109' 141 141 elif xmldict['faculty'] in ('IFMS',): 142 xmldict['institution_acct'] = " 2013910271" #changed bank from GTBank to FBN143 xmldict['institution_bank_id'] = ' 8'142 xmldict['institution_acct'] = "0106259811" 143 xmldict['institution_bank_id'] = '10' 144 144 self.pay_item_id = '106' 145 145 elif xmldict['faculty'] in ('IOT',): 146 xmldict['institution_acct'] = "0106259811" #changed from SKYE Bank to GTbank146 xmldict['institution_acct'] = "0106259811" 147 147 xmldict['institution_bank_id'] = '10' 148 148 self.pay_item_id = '110' 149 149 elif xmldict['faculty'] in ('IICT',): 150 xmldict['institution_acct'] = " 1100019929" #changed from FBN to Keystone Bank151 xmldict['institution_bank_id'] = '1 23'150 xmldict['institution_acct'] = "0106259811" 151 xmldict['institution_bank_id'] = '10' 152 152 self.pay_item_id = '108' 153 153 else: 154 xmldict['institution_acct'] = "0 838798020" #part-time fees acquired by FCMB155 xmldict['institution_bank_id'] = ' 76'154 xmldict['institution_acct'] = "0106259811" 155 xmldict['institution_bank_id'] = '10' 156 156 #Introduce a pay_item_id for part-time for the first time on this portal 157 157 self.pay_item_id = '145' … … 166 166 elif 'maintenance' in self.context.p_category: 167 167 self.pay_item_id = '102' 168 xmldict['institution_acct'] = "0 039050937"169 xmldict['institution_bank_id'] = ' 31'168 xmldict['institution_acct'] = "0106259811" 169 xmldict['institution_bank_id'] = '10' 170 170 dalash_amt = 0.0 171 171 provider_amt = 0.0 … … 239 239 xmldict['institution_bank_id'] = '00' 240 240 if self.applicant.applicant_id.startswith('hnd'): 241 xmldict['institution_acct'] = ' 1771440667'242 xmldict['institution_bank_id'] = '1 20'241 xmldict['institution_acct'] = '0106259811' 242 xmldict['institution_bank_id'] = '10' 243 243 elif self.applicant.applicant_id.startswith('nd'): 244 xmldict['institution_acct'] = ' 1771440667'245 xmldict['institution_bank_id'] = '1 20'244 xmldict['institution_acct'] = '0106259811' 245 xmldict['institution_bank_id'] = '10' 246 246 elif self.applicant.applicant_id.startswith('rmd'): 247 xmldict['institution_acct'] = ' 1771440667'248 xmldict['institution_bank_id'] = '1 20'247 xmldict['institution_acct'] = '0106259811' 248 xmldict['institution_bank_id'] = '10' 249 249 elif self.applicant.applicant_id.startswith('pgft'): 250 xmldict['institution_acct'] = ' 1751084083'251 xmldict['institution_bank_id'] = '1 20'250 xmldict['institution_acct'] = '0106259811' 251 xmldict['institution_bank_id'] = '10' 252 252 elif self.applicant.applicant_id.startswith('prejambites') or \ 253 253 self.applicant.applicant_id.startswith('putme'): 254 # reverting for prejambites to GTBank '0106259811' from FBN '2013910271'255 254 xmldict['institution_acct'] = '0106259811' 256 255 xmldict['institution_bank_id'] = '10' 257 256 self.pay_item_id = '104' 258 # Until 14/9/2014 we have not sent split amount data for pre applications.259 # To compenstate the loss we temporarily doubled the split amounts260 # until 20/9/2014, see ticket 75.261 #provider_amt = 600.0262 #dalash_amt = 400.0263 257 elif self.applicant.applicant_id.startswith('pre'): 264 # changed for pre-applicants from GTBank '0106259811' to Skye Bank '1771440667' 265 xmldict['institution_acct'] = '1771440667' 266 xmldict['institution_bank_id'] = '120' 267 # Until 14/9/2014 we have not sent split amount data for pre applications. 268 # To compenstate the loss we temporarily doubled the split amounts 269 # until 20/9/2014, see ticket 75. 270 #provider_amt = 600.0 271 #dalash_amt = 400.0 258 xmldict['institution_acct'] = '0106259811' 259 xmldict['institution_bank_id'] = '10' 272 260 elif self.applicant.applicant_id.startswith('special'): 273 261 if self.context.p_category in SPECIAL_PAYMENT_PARAMS.keys(): -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r13306 r13329 111 111 self.assertMatches('...Amount Authorized...', 112 112 self.browser.contents) 113 self.assertMatches( 114 '...<span>39400.0</span>...', 115 self.browser.contents) 113 self.assertTrue( 114 '<span>39400.0</span>' in self.browser.contents) 116 115 self.payment_url = self.browser.url 117 116 … … 146 145 self.browser.getLink(self.value).click() 147 146 self.assertMatches('...Amount Authorized...', self.browser.contents) 148 self.assertMatches( 149 '...<span>31500.0</span>...', 150 self.browser.contents) 147 self.assertTrue( 148 '<span>31500.0</span>' in self.browser.contents) 151 149 self.payment_url = self.browser.url 152 150 … … 166 164 self.browser.contents) 167 165 self.assertTrue( 168 'item_name="School Fee" item_amt="2820000" bank_id="1 20" acct_num="1771586608"' in166 'item_name="School Fee" item_amt="2820000" bank_id="10" acct_num="0106259811"' in 169 167 self.browser.contents) 170 168 self.assertTrue( … … 208 206 self.browser.contents) 209 207 # Maint fee is taken from the hostel object 210 self.assertMatches( 211 '...<span>876.0</span>...', 212 self.browser.contents) 208 self.assertTrue('<span>876.0</span>' in self.browser.contents) 213 209 self.payment_url = self.browser.url 214 210 # Manager can access InterswitchForm … … 222 218 self.assertMatches('...Total Amount Authorized:...', 223 219 self.browser.contents) 224 self.assert Matches(225 ' ...<input type="hidden" name="pay_item_id" value="102" />...',226 self.browser.contents) 227 self.assert Matches(228 ' ...<input type="hidden" name="amount" value="87600" />...',229 self.browser.contents) 230 self.assert Matches(231 ' ...item_name="Hostel Maintenance" item_amt="57600" bank_id="31" acct_num="0039050937"...',220 self.assertTrue( 221 '<input type="hidden" name="pay_item_id" value="102" />' in 222 self.browser.contents) 223 self.assertTrue( 224 '<input type="hidden" name="amount" value="87600" />' in 225 self.browser.contents) 226 self.assertTrue( 227 'item_name="Hostel Maintenance" item_amt="57600" bank_id="10" acct_num="0106259811"' in 232 228 self.browser.contents) 233 229 … … 239 235 value = ctrl.options[2] 240 236 self.browser.getLink(value).click() 241 self.assertMatches( 242 '...<span>6000.0</span>...', 243 self.browser.contents) 237 self.assertTrue('<span>6000.0</span>' in self.browser.contents) 244 238 # Manager can access InterswitchForm 245 239 self.browser.getLink("CollegePAY", index=0).click() … … 248 242 self.assertEqual(self.student['payments'][self.value].gateway_amt, 300.0) 249 243 self.assertEqual(self.student['payments'][self.value].thirdparty_amt, 1800.0) 250 self.assert Matches('...<input type="hidden" name="pay_item_id" value="101" />...',244 self.assertTrue('<input type="hidden" name="pay_item_id" value="101" />' in 251 245 self.browser.contents) 252 246 self.assertMatches('...Total Amount Authorized:...', 253 247 self.browser.contents) 254 self.assert Matches(255 ' ...<input type="hidden" name="amount" value="600000" />...',256 self.browser.contents) 257 self.assert Matches(258 ' ...item_name="School Fee" item_amt="270000" bank_id="120" acct_num="1771586608"...',259 self.browser.contents) 260 self.assert Matches(261 ' ...item_name="Dalash" item_amt="180000" bank_id="117" acct_num="1013196791"...',262 self.browser.contents) 263 self.assert Matches(264 ' ...item_name="BT Education" item_amt="120000" bank_id="117" acct_num="1010764827"...',248 self.assertTrue( 249 '<input type="hidden" name="amount" value="600000" />' in 250 self.browser.contents) 251 self.assertTrue( 252 'item_name="School Fee" item_amt="270000" bank_id="10" acct_num="0106259811"' in 253 self.browser.contents) 254 self.assertTrue( 255 'item_name="Dalash" item_amt="180000" bank_id="117" acct_num="1013196791"' in 256 self.browser.contents) 257 self.assertTrue( 258 'item_name="BT Education" item_amt="120000" bank_id="117" acct_num="1010764827"' in 265 259 self.browser.contents) 266 260 … … 278 272 self.browser.getLink(value).click() 279 273 self.assertMatches('...Amount Authorized...', self.browser.contents) 280 self.assertMatches( 281 '...<span>6800.0</span>...', self.browser.contents) 274 self.assertTrue('<span>6800.0</span>' in self.browser.contents) 282 275 self.browser.getLink("CollegePAY", index=0).click() 283 276 self.assertEqual(self.student['payments'][value].amount_auth, 6800.0) … … 294 287 self.browser.getLink(value).click() 295 288 self.assertMatches('...Amount Authorized...', self.browser.contents) 296 self.assertMatches( 297 '...<span>5000.0</span>...', self.browser.contents) 289 self.assertTrue('<span>5000.0</span>' in self.browser.contents) 298 290 self.payment_url = self.browser.url 299 291 self.browser.getLink("CollegePAY", index=0).click() … … 311 303 self.browser.getLink(value).click() 312 304 self.assertMatches('...Amount Authorized...', self.browser.contents) 313 self.assert Matches(314 ' ...<span>1015.0</span>...',self.browser.contents)305 self.assertTrue( 306 '<span>1015.0</span>' in self.browser.contents) 315 307 self.payment_url = self.browser.url 316 308 self.browser.getLink("CollegePAY", index=0).click() … … 328 320 self.browser.getLink(value).click() 329 321 self.assertMatches('...Amount Authorized...', self.browser.contents) 330 self.assertMatches( 331 '...<span>500.0</span>...', self.browser.contents) 322 self.assertTrue('<span>500.0</span>' in self.browser.contents) 332 323 self.payment_url = self.browser.url 333 324 self.browser.getLink("CollegePAY", index=0).click() … … 345 336 self.browser.getLink(value).click() 346 337 self.assertMatches('...Amount Authorized...', self.browser.contents) 347 self.assertMatches( 348 '...<span>6000.0</span>...', self.browser.contents) 338 self.assertTrue('<span>6000.0</span>' in self.browser.contents) 349 339 self.payment_url = self.browser.url 350 340 self.browser.getLink("CollegePAY", index=0).click() … … 362 352 self.browser.getLink(value).click() 363 353 self.assertMatches('...Amount Authorized...', self.browser.contents) 364 self.assertMatches( 365 '...<span>7000.0</span>...', self.browser.contents) 354 self.assertTrue('<span>7000.0</span>' in self.browser.contents) 366 355 self.payment_url = self.browser.url 367 356 self.browser.getLink("CollegePAY", index=0).click() … … 379 368 self.browser.getLink(value).click() 380 369 self.assertMatches('...Amount Authorized...', self.browser.contents) 381 self.assertMatches( 382 '...<span>1900.0</span>...', self.browser.contents) 370 self.assertTrue('<span>1900.0</span>' in self.browser.contents) 383 371 self.payment_url = self.browser.url 384 372 self.browser.getLink("CollegePAY", index=0).click() … … 400 388 self.browser.open(self.payments_path + '/xyz') 401 389 self.browser.getLink("CollegePAY", index=0).click() 402 self.assert Matches('...<input type="hidden" name="pay_item_id" value="000" />...',403 self.browser.contents)390 self.assertTrue('<input type="hidden" name="pay_item_id" value="000" />' 391 in self.browser.contents) 404 392 self.assertMatches('...Total Amount Authorized:...', 405 393 self.browser.contents) 406 394 self.assertEqual(self.student.current_mode, 'nd_ft') 407 self.assert Matches(408 ' ...<input type="hidden" name="amount" value="87600" />...',395 self.assertTrue( 396 '<input type="hidden" name="amount" value="87600" />' in 409 397 self.browser.contents) 410 398 delta = timedelta(days=8) … … 546 534 self.assertMatches('...Amount Authorized...', 547 535 self.browser.contents) 548 self.assertMatches( 549 '...<span>3333.0</span>...', 550 self.browser.contents) 536 self.assertTrue('<span>3333.0</span>' in self.browser.contents) 551 537 self.payment_url = self.browser.url 552 538 … … 563 549 self.assertTrue( 564 550 '<item_detail item_id="1" item_name="Application" ' 565 'item_amt="253300" bank_id="1 20" acct_num="1771440667" />'551 'item_amt="253300" bank_id="10" acct_num="0106259811" />' 566 552 in self.browser.contents) 567 553 … … 575 561 self.assertTrue( 576 562 '<item_detail item_id="1" item_name="Application" ' 577 'item_amt="253300" bank_id="1 20" acct_num="1771440667" />'563 'item_amt="253300" bank_id="10" acct_num="0106259811" />' 578 564 in self.browser.contents) 579 565 # Commission or bribe? … … 596 582 self.assertTrue( 597 583 '<item_detail item_id="1" item_name="Application" ' 598 'item_amt="253300" bank_id="1 20" acct_num="1771440667" />'584 'item_amt="253300" bank_id="10" acct_num="0106259811" />' 599 585 in self.browser.contents) 600 586 # No 'commission', no provider fee in 2013 … … 671 657 self.assertTrue( 672 658 '<item_detail item_id="1" item_name="Application" ' 673 'item_amt="253300" bank_id="1 20" acct_num="1771440667" />'659 'item_amt="253300" bank_id="10" acct_num="0106259811" />' 674 660 in self.browser.contents) 675 661 delta = timedelta(days=8) … … 721 707 self.assertTrue( 722 708 '<item_detail item_id="1" item_name="ND Transcript (local)" ' 723 'item_amt="450000" bank_id="1 20" acct_num="1771440667" />'709 'item_amt="450000" bank_id="10" acct_num="0106259811" />' 724 710 in self.browser.contents) 725 711 … … 734 720 self.assertTrue( 735 721 '<item_detail item_id="1" item_name="Log Book" ' 736 'item_amt="55444" bank_id="1 20" acct_num="1771440667" />'722 'item_amt="55444" bank_id="10" acct_num="0106259811" />' 737 723 in self.browser.contents) 738 724
Note: See TracChangeset for help on using the changeset viewer.