Ignore:
Timestamp:
30 Aug 2012, 11:16:57 (12 years ago)
Author:
Henrik Bettermann
Message:

Configure FCEOkene student school fee data.

Location:
main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/browser.py

    r9108 r9129  
    178178    site_name = SITE_NAME
    179179    currency = CURRENCY
    180     pay_item_id = '8303'
     180    pay_item_id = '8302'
    181181    product_id = PRODUCT_ID
    182182
     
    212212        # Institution data
    213213        studycourse = student['studycourse']
    214         xmldict['institution_acct'] = '000000000000'
    215         xmldict['institution_bank_id'] = '00'
    216         xmldict['institution_amt'] = 100 * (self.context.amount_auth - 500 - 150)
     214        if student.current_mode in ('ug_sw','prence',):
     215            xmldict['institution_acct'] = "6216801025"
     216            xmldict['institution_bank_id'] = '117'
     217        elif student.current_mode in ('ug_ft',) and \
     218            student['studycourse'].current_verdict == 'O':
     219            xmldict['institution_acct'] = "6216801025"
     220            xmldict['institution_bank_id'] = '117'
     221        elif student.current_mode in ('ug_ft',):
     222            xmldict['institution_acct'] = "6216801033"
     223            xmldict['institution_bank_id'] = '117'
     224        elif student.current_mode in ('pd_ft',):
     225            xmldict['institution_acct'] = "6216801025"
     226            xmldict['institution_bank_id'] = '117'
     227        else:
     228            xmldict['fceokene_acct'] = "0000000000000"
     229            xmldict['institution_bank_id'] = '0'
     230        xmldict['fceokene_split'] = 100 * 1400
     231        xmldict['institution_amt'] = 100 * (
     232            self.context.amount_auth - 500 - 150 - 1400)
    217233        xmldict['institution_item_name'] = self.context.p_category
    218234        xmldict['institution_name'] = INSTITUTION_NAME
     
    221237<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    222238<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" />
    223 <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" />
     239<item_detail item_id="2" item_name="FCEOkene Split" item_amt="%(fceokene_split)s" bank_id="117" acct_num="6216801058" />
     240<item_detail item_id="3" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
    224241</item_details>
    225242</payment_item_detail>""" % xmldict
  • main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py

    r8528 r9129  
    8181        self.assertMatches('...Total Amount Authorized:...',
    8282                           self.browser.contents)
    83         # The total amount to be processed by Interswitch
    84         # has been reduced by the Interswitch fee of 150 Nairas
    8583        self.assertMatches(
    8684            '...<input type="hidden" name="amount" value="4000000.0" />...',
     85            self.browser.contents)
     86        self.assertMatches(
     87            '...item_name="schoolfee" item_amt="3795000" bank_id="117" acct_num="6216801033"...',
     88            self.browser.contents)
     89        self.assertMatches(
     90            '...item_name="FCEOkene Split" item_amt="140000" bank_id="117" acct_num="6216801058"...',
     91            self.browser.contents)
     92        self.assertMatches(
     93            '...item_name="BT Education" item_amt="50000" bank_id="31" acct_num="0026781725"...',
    8794            self.browser.contents)
    8895
Note: See TracChangeset for help on using the changeset viewer.