Ignore:
Timestamp:
21 Jan 2014, 12:42:23 (11 years ago)
Author:
Henrik Bettermann
Message:

Split settlement (ICT charges) was supposed to be for first installment fees payment only.

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

Legend:

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

    r10174 r10952  
    114114        if self.context.p_category in ('schoolfee', 'schoolfee_1', 'schoolfee_2'):
    115115            provider_amt = 3000.0
     116            if self.context.p_category == 'schoolfee_2':
     117                provider_amt = 0.0
    116118            xmldict['provider_amt'] = 100 * provider_amt
    117119            self.pay_item_id = '10500'
     
    137139        # Interswitch amount is not part of the xml data
    138140
    139         if self.context.p_category in ('schoolfee', 'schoolfee_1', 'schoolfee_2'):
     141        if self.context.p_category in ('schoolfee', 'schoolfee_1'):
    140142            xmltext = """<payment_item_detail>
    141143<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    144146</item_details>
    145147</payment_item_detail>""" % xmldict
    146 
     148        elif self.context.p_category  == 'schoolfee_2':
     149            xmltext = """<payment_item_detail>
     150<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     151<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" />
     152</item_details>
     153</payment_item_detail>""" % xmldict
    147154        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    148155        self.context.provider_amt = provider_amt
  • main/waeup.aaua/trunk/src/waeup/aaua/interswitch/tests.py

    r10174 r10952  
    108108            'item_name="School Fee" item_amt="685000" bank_id="120" acct_num="2461770000021"'
    109109            in self.browser.contents)
     110
     111        self.certificate.ratio = 0.5
     112        self.browser.open(self.payments_path + '/addop')
     113        self.browser.getControl(name="form.p_category").value = ['schoolfee_2']
     114        self.browser.getControl("Create ticket").click()
     115        ctrl = self.browser.getControl(name='val_id')
     116        self.value = ctrl.options[2]
     117        self.browser.getLink(self.value).click()
     118        self.assertTrue(
     119            '<span>5000.0</span>' in self.browser.contents)
     120        self.browser.getLink("CollegePAY", index=0).click()
     121        self.assertTrue(
     122            '<input type="hidden" name="amount" value="500000.0" />'
     123            in self.browser.contents)
     124        self.assertTrue(
     125            'item_name="School Fee 2nd instalment" item_amt="485000" bank_id="120" acct_num="2461770000021"'
     126            in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.