Ignore:
Timestamp:
12 Dec 2016, 12:02:31 (8 years ago)
Author:
Henrik Bettermann
Message:

Configure schoolfee and clearance payments.

Location:
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/interswitch
Files:
2 edited

Legend:

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

    r14301 r14336  
    5858    currency = CURRENCY
    5959    product_id = PRODUCT_ID
    60     mac = ''
     60    mac = '9309B5CBF1BFB09693C6F5F578046E3FCAB0A2538C3FE4221A6E63AFD348DE888E655F9C7E9F112151A702B6B09E6A7ACC5B3BF3C701F0C1B0D8EA6C1872AE94'
    6161
    6262    def update(self):
     
    7474        xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
    7575        # Institution data
    76         xmldict['institution_acct'] = '00000000'
    77         xmldict['institution_bank_id'] = '00'
    78         xmldict['institution_amt'] = '0.0'
    79         provider_amt = 0.0
     76        xmldict['institution_acct'] = '1019684470'
     77        xmldict['institution_bank_id'] = '7'
     78        provider_amt = 500.0
    8079        self.pay_item_id = '0000'
    8180        xmldict['provider_amt'] = 100 * provider_amt
     
    8483        xmldict['institution_amt'] = 100 * (
    8584            self.context.amount_auth - provider_amt - GATEWAY_AMT)
     85        if self.context.p_category == 'clearance':
     86            self.pay_item_id = '102'
     87        elif self.context.p_category == 'schoolfee':
     88            self.pay_item_id = '103'
    8689        # Interswitch amount is not part of the xml data
    8790        if provider_amt == 0:
  • main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/interswitch/tests.py

    r14035 r14336  
    6868                           self.browser.contents)
    6969        self.assertMatches(
    70             '...<span>40000.0</span>...',
     70            '...<span>79500.0</span>...',
    7171            self.browser.contents)
    7272        self.payment_url = self.browser.url
    7373        self.browser.getLink("CollegePAY", index=0).click()
    74         self.assertMatches('...<input type="hidden" name="pay_item_id" value="0000" />...',
     74        self.assertMatches('...<input type="hidden" name="pay_item_id" value="103" />...',
    7575                           self.browser.contents)
    7676        self.assertMatches('...Total Amount Authorized:...',
     
    7878        self.assertEqual(self.student.current_mode, 'ug_ft')
    7979        self.assertMatches(
    80             '...<input type="hidden" name="amount" value="4000000" />...',
    81             self.browser.contents)
    82         self.assertMatches(
    83             '...item_name="School Fee" item_amt="4000000" bank_id="00" acct_num="00000000"...',
     80            '...<input type="hidden" name="amount" value="7950000" />...',
     81            self.browser.contents)
     82        self.assertMatches(
     83            '...item_name="School Fee" item_amt="7950000" bank_id="7" acct_num="1019684470"...',
    8484            self.browser.contents)
    8585
     
    9595        self.browser.open(self.payments_path + '/xyz')
    9696        self.browser.getLink("CollegePAY", index=0).click()
    97         self.assertMatches('...<input type="hidden" name="pay_item_id" value="0000" />...',
     97        self.assertMatches('...<input type="hidden" name="pay_item_id" value="102" />...',
    9898                           self.browser.contents)
    9999        self.assertMatches('...Total Amount Authorized:...',
Note: See TracChangeset for help on using the changeset viewer.