Ignore:
Timestamp:
7 Mar 2018, 12:48:34 (7 years ago)
Author:
Henrik Bettermann
Message:

Deduct tech fee.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch
Files:
2 edited

Legend:

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

    r14953 r14961  
    132132        xmldict['institution_amt'] = '0.0'
    133133        provider_amt = 0.0
     134        tech_fee = 0.0
    134135        if self.context.p_category.startswith('schoolfee'):
    135136            self.pay_item_id = '102'
    136137            provider_amt = 2800.0
     138            tech_fee = 1200.0
    137139            if student.faccode == 'SPAT':
    138140                xmldict['institution_acct'] = '1012808851'
     
    160162            xmldict['institution_bank_id'] = SPECIAL_PAYMENT_PARAMS[self.context.p_category][3]
    161163        xmldict['provider_amt'] = 100 * provider_amt
     164        xmldict['tech_fee'] = 100 * tech_fee
    162165        xmldict['institution_item_name'] = self.context.category
    163166        xmldict['institution_name'] = INSTITUTION_NAME
    164167        xmldict['institution_amt'] = institution_amt = 100 * (
    165             self.context.amount_auth - provider_amt - GATEWAY_AMT)
     168            self.context.amount_auth - provider_amt - tech_fee - GATEWAY_AMT)
     169
    166170        if provider_amt == 0:
    167171            xmltext = """<payment_item_detail>
     
    170174</item_details>
    171175</payment_item_detail>""" % xmldict
    172         else:
     176        elif tech_fee == 0:
    173177            xmltext = """<payment_item_detail>
    174178<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    175179<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" />
    176180<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" />
     181</item_details>
     182</payment_item_detail>""" % xmldict
     183        else:
     184            xmltext = """<payment_item_detail>
     185<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     186<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" />
     187<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" />
     188<item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="030" acct_num="5100189030" />
    177189</item_details>
    178190</payment_item_detail>""" % xmldict
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py

    r14953 r14961  
    9292            self.browser.contents)
    9393        self.assertTrue(
    94             'item_name="School Fee" item_amt="2695000" bank_id="11" acct_num="0010761873"' in
     94            'item_name="School Fee" item_amt="2575000" bank_id="11" acct_num="0010761873"' in
    9595            self.browser.contents)
    9696        # ND FT Non-Deltan Fresh Student Acceptance Fee
     
    199199        self.payment_url = self.browser.url
    200200        self.browser.getLink("CollegePAY", index=0).click()
    201         self.assertTrue('<item_detail item_id="1" item_name="School Fee 1" item_amt="1617000" bank_id="117" acct_num="1012808851" />'
    202             in self.browser.contents)
    203         self.assertTrue('<item_detail item_id="2" item_name="School Fee 2" item_amt="1078000" bank_id="123" acct_num="1002883141" />'
     201        self.assertTrue('<item_detail item_id="1" item_name="School Fee 1" item_amt="1545000" bank_id="117" acct_num="1012808851" />'
     202            in self.browser.contents)
     203        self.assertTrue('<item_detail item_id="2" item_name="School Fee 2" item_amt="1030000" bank_id="123" acct_num="1002883141" />'
    204204            in self.browser.contents)
    205205        self.assertTrue('<item_detail item_id="3" item_name="BT Education" item_amt="280000" bank_id="8" acct_num="2028964403" />'
Note: See TracChangeset for help on using the changeset viewer.