Ignore:
Timestamp:
11 Nov 2012, 17:08:27 (12 years ago)
Author:
Henrik Bettermann
Message:

Insert bank account details for maint fee. pay_item:id is still missing.

Location:
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch
Files:
2 edited

Legend:

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

    r9616 r9617  
    233233        xmldict['institution_item_name'] = self.category
    234234        xmldict['institution_name'] = INSTITUTION_NAME
    235         xmldict['institution_amt'] = 100 * self.context.amount_auth
     235        xmldict['institution_amt'] = 100 * (self.context.amount_auth -300)
    236236        xmldict['dalash_amt'] = 0
    237237        self.pay_item_id = '000'
     
    259259                self.context.amount_auth - 1200 - 300 - 1800)
    260260
     261        elif 'maintenance' in self.context.p_category:
     262            self.pay_item_id = '000'
     263            xmldict['institution_acct'] = "0039050937"
     264            xmldict['institution_bank_id'] = '31'
     265
    261266        hashargs = (
    262267            self.context.p_id +
     
    269274
    270275        # Interswitch amount is not part of the xml data
    271         xmltext = """<payment_item_detail>
     276
     277        if self.context.p_category == 'schoolfee':
     278            xmltext = """<payment_item_detail>
    272279<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    273280<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" />
     
    276283</item_details>
    277284</payment_item_detail>""" % xmldict
     285
     286        elif 'maintenance' in self.context.p_category:
     287            xmltext = """<payment_item_detail>
     288<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     289<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" />
     290</item_details>
     291</payment_item_detail>""" % xmldict
     292
    278293        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    279294        return
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r9616 r9617  
    171171            self.browser.contents)
    172172        self.assertMatches(
    173             '...item_name="Hostel Maintenance Fee" item_amt="98700" bank_id="0" acct_num="0000000000000"...',
     173            '...item_name="Hostel Maintenance Fee" item_amt="68700" bank_id="31" acct_num="0039050937"...',
    174174            self.browser.contents)
    175175        # BT does nor charge a fee for maintenance fee
Note: See TracChangeset for help on using the changeset viewer.