Changeset 13752 for main/waeup.fceokene


Ignore:
Timestamp:
29 Feb 2016, 12:33:05 (9 years ago)
Author:
Henrik Bettermann
Message:

New single account configuration.

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

    r13589 r13752  
    3535PROVIDER_ITEM_NAME = 'BT Education'
    3636INSTITUTION_NAME = 'FCEOkene'
     37INSTITUTION_ACCT = '2003670143'
     38INSTITUTION_BANK_ID = '8'
    3739CURRENCY = '566'
    3840GATEWAY_AMT = 150.0
     
    7577        xmldict['provider_amt'] = 100 * provider_amt
    7678        # Institution data
    77         fceokene_split_amt = 1400.0
    78         xmldict['fceokene_acct'] = "0000000000000"
    79         xmldict['institution_bank_id'] = '0'
     79        xmldict['institution_acct'] = INSTITUTION_ACCT
     80        xmldict['institution_bank_id'] = INSTITUTION_BANK_ID
    8081        xmldict['institution_item_name'] = self.category
    8182        xmldict['institution_name'] = INSTITUTION_NAME
    8283        if self.context.p_category in ('schoolfee', 'third_semester'):
    8384            self.pay_item_id = '8302'
    84             if student.current_mode in ('ct_ft',):
    85                 xmldict['institution_acct'] = "1012044039"
    86                 xmldict['institution_bank_id'] = '117'
    87             if student.current_mode in ('nce_sw','prence',):
    88                 xmldict['institution_acct'] = "1013780934"
    89                 xmldict['institution_bank_id'] = '117'
    90             elif student.current_mode in ('nce_ft',) and \
    91                 student['studycourse'].current_verdict == 'O':
    92                 xmldict['institution_acct'] = "1013780934"
    93                 xmldict['institution_bank_id'] = '117'
    94             elif student.current_mode in ('nce_ft',):
    95                 xmldict['institution_acct'] = "1013780934"
    96                 xmldict['institution_bank_id'] = '117'
    97             elif student.current_mode in ('pd_ft',):
    98                 xmldict['institution_acct'] = "1013780934"
    99                 xmldict['institution_bank_id'] = '117'
    100             #undergraduate schoolfee added
    101             elif student.current_mode in ('ug_ft',):
    102                 xmldict['institution_acct'] = "2010952698"
    103                 xmldict['institution_bank_id'] = '8'
    104             xmldict['fceokene_split'] = 100 * fceokene_split_amt
    105             xmldict['institution_amt'] = 100 * (
    106                 self.context.amount_auth - provider_amt -
    107                 GATEWAY_AMT - fceokene_split_amt)
    10885        elif 'maintenance' in self.context.p_category:
    109             fceokene_split_amt = 0.0
    11086            provider_amt = 0.0
    11187            self.pay_item_id = '8300'
    112             xmldict['institution_amt'] = 100 * (
    113                 self.context.amount_auth - GATEWAY_AMT)
    114             xmldict['institution_acct'] = "1013780934"
    115             xmldict['institution_bank_id'] = '117'
    11688        elif self.context.p_category == 'clearance':
    117             fceokene_split_amt = 0.0
    11889            provider_amt = 0.0
    11990            self.pay_item_id = '8304'
    120             xmldict['institution_amt'] = 100 * (
    121                 self.context.amount_auth - GATEWAY_AMT)
    122             xmldict['institution_acct'] = "2010952698"
    123             xmldict['institution_bank_id'] = '8'
    124 
    125         # Interswitch amount is not part of the xml data
    126         if self.context.p_category in ('schoolfee', 'third_semester'):
     91        xmldict['institution_amt'] = 100 * (
     92            self.context.amount_auth - GATEWAY_AMT - provider_amt)
     93        if provider_amt:
    12794            xmltext = """<payment_item_detail>
    12895<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    12996<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" />
    130 <item_detail item_id="2" item_name="FCEOkene Split" item_amt="%(fceokene_split)d" bank_id="117" acct_num="1013780934" />
    131 <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" />
     97<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" />
    13298</item_details>
    13399</payment_item_detail>""" % xmldict
    134 
    135100        else:
    136101            xmltext = """<payment_item_detail>
     
    143108        self.context.provider_amt = provider_amt
    144109        self.context.gateway_amt = GATEWAY_AMT
    145         self.context.thirdparty_amt = fceokene_split_amt
    146110        return
    147111
     
    172136        xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
    173137        # Institution data
    174         if getattr(
    175             self.applicant.__parent__, 'prefix', None) in ('pude', 'putme'):
    176             xmldict['institution_acct'] = '2010952698'
    177             xmldict['institution_bank_id'] = '8'
    178         else:
    179             xmldict['institution_acct'] = '1013780934'
    180             xmldict['institution_bank_id'] = '117'
     138        xmldict['institution_acct'] = INSTITUTION_ACCT
     139        xmldict['institution_bank_id'] = INSTITUTION_BANK_ID
    181140        xmldict['institution_amt'] = 100 * (self.context.amount_auth -
    182141            provider_amt - GATEWAY_AMT)
  • main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py

    r13616 r13752  
    9191        self.assertEqual(self.student['payments'][self.value].provider_amt, 1600.0)
    9292        self.assertEqual(self.student['payments'][self.value].gateway_amt, 150.0)
    93         self.assertEqual(self.student['payments'][self.value].thirdparty_amt, 1400.0)
    9493        self.assertMatches('...Total Amount Authorized:...',
    9594                           self.browser.contents)
     
    9897            in self.browser.contents)
    9998        self.assertTrue(
    100             'item_name="School Fee" item_amt="6730000" bank_id="117" acct_num="1013780934"'
    101             in self.browser.contents)
    102         self.assertTrue(
    103             'item_name="FCEOkene Split" item_amt="140000" bank_id="117" acct_num="1013780934"'
     99            'item_name="School Fee" item_amt="6870000" bank_id="8" acct_num="2003670143"'
    104100            in self.browser.contents)
    105101        self.assertTrue(
     
    123119            in self.browser.contents)
    124120        self.assertTrue(
    125             'item_name="NCE Third Semester Fee" item_amt="476300" bank_id="117" acct_num="1013780934"'
    126             in self.browser.contents)
    127         self.assertTrue(
    128             'item_name="FCEOkene Split" item_amt="140000" bank_id="117" acct_num="1013780934"'
     121            'item_name="NCE Third Semester Fee" item_amt="616300" bank_id="8" acct_num="2003670143"'
    129122            in self.browser.contents)
    130123        self.assertTrue(
     
    191184            in self.browser.contents)
    192185        self.assertTrue(
    193             'item_name="Hostel Maintenance Fee" item_amt="87600" bank_id="117" acct_num="1013780934"'
     186            'item_name="Hostel Maintenance Fee" item_amt="87600" bank_id="8" acct_num="2003670143"'
    194187            in self.browser.contents)
    195188        # BT does nor charge a fee for maintenance fee
     
    242235            self.browser.contents)
    243236        self.assertTrue(
    244             'item_name="Acceptance Fee" item_amt="345600" bank_id="8" acct_num="2010952698"'
     237            'item_name="Acceptance Fee" item_amt="345600" bank_id="8" acct_num="2003670143"'
    245238            in self.browser.contents)
    246239        # BT does nor charge a fee for maintenance fee
     
    401394        self.assertTrue(
    402395            '<item_detail item_id="1" item_name="application"'
    403             ' item_amt="35000" bank_id="117" acct_num="1013780934" />'
     396            ' item_amt="35000" bank_id="8" acct_num="2003670143" />'
    404397            in self.browser.contents)
    405398        delta = timedelta(days=8)
Note: See TracChangeset for help on using the changeset viewer.