Changeset 13752 for main/waeup.fceokene/trunk/src
- Timestamp:
- 29 Feb 2016, 12:33:05 (9 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/browser.py
r13589 r13752 35 35 PROVIDER_ITEM_NAME = 'BT Education' 36 36 INSTITUTION_NAME = 'FCEOkene' 37 INSTITUTION_ACCT = '2003670143' 38 INSTITUTION_BANK_ID = '8' 37 39 CURRENCY = '566' 38 40 GATEWAY_AMT = 150.0 … … 75 77 xmldict['provider_amt'] = 100 * provider_amt 76 78 # Institution data 77 fceokene_split_amt = 1400.0 78 xmldict['fceokene_acct'] = "0000000000000" 79 xmldict['institution_bank_id'] = '0' 79 xmldict['institution_acct'] = INSTITUTION_ACCT 80 xmldict['institution_bank_id'] = INSTITUTION_BANK_ID 80 81 xmldict['institution_item_name'] = self.category 81 82 xmldict['institution_name'] = INSTITUTION_NAME 82 83 if self.context.p_category in ('schoolfee', 'third_semester'): 83 84 self.pay_item_id = '8302' 84 if student.current_mode in ('ct_ft',):85 xmldict['institution_acct'] = "1012044039"86 xmldict['institution_bank_id'] = '117'87 if student.current_mode in ('nce_sw','prence',):88 xmldict['institution_acct'] = "1013780934"89 xmldict['institution_bank_id'] = '117'90 elif student.current_mode in ('nce_ft',) and \91 student['studycourse'].current_verdict == 'O':92 xmldict['institution_acct'] = "1013780934"93 xmldict['institution_bank_id'] = '117'94 elif student.current_mode in ('nce_ft',):95 xmldict['institution_acct'] = "1013780934"96 xmldict['institution_bank_id'] = '117'97 elif student.current_mode in ('pd_ft',):98 xmldict['institution_acct'] = "1013780934"99 xmldict['institution_bank_id'] = '117'100 #undergraduate schoolfee added101 elif student.current_mode in ('ug_ft',):102 xmldict['institution_acct'] = "2010952698"103 xmldict['institution_bank_id'] = '8'104 xmldict['fceokene_split'] = 100 * fceokene_split_amt105 xmldict['institution_amt'] = 100 * (106 self.context.amount_auth - provider_amt -107 GATEWAY_AMT - fceokene_split_amt)108 85 elif 'maintenance' in self.context.p_category: 109 fceokene_split_amt = 0.0110 86 provider_amt = 0.0 111 87 self.pay_item_id = '8300' 112 xmldict['institution_amt'] = 100 * (113 self.context.amount_auth - GATEWAY_AMT)114 xmldict['institution_acct'] = "1013780934"115 xmldict['institution_bank_id'] = '117'116 88 elif self.context.p_category == 'clearance': 117 fceokene_split_amt = 0.0118 89 provider_amt = 0.0 119 90 self.pay_item_id = '8304' 120 xmldict['institution_amt'] = 100 * ( 121 self.context.amount_auth - GATEWAY_AMT) 122 xmldict['institution_acct'] = "2010952698" 123 xmldict['institution_bank_id'] = '8' 124 125 # Interswitch amount is not part of the xml data 126 if self.context.p_category in ('schoolfee', 'third_semester'): 91 xmldict['institution_amt'] = 100 * ( 92 self.context.amount_auth - GATEWAY_AMT - provider_amt) 93 if provider_amt: 127 94 xmltext = """<payment_item_detail> 128 95 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 129 96 <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" /> 130 <item_detail item_id="2" item_name="FCEOkene Split" item_amt="%(fceokene_split)d" bank_id="117" acct_num="1013780934" /> 131 <item_detail item_id="3" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 97 <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" /> 132 98 </item_details> 133 99 </payment_item_detail>""" % xmldict 134 135 100 else: 136 101 xmltext = """<payment_item_detail> … … 143 108 self.context.provider_amt = provider_amt 144 109 self.context.gateway_amt = GATEWAY_AMT 145 self.context.thirdparty_amt = fceokene_split_amt146 110 return 147 111 … … 172 136 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 173 137 # Institution data 174 if getattr( 175 self.applicant.__parent__, 'prefix', None) in ('pude', 'putme'): 176 xmldict['institution_acct'] = '2010952698' 177 xmldict['institution_bank_id'] = '8' 178 else: 179 xmldict['institution_acct'] = '1013780934' 180 xmldict['institution_bank_id'] = '117' 138 xmldict['institution_acct'] = INSTITUTION_ACCT 139 xmldict['institution_bank_id'] = INSTITUTION_BANK_ID 181 140 xmldict['institution_amt'] = 100 * (self.context.amount_auth - 182 141 provider_amt - GATEWAY_AMT) -
main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py
r13616 r13752 91 91 self.assertEqual(self.student['payments'][self.value].provider_amt, 1600.0) 92 92 self.assertEqual(self.student['payments'][self.value].gateway_amt, 150.0) 93 self.assertEqual(self.student['payments'][self.value].thirdparty_amt, 1400.0)94 93 self.assertMatches('...Total Amount Authorized:...', 95 94 self.browser.contents) … … 98 97 in self.browser.contents) 99 98 self.assertTrue( 100 'item_name="School Fee" item_amt="6730000" bank_id="117" acct_num="1013780934"' 101 in self.browser.contents) 102 self.assertTrue( 103 'item_name="FCEOkene Split" item_amt="140000" bank_id="117" acct_num="1013780934"' 99 'item_name="School Fee" item_amt="6870000" bank_id="8" acct_num="2003670143"' 104 100 in self.browser.contents) 105 101 self.assertTrue( … … 123 119 in self.browser.contents) 124 120 self.assertTrue( 125 'item_name="NCE Third Semester Fee" item_amt="476300" bank_id="117" acct_num="1013780934"' 126 in self.browser.contents) 127 self.assertTrue( 128 'item_name="FCEOkene Split" item_amt="140000" bank_id="117" acct_num="1013780934"' 121 'item_name="NCE Third Semester Fee" item_amt="616300" bank_id="8" acct_num="2003670143"' 129 122 in self.browser.contents) 130 123 self.assertTrue( … … 191 184 in self.browser.contents) 192 185 self.assertTrue( 193 'item_name="Hostel Maintenance Fee" item_amt="87600" bank_id=" 117" acct_num="1013780934"'186 'item_name="Hostel Maintenance Fee" item_amt="87600" bank_id="8" acct_num="2003670143"' 194 187 in self.browser.contents) 195 188 # BT does nor charge a fee for maintenance fee … … 242 235 self.browser.contents) 243 236 self.assertTrue( 244 'item_name="Acceptance Fee" item_amt="345600" bank_id="8" acct_num="20 10952698"'237 'item_name="Acceptance Fee" item_amt="345600" bank_id="8" acct_num="2003670143"' 245 238 in self.browser.contents) 246 239 # BT does nor charge a fee for maintenance fee … … 401 394 self.assertTrue( 402 395 '<item_detail item_id="1" item_name="application"' 403 ' item_amt="35000" bank_id=" 117" acct_num="1013780934" />'396 ' item_amt="35000" bank_id="8" acct_num="2003670143" />' 404 397 in self.browser.contents) 405 398 delta = timedelta(days=8)
Note: See TracChangeset for help on using the changeset viewer.