Changeset 17937 for main/kofacustom.unidel/trunk
- Timestamp:
- 4 Oct 2024, 23:16:34 (3 months ago)
- Location:
- main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/browser.py
r17935 r17937 177 177 xmldict['institution_amt'] = 100 * self.context.net_amt 178 178 xmldict['item_id'] = 1 179 xmltext = """<payment_item_detail> 179 xmltext = """ 180 <payment_item_detail> 180 181 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 181 182 <item_detail item_id="%(item_id)s" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> … … 183 184 if provider_amt: 184 185 xmldict['item_id'] += 1 185 xmltext += """ 186 <item_detail item_id="%(item_id)s" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 186 xmltext += """<item_detail item_id="%(item_id)s" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 187 187 """ % xmldict 188 188 if tech_fee: 189 189 xmldict['item_id'] += 1 190 xmltext += """<item_detail item_id="%(item_id)s" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="%(tech_bank_id)s" acct_num="%(tech_acct)s" />190 xmltext += """<item_detail item_id="%(item_id)s" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="%(tech_bank_id)s" acct_num="%(tech_acct)s" /> 191 191 """ % xmldict 192 192 if union_due: 193 193 xmldict['item_id'] += 1 194 xmltext += """<item_detail item_id="%(item_id)s" item_name="Student Union Due" item_amt="%(union_due)d" bank_id="%(union_bank_id)s" acct_num="%(union_acct)s"/> 195 </item_details> 196 </payment_item_detail>""" % xmldict 197 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 194 xmltext += """<item_detail item_id="%(item_id)s" item_name="Student Union Due" item_amt="%(union_due)d" bank_id="%(union_bank_id)s" acct_num="%(union_acct)s" /> 195 """ % xmldict 196 xmltext +="""</item_details> 197 </payment_item_detail> 198 """ 199 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 198 200 self.context.provider_amt = provider_amt 199 201 self.amount_auth = int(100 * self.context.amount_auth) -
main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/tests.py
r17935 r17937 84 84 self.browser.contents) 85 85 self.assertTrue( 86 '<item_detail item_id="4" item_name="Student Union Due" item_amt="150000" bank_id="117" acct_num="1011438901" />' in86 '<item_detail item_id="4" item_name="Student Union Due" item_amt="150000" bank_id="117" acct_num="1011438901" />' in 87 87 self.browser.contents) 88 88
Note: See TracChangeset for help on using the changeset viewer.