Changeset 14066 for main/waeup.kwarapoly
- Timestamp:
- 10 Aug 2016, 13:04:36 (8 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
r13653 r14066 253 253 xmldict['institution_acct'] = '0106259811' 254 254 xmldict['institution_bank_id'] = '10' 255 elif self.applicant.applicant_id.startswith('prejambites') or \ 256 self.applicant.applicant_id.startswith('putme'): 255 elif self.applicant.applicant_id.startswith('prejambites'): 256 xmldict['institution_acct'] = '0106259811' 257 xmldict['institution_bank_id'] = '10' 258 self.pay_item_id = '104' 259 provider_amt = 262.5 260 dalash_amt = 0.0 261 gateway_amt = 37.5 262 elif self.applicant.applicant_id.startswith('putme'): 257 263 xmldict['institution_acct'] = '0106259811' 258 264 xmldict['institution_bank_id'] = '10' … … 261 267 xmldict['institution_acct'] = '0106259811' 262 268 xmldict['institution_bank_id'] = '10' 269 provider_amt = 262.5 270 dalash_amt = 0.0 271 gateway_amt = 37.5 263 272 elif self.applicant.applicant_id.startswith('special'): 264 273 if self.context.p_category in SPECIAL_PAYMENT_PARAMS.keys(): … … 300 309 </payment_item_detail>""" % xmldict 301 310 311 if self.applicant.applicant_id.startswith('pre'): 312 xmltext = """<payment_item_detail> 313 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s"> 314 <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" /> 315 <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" /> 316 </item_details> 317 </payment_item_detail>""" % xmldict 318 302 319 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 303 320 self.context.provider_amt = provider_amt -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r13653 r14066 571 571 in self.browser.contents) 572 572 573 # prehndft fee goes to another account 573 # prehndft fee goes to another account and has other split data 574 574 self.applicant.applicant_id = u'prehnd_anything' 575 575 self.browser.open(self.manage_path) … … 580 580 self.assertTrue( 581 581 '<item_detail item_id="1" item_name="Application" ' 582 'item_amt="253300" bank_id="10" acct_num="0106259811" />' 583 in self.browser.contents) 584 # No 'commission', no provider fee in 2013 585 #self.assertFalse('Dalash' in self.browser.contents) 586 #self.assertFalse('BT Education' in self.browser.contents) 587 # Comission is charged from 14/09/2014 588 self.assertTrue( 589 '<item_detail item_id="2" item_name="Dalash" item_amt="20000" ' 590 'bank_id="117" acct_num="1013196791" />' 591 in self.browser.contents) 592 self.assertTrue( 593 '<item_detail item_id="3" item_name="BT Education" ' 594 'item_amt="30000" bank_id="117" acct_num="1010764827" />' 582 'item_amt="303300" bank_id="10" acct_num="0106259811" />' 583 in self.browser.contents) 584 self.assertFalse('Dalash' in self.browser.contents) 585 self.assertTrue( 586 '<item_detail item_id="2" item_name="BT Education" ' 587 'item_amt="26250" bank_id="117" acct_num="1010764827" />' 595 588 in self.browser.contents) 596 589 … … 604 597 self.assertTrue( 605 598 '<item_detail item_id="1" item_name="Application" ' 606 'item_amt="253300" bank_id="10" acct_num="0106259811" />' 607 in self.browser.contents) 608 # No 'commission', no provider fee in 2013 609 #self.assertFalse('Dalash' in self.browser.contents) 610 #self.assertFalse('BT Education' in self.browser.contents) 611 # Comission is charged from 14/09/2014 612 self.assertTrue( 613 '<item_detail item_id="2" item_name="Dalash" item_amt="20000" ' 614 'bank_id="117" acct_num="1013196791" />' 615 in self.browser.contents) 616 self.assertTrue( 617 '<item_detail item_id="3" item_name="BT Education" ' 618 'item_amt="30000" bank_id="117" acct_num="1010764827" />' 599 'item_amt="303300" bank_id="10" acct_num="0106259811" />' 600 in self.browser.contents) 601 self.assertFalse('Dalash' in self.browser.contents) 602 self.assertTrue( 603 '<item_detail item_id="2" item_name="BT Education" ' 604 'item_amt="26250" bank_id="117" acct_num="1010764827" />' 619 605 in self.browser.contents) 620 606 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.