Ignore:
Timestamp:
25 Mar 2021, 11:24:25 (3 years ago)
Author:
Henrik Bettermann
Message:

Customize payment options.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
6 edited

Legend:

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

    r16395 r16434  
    9696        if self.context.p_category in (
    9797            'schoolfee', 'schoolfee40', 'secondinstal'):
    98             xmldict['institution_acct'] = '1011005811'
    99             xmldict['institution_bank_id'] = '117'
    10098            self.pay_item_id = '101'
    10199        elif self.context.p_category == 'book':
    102             xmldict['institution_acct'] = '1013249587'
    103             xmldict['institution_bank_id'] = '117'
    104100            self.pay_item_id = '103'
    105101        elif self.context.p_category == 'parentsconsult':
    106             xmldict['institution_acct'] = '1012355544'
    107             xmldict['institution_bank_id'] = '117'
    108102            self.pay_item_id = '104'
    109103        elif self.context.p_category in (
    110104            'municipal_fresh', 'municipal_returning',
    111105            'transcript_local', 'transcript_overseas', 'transcript'):
    112             xmldict['institution_acct'] = '0040621193'
    113             xmldict['institution_bank_id'] = '31'
    114106            self.pay_item_id = '105'
    115107        else:
    116             xmldict['institution_acct'] = '1011050158'
    117             xmldict['institution_bank_id'] = '117'
    118108            self.pay_item_id = '102'
    119109        if self.context.p_category in (
     
    124114            provider_amt = 5000.0
    125115        if self.context.p_category.startswith('jupeb'):
    126             xmldict['institution_acct'] = '0787077169'
    127             xmldict['institution_bank_id'] = '31'
    128116            self.pay_item_id = '102'
    129117        xmldict['provider_amt'] = 100 * provider_amt
     
    132120        xmldict['institution_amt'] = 100 * self.context.net_amt - (
    133121            100 * provider_amt)
     122
     123        if self.context.p_option == 'access':
     124            xmldict['institution_acct'] = '0040484781'
     125            xmldict['institution_bank_id'] = '31'
     126        elif self.context.p_option == 'first':
     127            xmldict['institution_acct'] = '2021420049'
     128            xmldict['institution_bank_id'] = '8'
     129        elif self.context.p_option == 'zenith':
     130            xmldict['institution_acct'] = '1011005811'
     131            xmldict['institution_bank_id'] = '117'
     132        else:
     133            xmldict['institution_acct'] = '0040484781'
     134            xmldict['institution_bank_id'] = '31'
     135
    134136        if provider_amt == 0:
    135137            xmltext = """<payment_item_detail>
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py

    r16292 r16434  
    6060        self.browser.open(self.payments_path + '/addop')
    6161        self.browser.getControl(name="form.p_category").value = ['registration']
     62        self.browser.getControl(name="form.p_option").value = ['first']
    6263        self.browser.getControl("Create payment").click()
    6364        self.assertTrue('Payment created' in self.browser.contents)
     
    8283        # WAeAC charge have been substracted
    8384        self.assertTrue(
    84             'item_name="Registration Fee" item_amt="200000" bank_id="117" acct_num="1011050158"' in
     85            'item_name="Registration Fee" item_amt="200000" bank_id="8" acct_num="2021420049"' in
    8586            self.browser.contents)
    8687        self.assertTrue(
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/locales/en/LC_MESSAGES/waeup.kofa.po

    r16292 r16434  
    144144msgid "Personal Data of"
    145145msgstr "Course Registration Clearance of"
     146
     147msgid "Payment Option:"
     148msgstr "Debit Card:"
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_export.py

    r16403 r16434  
    6969        # set values we can expect in export file
    7070        self.setup_student(self.student)
    71         self.student['payments']['my-payment'].r_company = 'interswatch'
     71        self.student['payments']['my-payment'].r_company = 'interswitch'
     72        self.student['payments']['my-payment'].p_option = 'first'
    7273        self.student['payments']['my-payment'].r_card_num = '789'
    7374        exporter = CustomStudentPaymentExporter()
     
    7677        self.assertMatches(
    7778            'ac,amount_auth,creation_date,gateway_amt,net_amt,p_category,p_combi,p_current,'
    78             'p_id,p_item,p_level,p_session,p_state,payment_date,provider_amt,'
     79            'p_id,p_item,p_level,p_option,p_session,p_state,payment_date,provider_amt,'
    7980            'r_amount_approved,r_card_num,r_code,r_company,r_desc,'
    8081            'r_pay_reference,thirdparty_amt,student_id,state,'
    8182            'current_session,entry_session\r\n'
    8283            '666,12.12,%s-04-01 13:12:01#,,,schoolfee,[],1,my-id,p-item,'
    83             '100,%s,paid,%s-04-01 14:12:01#,,12.12,'
    84             '789,r-code,interswatch,,,,A111111,created,2012,2010\r\n'
     84            '100,first,%s,paid,%s-04-01 14:12:01#,,12.12,'
     85            '789,r-code,interswitch,,,,A111111,created,2012,2010\r\n'
    8586            % (curr_year-6, curr_year-6, curr_year-6), result
    8687            )
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py

    r16395 r16434  
    209209        }
    210210
     211    PAYMENT_OPTIONS = {
     212        'first': 'First Bank Debit Card',
     213        'access': 'Access Bank Debit Card',
     214        'zenith': 'Zenith Bank Debit Card',
     215        'other': 'Other Bank Debit Card',
     216        }
     217
    211218    APP_CATS_DICT = {
    212219        'basic': 'UAS, PUTME, PUDE, PCE, PRENCE',
Note: See TracChangeset for help on using the changeset viewer.