Changeset 16850


Ignore:
Timestamp:
1 Mar 2022, 09:35:12 (3 years ago)
Author:
Henrik Bettermann
Message:

Add fees only once.

File:
1 edited

Legend:

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

    r16849 r16850  
    7575            self.redirect(self.url(self.context, '@@index'))
    7676            return
    77         # Already now it becomes an Interswitch payment. We set the net amount
    78         # and add the gateway amount.
    79         if not self.context.r_company:
    80             self.context.net_amt = self.context.amount_auth
    81             self.context.amount_auth += self.gateway_amt
    82             self.context.gateway_amt = self.gateway_amt
    83             self.context.r_company = u'interswitch'
    8477        student = self.student
    8578        xmldict = self.xmldict
     
    9386        xmldict['institution_bank_id'] = '117'
    9487        provider_amt = 0.0
    95         tech_fee = 1200
     88        tech_fee = 0.0
    9689        if self.context.p_category == 'clearance':
    9790            provider_amt = 500.0
    9891        if self.context.p_category == 'schoolfee':
    9992            provider_amt = 2800.0
    100             tech_fee = 1200
     93            tech_fee = 1200.0
    10194        self.pay_item_id = 'Default_Payable_MX47126' # must be provided by Interswitch
     95        # Already now it becomes an Interswitch payment. We set the net amount
     96        # and add gateway amount and other surcharges.
     97        if not self.context.r_company:
     98            self.context.r_company = u'interswitch'
     99            self.context.net_amt = self.context.amount_auth
     100            self.context.gateway_amt = self.gateway_amt
     101            self.context.amount_auth += self.gateway_amt
     102            self.context.provider_amt = provider_amt
     103            self.context.amount_auth += provider_amt
     104            self.context.amount_auth += tech_fee
    102105        xmldict['provider_amt'] = 100 * provider_amt
    103106        xmldict['tech_fee'] = 100 * tech_fee
     
    105108        xmldict['institution_name'] = INSTITUTION_NAME
    106109        xmldict['institution_amt'] = 100 * self.context.net_amt
    107         if not self.context.provider_amt:
    108             self.context.provider_amt = provider_amt
    109             self.context.amount_auth += provider_amt
    110         self.context.amount_auth += tech_fee
    111110        if provider_amt == 0:
    112111            xmltext = """<payment_item_detail>
Note: See TracChangeset for help on using the changeset viewer.