Ignore:
Timestamp:
14 Sep 2018, 06:17:18 (6 years ago)
Author:
Henrik Bettermann
Message:

Adjust xml data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/browser.py

    r15136 r15137  
    156156        xmldict['institution_name'] = INSTITUTION_NAME
    157157        # Interswitch amount is not part of the xml data
    158         xmltext = """<payment_item_detail>
     158        if provider_amt == 0:
     159            xmltext = """<payment_item_detail>
    159160<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
    160161<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" />
     162</item_details>
     163</payment_item_detail>""" % xmldict
     164        else:
     165            xmltext = """<payment_item_detail>
     166<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
     167<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" />
    161168<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" />
    162169</item_details>
    163170</payment_item_detail>""" % xmldict
     171
    164172        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    165173        self.context.provider_amt = provider_amt
Note: See TracChangeset for help on using the changeset viewer.