Changeset 14961 for main/kofacustom.dspg/trunk/src
- Timestamp:
- 7 Mar 2018, 12:48:34 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py
r14953 r14961 132 132 xmldict['institution_amt'] = '0.0' 133 133 provider_amt = 0.0 134 tech_fee = 0.0 134 135 if self.context.p_category.startswith('schoolfee'): 135 136 self.pay_item_id = '102' 136 137 provider_amt = 2800.0 138 tech_fee = 1200.0 137 139 if student.faccode == 'SPAT': 138 140 xmldict['institution_acct'] = '1012808851' … … 160 162 xmldict['institution_bank_id'] = SPECIAL_PAYMENT_PARAMS[self.context.p_category][3] 161 163 xmldict['provider_amt'] = 100 * provider_amt 164 xmldict['tech_fee'] = 100 * tech_fee 162 165 xmldict['institution_item_name'] = self.context.category 163 166 xmldict['institution_name'] = INSTITUTION_NAME 164 167 xmldict['institution_amt'] = institution_amt = 100 * ( 165 self.context.amount_auth - provider_amt - GATEWAY_AMT) 168 self.context.amount_auth - provider_amt - tech_fee - GATEWAY_AMT) 169 166 170 if provider_amt == 0: 167 171 xmltext = """<payment_item_detail> … … 170 174 </item_details> 171 175 </payment_item_detail>""" % xmldict 172 el se:176 elif tech_fee == 0: 173 177 xmltext = """<payment_item_detail> 174 178 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 175 179 <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" /> 176 180 <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" /> 181 </item_details> 182 </payment_item_detail>""" % xmldict 183 else: 184 xmltext = """<payment_item_detail> 185 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 186 <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" /> 187 <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" /> 188 <item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="030" acct_num="5100189030" /> 177 189 </item_details> 178 190 </payment_item_detail>""" % xmldict -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py
r14953 r14961 92 92 self.browser.contents) 93 93 self.assertTrue( 94 'item_name="School Fee" item_amt="2 695000" bank_id="11" acct_num="0010761873"' in94 'item_name="School Fee" item_amt="2575000" bank_id="11" acct_num="0010761873"' in 95 95 self.browser.contents) 96 96 # ND FT Non-Deltan Fresh Student Acceptance Fee … … 199 199 self.payment_url = self.browser.url 200 200 self.browser.getLink("CollegePAY", index=0).click() 201 self.assertTrue('<item_detail item_id="1" item_name="School Fee 1" item_amt="1 617000" bank_id="117" acct_num="1012808851" />'202 in self.browser.contents) 203 self.assertTrue('<item_detail item_id="2" item_name="School Fee 2" item_amt="10 78000" bank_id="123" acct_num="1002883141" />'201 self.assertTrue('<item_detail item_id="1" item_name="School Fee 1" item_amt="1545000" bank_id="117" acct_num="1012808851" />' 202 in self.browser.contents) 203 self.assertTrue('<item_detail item_id="2" item_name="School Fee 2" item_amt="1030000" bank_id="123" acct_num="1002883141" />' 204 204 in self.browser.contents) 205 205 self.assertTrue('<item_detail item_id="3" item_name="BT Education" item_amt="280000" bank_id="8" acct_num="2028964403" />'
Note: See TracChangeset for help on using the changeset viewer.