Ignore:
Timestamp:
28 Feb 2022, 22:35:16 (3 years ago)
Author:
Henrik Bettermann
Message:

Implement school fe split payment.

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

Legend:

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

    r16790 r16849  
    9393        xmldict['institution_bank_id'] = '117'
    9494        provider_amt = 0.0
     95        tech_fee = 1200
    9596        if self.context.p_category == 'clearance':
    9697            provider_amt = 500.0
     98        if self.context.p_category == 'schoolfee':
     99            provider_amt = 2800.0
     100            tech_fee = 1200
    97101        self.pay_item_id = 'Default_Payable_MX47126' # must be provided by Interswitch
    98102        xmldict['provider_amt'] = 100 * provider_amt
     103        xmldict['tech_fee'] = 100 * tech_fee
    99104        xmldict['institution_item_name'] = self.context.category
    100105        xmldict['institution_name'] = INSTITUTION_NAME
     
    103108            self.context.provider_amt = provider_amt
    104109            self.context.amount_auth += provider_amt
     110        self.context.amount_auth += tech_fee
    105111        if provider_amt == 0:
    106112            xmltext = """<payment_item_detail>
     
    109115</item_details>
    110116</payment_item_detail>""" % xmldict
     117        elif tech_fee == 0:
     118            xmltext = """<payment_item_detail>
     119<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     120<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" />
     121<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" />
     122</item_details>
     123</payment_item_detail>""" % xmldict
    111124        else:
    112125            xmltext = """<payment_item_detail>
     
    114127<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" />
    115128<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" />
     129<item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="117" acct_num="1216063205" />
    116130</item_details>
    117131</payment_item_detail>""" % xmldict
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/tests.py

    r16835 r16849  
    7878        self.assertEqual(self.student.current_mode, 'ug_ft')
    7979        self.assertTrue(
    80             '<input type="hidden" name="amount" value="8025000" />' in
     80            '<input type="hidden" name="amount" value="8425000" />' in
    8181            self.browser.contents)
    8282        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.