Changeset 14342


Ignore:
Timestamp:
14 Dec 2016, 11:06:52 (8 years ago)
Author:
Henrik Bettermann
Message:

Set mac key.

Enable installment payment.

File:
1 edited

Legend:

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

    r14336 r14342  
    6868        student = self.student
    6969        xmldict = self.xmldict
     70        self.pay_item_id = '0000'
    7071        # Provider data
    7172        xmldict['detail_ref'] = self.context.p_id
     
    7374        xmldict['provider_bank_id'] = PROVIDER_BANK_ID
    7475        xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
     76        provider_amt = 500.0
    7577        # Institution data
    7678        xmldict['institution_acct'] = '1019684470'
    7779        xmldict['institution_bank_id'] = '7'
    78         provider_amt = 500.0
    79         self.pay_item_id = '0000'
    80         xmldict['provider_amt'] = 100 * provider_amt
    8180        xmldict['institution_item_name'] = self.context.category
    8281        xmldict['institution_name'] = INSTITUTION_NAME
     82        if self.context.p_category == 'clearance':
     83            self.pay_item_id = '102'
     84        elif self.context.p_category.startswith('schoolfee'):
     85            self.pay_item_id = '103'
     86            if self.context.p_category in ('schoolfee', 'schoolfee_1'):
     87                provider_amt = 4000.0
     88        xmldict['provider_amt'] = 100 * provider_amt
    8389        xmldict['institution_amt'] = 100 * (
    8490            self.context.amount_auth - provider_amt - GATEWAY_AMT)
    85         if self.context.p_category == 'clearance':
    86             self.pay_item_id = '102'
    87         elif self.context.p_category == 'schoolfee':
    88             self.pay_item_id = '103'
     91
    8992        # Interswitch amount is not part of the xml data
    9093        if provider_amt == 0:
     
    174177    gateway_host = HOST
    175178    gateway_url = URL
     179    mac = '9309B5CBF1BFB09693C6F5F578046E3FCAB0A2538C3FE4221A6E63AFD348DE888E655F9C7E9F112151A702B6B09E6A7ACC5B3BF3C701F0C1B0D8EA6C1872AE94'
    176180
    177181class CustomInterswitchPaymentVerifyWebservicePageStudent(
     
    183187    gateway_host = HOST
    184188    gateway_url = URL
     189    mac = '9309B5CBF1BFB09693C6F5F578046E3FCAB0A2538C3FE4221A6E63AFD348DE888E655F9C7E9F112151A702B6B09E6A7ACC5B3BF3C701F0C1B0D8EA6C1872AE94'
    185190
    186191class CustomInterswitchPaymentRequestWebservicePageApplicant(
     
    202207    gateway_host = HOST
    203208    gateway_url = URL
     209    mac = '9309B5CBF1BFB09693C6F5F578046E3FCAB0A2538C3FE4221A6E63AFD348DE888E655F9C7E9F112151A702B6B09E6A7ACC5B3BF3C701F0C1B0D8EA6C1872AE94'
Note: See TracChangeset for help on using the changeset viewer.