Ignore:
Timestamp:
4 Oct 2024, 23:16:34 (5 weeks ago)
Author:
Henrik Bettermann
Message:

Fix xml.

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  
    177177        xmldict['institution_amt'] = 100 * self.context.net_amt
    178178        xmldict['item_id'] = 1
    179         xmltext = """<payment_item_detail>
     179        xmltext = """
     180<payment_item_detail>
    180181<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    181182<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" />
     
    183184        if provider_amt:
    184185            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" />
    187187""" % xmldict
    188188        if tech_fee:
    189189            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" />
    191191""" % xmldict
    192192        if union_due:
    193193            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
    198200        self.context.provider_amt = provider_amt
    199201        self.amount_auth = int(100 * self.context.amount_auth)
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/tests.py

    r17935 r17937  
    8484            self.browser.contents)
    8585        self.assertTrue(
    86             '<item_detail item_id="4" item_name="Student Union Due" item_amt="150000" bank_id="117" acct_num="1011438901"/>' in
     86            '<item_detail item_id="4" item_name="Student Union Due" item_amt="150000" bank_id="117" acct_num="1011438901" />' in
    8787            self.browser.contents)
    8888
Note: See TracChangeset for help on using the changeset viewer.