Changeset 11682 for main


Ignore:
Timestamp:
10 Jun 2014, 11:52:31 (11 years ago)
Author:
Henrik Bettermann
Message:

Fix fee calculation for 'Loss of ID Card' payments.

Location:
main/waeup.kwarapoly/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/CHANGES.txt

    r11677 r11682  
    441.2dev (unreleased)
    55===================
     6
     7* Fix fee calculation for 'Loss of ID Card' payments.
    68
    79* Change bank account numbers for hnd and rmd application fee payments.
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py

    r11677 r11682  
    244244        provider_amt = 300.0
    245245        dalash_amt = 200.0
     246        gateway_amt = GATEWAY_AMT
    246247        if self.applicant.applicant_id.startswith('hnd'):
    247248            xmldict['institution_acct'] = '1771440667'
     
    341342        xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
    342343        xmldict['institution_amt'] = 100 * (
    343             self.context.amount_auth - provider_amt - GATEWAY_AMT - dalash_amt)
    344         xmldict['institution_item_name'] = self.context.p_category
     344            self.context.amount_auth - provider_amt - gateway_amt - dalash_amt)
     345        xmldict['institution_item_name'] = self.category
    345346        xmldict['institution_name'] = INSTITUTION_NAME
    346347
     
    374375        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    375376        self.context.provider_amt = provider_amt
    376         self.context.gateway_amt = GATEWAY_AMT
     377        self.context.gateway_amt = gateway_amt
    377378        self.context.thirdparty_amt = dalash_amt
    378379        return
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r11677 r11682  
    371371        self.assertEqual(self.student['payments'][value].thirdparty_amt, 200.0)
    372372
     373        self.app['configuration']['2004'].loss_idcard_fee = 3000.0
     374        self.browser.open(self.payments_path + '/addop')
     375        self.browser.getControl(name="form.p_category").value = ['loss_idcard']
     376        self.browser.getControl("Create ticket").click()
     377        ctrl = self.browser.getControl(name='val_id')
     378        value = ctrl.options[6]
     379        self.browser.getLink(value).click()
     380        self.assertMatches('...Amount Authorized...', self.browser.contents)
     381        self.assertMatches(
     382            '...<span>3000.0</span>...', self.browser.contents)
     383        self.payment_url = self.browser.url
     384        self.browser.getLink("CollegePAY", index=0).click()
     385        self.assertEqual(self.student['payments'][value].amount_auth, 3000.0)
     386        self.assertEqual(self.student['payments'][value].provider_amt, 9.0)
     387        self.assertEqual(self.student['payments'][value].gateway_amt, 15.0)
     388        self.assertEqual(self.student['payments'][value].thirdparty_amt, 6.0)
     389
     390
    373391    @external_test
    374392    def test_webservice(self):
     
    511529            in self.browser.contents)
    512530        self.assertTrue(
    513             '<item_detail item_id="1" item_name="application" '
     531            '<item_detail item_id="1" item_name="Application Fee" '
    514532            'item_amt="253300" bank_id="120" acct_num="1771440667" />'
    515533            in self.browser.contents)
     
    523541        self.browser.getLink("CollegePAY", index=0).click()
    524542        self.assertTrue(
    525             '<item_detail item_id="1" item_name="application" '
     543            '<item_detail item_id="1" item_name="Application Fee" '
    526544            'item_amt="253300" bank_id="120" acct_num="1771440667" />'
    527545            in self.browser.contents)
     
    544562        self.browser.getLink("CollegePAY", index=0).click()
    545563        self.assertTrue(
    546             '<item_detail item_id="1" item_name="application" '
     564            '<item_detail item_id="1" item_name="Application Fee" '
    547565            'item_amt="303300" bank_id="8" acct_num="2013910271" />'
    548566            in self.browser.contents)
     
    559577        self.browser.getLink("CollegePAY", index=0).click()
    560578        self.assertTrue(
    561             '<item_detail item_id="1" item_name="application" '
     579            '<item_detail item_id="1" item_name="Application Fee" '
    562580            'item_amt="303300" bank_id="10" acct_num="0106259811" />'
    563581            in self.browser.contents)
     
    606624        self.browser.getLink("CollegePAY", index=0).click()
    607625        self.assertTrue(
    608             '<item_detail item_id="1" item_name="transcript_local" '
     626            '<item_detail item_id="1" item_name="ND Transcript (local)" '
    609627            'item_amt="450000" bank_id="9" acct_num="7000016724" />'
    610628            in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.