Changeset 14945 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 4 Feb 2018, 06:58:00 (7 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r14920 r14945 106 106 xmldict['institution_name'] = INSTITUTION_NAME 107 107 108 if self.applicant.applicant_id.startswith('ijmbe'):109 xmldict['institution_acct'] = '1010827641'110 xmldict['institution_bank_id'] = '117'111 112 if self.applicant.applicant_id.startswith('trans'):113 xmldict['institution_acct'] = '1010827641'114 xmldict['institution_bank_id'] = '117'115 116 if self.applicant.applicant_id.startswith('cert'):117 xmldict['institution_acct'] = '1010827641'118 xmldict['institution_bank_id'] = '117'119 120 108 if self.applicant.applicant_id.startswith('pg'): 121 109 handbook_amount = 2000.0 … … 127 115 <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" /> 128 116 <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" /> 129 <item_detail item_id="3" item_name="PG Handbook" item_amt="%(handbook_amount)d" bank_id="117" acct_num="101 4270207" />117 <item_detail item_id="3" item_name="PG Handbook" item_amt="%(handbook_amount)d" bank_id="117" acct_num="1010827641" /> 130 118 </item_details> 131 119 </payment_item_detail>""" % xmldict … … 179 167 def update(self): 180 168 error = self.init_update() 181 182 ######################################183 #error = 'Sorry, Interswitch payments are temporarily disabled.'184 ######################################185 169 186 170 if error: … … 228 212 xmldict = self.xmldict 229 213 xmltext = "" 230 # Provider data 214 xmldict['institution_acct'] = '1010827641' 215 xmldict['institution_bank_id'] = '117' 231 216 xmldict['detail_ref'] = self.context.p_id 232 217 xmldict['provider_acct'] = PROVIDER_ACCT … … 248 233 student_welfare_assurance_amt = gateway_net_amt( 249 234 academic_session.welfare_fee) 250 xmldict['institution_bank_id'] = '117' 251 xmldict['institution_acct'] = '1010827641' 252 xmldict['student_union_bank_id'] = '31' 253 xmldict['student_union_acct'] = '0051005007' 235 xmldict['student_union_bank_id'] = '117' 236 xmldict['student_union_acct'] = '1010827641' 254 237 xmldict['aaue_share_bank_id'] = '117' 255 238 xmldict['aaue_share_acct'] = '1010827641' … … 269 252 student_welfare_assurance_amt = gateway_net_amt( 270 253 academic_session.welfare_fee) 271 xmldict['institution_bank_id'] = '117' 272 xmldict['institution_acct'] = '1010827641' 273 xmldict['student_union_bank_id'] = '7' 274 xmldict['student_union_acct'] = '1019763348' 254 xmldict['student_union_bank_id'] = '117' 255 xmldict['student_union_acct'] = '1010827641' 275 256 xmldict['aaue_share_bank_id'] = '117' 276 257 xmldict['aaue_share_acct'] = '1010827641' … … 279 260 self.pay_item_id = '107' 280 261 if student.is_postgrad: 281 xmldict['institution_bank_id'] = '117'282 xmldict['institution_acct'] = '1010827641'283 262 self.pay_item_id = '111' 284 263 if student.current_mode == 'ijmbe': 285 xmldict['institution_bank_id'] = '117'286 xmldict['institution_acct'] = '1010827641'287 264 self.pay_item_id = '119' 288 265 xmldict['joint_venture_bank_id'] = '117' 289 xmldict['joint_venture_acct'] = '101 4066969'266 xmldict['joint_venture_acct'] = '1010827641' 290 267 291 268 xmldict['provider_amt'] = 100 * provider_amt … … 295 272 xmldict['institution_amt'] = 100 * ( 296 273 gateway_net_amt(self.context.amount_auth)) 297 xmltext = """<payment_item_detail>298 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">299 <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" />300 </item_details>301 </payment_item_detail>""" % xmldict302 274 elif self.context.p_category in ('schoolfee_incl', 'schoolfee_1'): 303 275 # Schoolfee including additional fees … … 318 290 <item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" /> 319 291 <item_detail item_id="5" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" /> 320 <item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="1 23" acct_num="1006407792" />292 <item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="117" acct_num="1010827641" /> 321 293 </item_details> 322 294 </payment_item_detail>""" % xmldict … … 346 318 else: 347 319 self.pay_item_id = '104' 348 xmldict['institution_acct'] = '1010827641'349 xmldict['institution_bank_id'] = '117'350 320 else: 351 321 # Second agreement 352 322 self.pay_item_id = '102' 353 xmldict['institution_acct'] = '1010827641'354 xmldict['institution_bank_id'] = '117'355 323 if student.is_postgrad: 356 xmldict['institution_bank_id'] = '117'357 xmldict['institution_acct'] = '1010827641'358 324 self.pay_item_id = '110' 359 325 if student.current_mode == 'ijmbe': 360 xmldict['institution_bank_id'] = '117'361 xmldict['institution_acct'] = '1010827641'362 326 self.pay_item_id = '120' 363 327 … … 376 340 <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" /> 377 341 <item_detail item_id="2" item_name="Matriculation Gown Fee" item_amt="%(gown_fee_amt)d" bank_id="117" acct_num="1010827641" /> 378 <item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_lf_fee_amt)d" bank_id=" 51" acct_num="4010660109" />342 <item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_lf_fee_amt)d" bank_id="117" acct_num="1010827641" /> 379 343 </item_details> 380 344 </payment_item_detail>""" % xmldict … … 384 348 xmldict['institution_amt'] = 100 * ( 385 349 gateway_net_amt(self.context.amount_auth)) 386 xmltext = """<payment_item_detail>387 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">388 <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" />389 </item_details>390 </payment_item_detail>""" % xmldict391 350 392 351 # Union Dues 393 352 elif self.context.p_category == 'union': 394 353 self.pay_item_id = '103' 395 if contr_agreement_student(student) == 'first': 396 # First agreement 397 xmldict['institution_acct'] = '0051005007' 398 xmldict['institution_bank_id'] = '31' 399 else: 400 # Second agreement 401 xmldict['institution_bank_id'] = '7' 402 xmldict['institution_acct'] = '1019763348' 403 xmldict['institution_amt'] = 100 * ( 404 gateway_net_amt(self.context.amount_auth)) 405 xmltext = """<payment_item_detail> 406 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 407 <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" /> 408 </item_details> 409 </payment_item_detail>""" % xmldict 354 xmldict['institution_amt'] = 100 * ( 355 gateway_net_amt(self.context.amount_auth)) 410 356 411 357 # Lapel/File 412 358 elif self.context.p_category == 'lapel': 413 359 self.pay_item_id = '104' 414 xmldict['institution_acct'] = '4010660109' 415 xmldict['institution_bank_id'] = '51' 416 xmldict['institution_amt'] = 100 * ( 417 gateway_net_amt(self.context.amount_auth)) 418 xmltext = """<payment_item_detail> 419 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 420 <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" /> 421 </item_details> 422 </payment_item_detail>""" % xmldict 360 xmldict['institution_amt'] = 100 * ( 361 gateway_net_amt(self.context.amount_auth)) 423 362 424 363 # Welfare Assurance 425 364 elif self.context.p_category == 'welfare': 426 365 self.pay_item_id = '105' 427 xmldict['institution_acct'] = '1006407792' 428 xmldict['institution_bank_id'] = '123' 429 xmldict['institution_amt'] = 100 * ( 430 gateway_net_amt(self.context.amount_auth)) 431 xmltext = """<payment_item_detail> 432 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 433 <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" /> 434 </item_details> 435 </payment_item_detail>""" % xmldict 366 xmldict['institution_amt'] = 100 * ( 367 gateway_net_amt(self.context.amount_auth)) 436 368 437 369 # ID Card 438 370 elif self.context.p_category == 'id_card': 439 371 self.pay_item_id = '000' 440 xmldict['institution_acct'] = '1010827641' 441 xmldict['institution_bank_id'] = '117' 442 xmldict['institution_amt'] = 100 * ( 443 gateway_net_amt(self.context.amount_auth)) 444 xmltext = """<payment_item_detail> 445 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 446 <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" /> 447 </item_details> 448 </payment_item_detail>""" % xmldict 372 xmldict['institution_amt'] = 100 * ( 373 gateway_net_amt(self.context.amount_auth)) 449 374 450 375 # Matric Gown 451 376 elif self.context.p_category == 'matric_gown': 452 377 self.pay_item_id = '106' 453 xmldict['institution_acct'] = '1010827641' 454 xmldict['institution_bank_id'] = '117' 455 xmldict['institution_amt'] = 100 * ( 456 gateway_net_amt(self.context.amount_auth)) 457 xmltext = """<payment_item_detail> 458 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 459 <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" /> 460 </item_details> 461 </payment_item_detail>""" % xmldict 378 xmldict['institution_amt'] = 100 * ( 379 gateway_net_amt(self.context.amount_auth)) 462 380 463 381 # Concessional 464 382 elif self.context.p_category == 'concessional': 465 383 self.pay_item_id = '107' 466 xmldict['institution_acct'] = '1010827641' 467 xmldict['institution_bank_id'] = '117' 468 xmldict['institution_amt'] = 100 * ( 469 gateway_net_amt(self.context.amount_auth)) 470 xmltext = """<payment_item_detail> 471 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 472 <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" /> 473 </item_details> 474 </payment_item_detail>""" % xmldict 384 xmldict['institution_amt'] = 100 * ( 385 gateway_net_amt(self.context.amount_auth)) 475 386 476 387 # Hostel Maintenance … … 479 390 self.pay_item_id = '109' 480 391 xmldict['provider_amt'] = 100 * provider_amt 481 xmldict['institution_acct'] = '1010827641'482 xmldict['institution_bank_id'] = '117'483 392 xmldict['institution_amt'] = 100 * ( 484 393 gateway_net_amt(self.context.amount_auth) - provider_amt) … … 496 405 else: 497 406 self.pay_item_id = '116' 498 xmldict['institution_acct'] = '1010893123' 499 xmldict['institution_bank_id'] = '117' 500 xmldict['institution_amt'] = 100 * ( 501 gateway_net_amt(self.context.amount_auth)) 502 xmltext = """<payment_item_detail> 503 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 504 <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" /> 505 </item_details> 506 </payment_item_detail>""" % xmldict 407 xmldict['institution_amt'] = 100 * ( 408 gateway_net_amt(self.context.amount_auth)) 507 409 508 410 # ENT Fees … … 512 414 else: 513 415 self.pay_item_id = '118' 514 xmldict['institution_acct'] = '6220029828' 515 xmldict['institution_bank_id'] = '51' 516 xmldict['institution_amt'] = 100 * ( 517 gateway_net_amt(self.context.amount_auth)) 518 xmltext = """<payment_item_detail> 519 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 520 <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" /> 521 </item_details> 522 </payment_item_detail>""" % xmldict 416 xmldict['institution_amt'] = 100 * ( 417 gateway_net_amt(self.context.amount_auth)) 523 418 524 419 # Faculty and Departmental Dues 525 420 elif self.context.p_category == 'fac_dep': 526 421 self.pay_item_id = '117' 527 xmldict['institution_acct'] = '1010827641' 528 xmldict['institution_bank_id'] = '117' 529 xmldict['institution_amt'] = 100 * ( 530 gateway_net_amt(self.context.amount_auth)) 531 xmltext = """<payment_item_detail> 532 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 533 <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" /> 534 </item_details> 535 </payment_item_detail>""" % xmldict 422 xmldict['institution_amt'] = 100 * ( 423 gateway_net_amt(self.context.amount_auth)) 536 424 537 425 # Restitution Fee 538 426 elif self.context.p_category == 'restitution': 539 427 self.pay_item_id = '117' 540 xmldict['institution_acct'] = '0772002144' 541 xmldict['institution_bank_id'] = '47' 542 xmldict['institution_amt'] = 100 * ( 543 gateway_net_amt(self.context.amount_auth)) 544 xmltext = """<payment_item_detail> 545 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 546 <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" /> 547 </item_details> 548 </payment_item_detail>""" % xmldict 428 xmldict['institution_amt'] = 100 * ( 429 gateway_net_amt(self.context.amount_auth)) 549 430 550 431 # Late Registration Fee … … 554 435 else: 555 436 self.pay_item_id = '123' 556 xmldict['institution_a cct'] = '1010827641'557 xmldict['institution_bank_id'] = '117'558 xmldict['institution_amt'] = 100 * ( 559 gateway_net_amt(self.context.amount_auth))437 xmldict['institution_amt'] = 100 * ( 438 gateway_net_amt(self.context.amount_auth)) 439 440 if not xmltext: 560 441 xmltext = """<payment_item_detail> 561 442 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 563 444 </item_details> 564 445 </payment_item_detail>""" % xmldict 565 566 446 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 567 447 self.context.provider_amt = provider_amt -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r14920 r14945 115 115 in self.browser.contents) 116 116 self.assertTrue( 117 'item_name="PG Handbook" item_amt="200000" bank_id="117" acct_num="101 4270207"'117 'item_name="PG Handbook" item_amt="200000" bank_id="117" acct_num="1010827641"' 118 118 in self.browser.contents) 119 119 self.assertTrue( … … 147 147 self.assertTrue( 148 148 'item_name="Application Fee" item_amt="575000" bank_id="117" acct_num="1010827641"' 149 in self.browser.contents)150 self.assertFalse(151 'item_name="Screening Guide" item_amt="200000" bank_id="117" acct_num="1013879579"'152 149 in self.browser.contents) 153 150 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.