Changeset 17792


Ignore:
Timestamp:
16 May 2024, 11:15:56 (7 months ago)
Author:
Henrik Bettermann
Message:

Customize serviceCodes.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/etranzact/browser.py

    r17735 r17792  
    1717##
    1818
     19import os
     20import csv
    1921from kofacustom.nigeria.etranzact.applicantsbrowser import (
    2022    EtranzactPageApplicant, EtranzactReceiveResponseApplicant,
     
    324326CREDO_HOST = "api.credocentral.com"
    325327
     328scodes_path = os.path.join(
     329    os.path.dirname(__file__), 'servicecodes.csv')
     330reader = csv.DictReader(open(scodes_path, 'rb'))
     331SCODES = {line['p_category']:line['serviceCode'] for line in reader}
     332
    326333class CustomCredoPageStudent(CredoPageStudent):
    327334
     
    329336    api_public_key = API_PUBLIC_KEY
    330337
     338    @property
     339    def serviceCode(self):
     340        return SCODES.get(self.context.p_category, None)
     341
    331342class CustomCredoPageApplicant(CredoPageApplicant):
    332343
     
    334345    api_public_key = API_PUBLIC_KEY
    335346
     347    @property
     348    def serviceCode(self):
     349        return SCODES.get(self.context.p_category, None)
     350
    336351class CustomCredoVerifyPaymentStatusPageStudent(CredoVerifyPaymentStatusPageStudent):
    337352
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py

    r17770 r17792  
    143143        'iuits': 'IUITS Fee',
    144144        'fine': 'Fine',
    145         'combi': 'Combi Payment',
     145        #'combi': 'Combi Payment',
    146146        #'resit1': '1 Make-Up Examination Course',
    147147        #'resit2': '2 Make-Up Examination Courses',
     
    192192        'cdlcourse14': '14 Courses',
    193193        'cdlcourse15': '15 Courses',
    194         'combi': 'Combi Payment',
     194        #'combi': 'Combi Payment',
    195195        }
    196196
Note: See TracChangeset for help on using the changeset viewer.