Changeset 16725


Ignore:
Timestamp:
25 Nov 2021, 14:45:45 (3 years ago)
Author:
Henrik Bettermann
Message:

Split PAD Pack payments.

Set net amount correctly.

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

Legend:

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

    r16563 r16725  
    550550        )
    551551
    552     pa_fee = schema.Float(
    553         title = _(u'PAD Pack'),
    554         default = 0.0,
    555         required = True,
    556         )
     552    #pa_fee = schema.Float(
     553    #    title = _(u'PAD Pack'),
     554    #    default = 0.0,
     555    #    required = True,
     556    #    )
    557557
    558558
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py

    r16563 r16725  
    229229            xmldict['institution_acct'] = '1012808851'
    230230            xmldict['institution_bank_id'] = '117'
    231         elif self.context.p_category == 'pa':
    232             self.pay_item_id = '166'
    233             xmldict['institution_acct'] = '0160125880'
    234             xmldict['institution_bank_id'] = '11'
    235231        elif self.context.p_category in SPECIAL_PAYMENT_PARAMS.keys():
    236232            self.pay_item_id = SPECIAL_PAYMENT_PARAMS[self.context.p_category][0]
     
    604600</payment_item_detail>""" % xmldict
    605601
     602        if self.context.p_category == 'pa':
     603            self.pay_item_id = '166'
     604            # amount_auth is being ignored. However, the sum of all split payments
     605            # must coincide with the amount_auth configured in students/utils.py
     606            xmldict['amt1'] = 100 * 500
     607            xmldict['amt2'] = 100 * 500
     608            xmltext = """<payment_item_detail>
     609<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     610<item_detail item_id="1" item_name="PAD" item_amt="%(amt1)d" bank_id="11" acct_num="0160125880" />
     611<item_detail item_id="2" item_name="NAPAS" item_amt="%(amt2)d" bank_id="11" acct_num="0164863395" />
     612</item_details>
     613</payment_item_detail>""" % xmldict
     614
    606615
    607616        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    608617        self.context.provider_amt = provider_amt
    609618        self.context.gateway_amt = GATEWAY_AMT
     619        self.context.net_amt = self.context.amount_auth - GATEWAY_AMT
    610620        self.amount_auth = int(100 * self.context.amount_auth)
    611621        hashargs = (
     
    697707        self.context.provider_amt = provider_amt
    698708        self.context.gateway_amt = GATEWAY_AMT
     709        self.context.net_amt = self.context.amount_auth - GATEWAY_AMT
    699710        self.amount_auth = int(100 * self.context.amount_auth)
    700711        hashargs = (
Note: See TracChangeset for help on using the changeset viewer.