Changeset 15728 for main


Ignore:
Timestamp:
31 Oct 2019, 15:14:54 (5 years ago)
Author:
Henrik Bettermann
Message:

Go live.

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

Legend:

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

    r15726 r15728  
    3030from kofacustom.iuokada.interfaces import MessageFactory as _
    3131
    32 PRODUCT_ID = '6207' # must be provided by Interswitch
     32PRODUCT_ID = '7922'
    3333SITE_NAME = 'iuokada-kofa.waeup.org'
    3434PROVIDER_ACCT = '0773411069'
     
    3737INSTITUTION_NAME = 'IUOkada'
    3838CURRENCY = '566'
    39 GATEWAY_AMT = 300.0
    40 MAC = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3' # must be provided by Interswitch
    41 
    42 #POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay'
    43 POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay'
    44 #HOST = 'webpay.interswitchng.com'
    45 HOST = 'sandbox.interswitchng.com'
    46 #URL = '/paydirect/api/v1/gettransaction.json'
    47 URL = '/webpay/api/v1/gettransaction.json'
     39GATEWAY_AMT = 250.0
     40#MAC = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3' # must be provided by Interswitch
     41MAC = '4D8723F33D728BE3F4A77B2DFB3F57B0BCF2DD818759D54A87B2A60874067F28D94F2B91E29BFB884F920F48E0973D826835A8F2D6F74220C64EDE4DE00E45AA'
     42
     43POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay'
     44#POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay'
     45HOST = 'webpay.interswitchng.com'
     46#HOST = 'sandbox.interswitchng.com'
     47URL = '/paydirect/api/v1/gettransaction.json'
     48#URL = '/webpay/api/v1/gettransaction.json'
    4849
    4950httplib.HTTPSConnection.debuglevel = 0
     
    7475        xmldict['provider_bank_id'] = PROVIDER_BANK_ID
    7576        xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
     77        provider_amt = 0.0
     78        xmldict['institution_acct'] = ''
     79        xmldict['institution_bank_id'] = ''
     80        provider_amt = 5000.0
     81        self.pay_item_id = ''
    7682        # Institution data
    77         xmldict['institution_acct'] = '0040484781'
    78         xmldict['institution_bank_id'] = '31'
    79         provider_amt = 5000.0
    80         self.pay_item_id = '101' # '103' # must be provided by Interswitch
     83        if self.context.p_category in (
     84            'schoolfee', 'schoolfee40', 'secondinstal'):
     85            xmldict['institution_acct'] = '1011005811'
     86            xmldict['institution_bank_id'] = '117'
     87            self.pay_item_id = '101'
     88        elif self.context.p_category == 'book':
     89            xmldict['institution_acct'] = '1013249587'
     90            xmldict['institution_bank_id'] = '117'
     91            self.pay_item_id = '103'
     92        elif self.context.p_category == 'parentsconsult':
     93            xmldict['institution_acct'] = '1012355544'
     94            xmldict['institution_bank_id'] = '117'
     95            self.pay_item_id = '104'
     96        else:
     97            xmldict['institution_acct'] = '1011050158'
     98            xmldict['institution_bank_id'] = '117'
     99            self.pay_item_id = '102'
     100        if self.context.p_category == 'registration':
     101            provider_amt = 5000.0
    81102        xmldict['provider_amt'] = 100 * provider_amt
    82103        xmldict['institution_item_name'] = self.context.category
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py

    r15721 r15728  
    7272        self.payment_url = self.browser.url
    7373        self.browser.getLink("Pay via Interswitch", index=0).click()
    74         self.assertTrue('<input type="hidden" name="pay_item_id" value="103" />' in
     74        self.assertTrue('<input type="hidden" name="pay_item_id" value="101" />' in
    7575                           self.browser.contents)
    7676        self.assertEqual(self.student.current_mode, 'ug_ft')
     
    7979            self.browser.contents)
    8080        self.assertTrue(
    81             'item_name="Tuition Plus (total amount)" item_amt="3470000" bank_id="31" acct_num="0040484781"' in
     81            'item_name="Tuition Plus (total amount)" item_amt="3475000" bank_id="117" acct_num="1011005811"' in
    8282            self.browser.contents)
    8383
     
    9393        self.browser.open(self.payments_path + '/xyz')
    9494        self.browser.getLink("Pay via Interswitch", index=0).click()
    95         self.assertMatches('...<input type="hidden" name="pay_item_id" value="103" />...',
     95        self.assertMatches('...<input type="hidden" name="pay_item_id" value="102" />...',
    9696                           self.browser.contents)
    9797        self.assertMatches('...Total Amount Authorized:...',
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py

    r15686 r15728  
    3131        'secondinstal': 'Tuition Plus (60% - 2nd instalment))',
    3232        'clearance': 'Acceptance Fee',
     33        'registration': 'Registration Fee',
    3334        #'bed_allocation': 'Bed Allocation Fee',
    3435        #'hostel_maintenance': 'Accommodation',
     
    5859        'schoolfee40': 'Tuition, Accommodation, Adm. Charges (40% - 1st instalment)',
    5960        'secondinstal': 'Tuition, Accommodation, Adm. Charges (60% - 2nd instalment)',
     61        'registration': 'Registration Fee',
    6062        #'bed_allocation': 'Bed Allocation Fee',
    6163        #'hostel_maintenance': 'Accommodation',
     
    8385    PREVIOUS_PAYMENT_CATEGORIES = {
    8486        'schoolfee': 'Tuition, Accommodation, Adm. Charges (total amount)',
     87        'registration': 'Registration Fee',
    8588        'application': 'Application Fee',
    8689        'late_registration': 'Late Registration Fee',
Note: See TracChangeset for help on using the changeset viewer.