Changeset 15473 for main


Ignore:
Timestamp:
21 Jun 2019, 09:06:35 (5 years ago)
Author:
Henrik Bettermann
Message:

Store xml split data also in application payment ticket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py

    r15471 r15473  
    1919import hashlib
    2020import grok
     21from xml.dom import minidom
    2122from zope.interface import Interface
    2223from zope.component import queryAdapter
     
    158159        self.context.provider_amt = provider_amt
    159160        self.context.gateway_amt = GATEWAY_AMT
    160 
     161        xmlitems = ''
     162        xmldoc = minidom.parseString(xmltext)
     163        itemlist = xmldoc.getElementsByTagName('item_detail')
     164        for s in itemlist:
     165            xmlitems += "%s: %s, N%s, %s (%s)  " % (
     166                s.attributes['item_id'].value,
     167                s.attributes['item_name'].value,
     168                int(s.attributes['item_amt'].value)/100,
     169                s.attributes['acct_num'].value,
     170                s.attributes['bank_id'].value,
     171                )
     172        self.context.p_split_data = xmlitems
    161173        hashargs = (
    162174            self.context.p_id +
     
    590602        self.context.gateway_amt = self.amount_auth - gateway_net_amt(
    591603            self.amount_auth)
    592 
    593         from xml.dom import minidom
    594604        xmlitems = ''
    595605        xmldoc = minidom.parseString(xmltext)
     
    602612                s.attributes['acct_num'].value,
    603613                s.attributes['bank_id'].value,
    604 
    605614                )
    606 
    607615        self.context.p_split_data = xmlitems
    608 
    609 
    610 
    611616        hashargs = (
    612617            self.context.p_id +
Note: See TracChangeset for help on using the changeset viewer.