Ignore:
Timestamp:
21 May 2015, 17:05:42 (10 years ago)
Author:
Henrik Bettermann
Message:

To guarantee that cleared students pay both acceptance fees and
school fees, a school fee payment POST request to the Interswitch
CollegePAY payment gateway can only be sent if
acceptance/clearance fee has been successfully queried/paid
beforehand. This requirement applies to students in state 'cleared'
and entry_session greater than 2013 only, see ticket #119.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/etranzact
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py

    r12965 r12975  
    283283            return
    284284        student = self.context.student
    285         if self.context.student.state != CLEARED:
    286             return
    287         if self.context.student.entry_session < 2013:
     285        if student.state != CLEARED:
     286            return
     287        if student.entry_session < 2013:
    288288            return
    289289        for ticket in student['payments'].values():
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py

    r12429 r12975  
    6161                           self.browser.contents)
    6262        ctrl = self.browser.getControl(name='val_id')
    63         value = ctrl.options[0]
    64         self.student['payments'][value].approve()
     63        value1 = ctrl.options[0]
    6564
    6665        self.browser.open(self.payments_path + '/addop')
     
    7069                           self.browser.contents)
    7170        ctrl = self.browser.getControl(name='val_id')
    72         value = ctrl.options[1]
    73         self.p_id = value
    74         self.browser.getLink(value).click()
     71        value2 = ctrl.options[1]
     72        self.p_id = value2
     73        self.browser.getLink(value2).click()
    7574        self.assertMatches('...Amount Authorized...',
    7675                           self.browser.contents)
     
    7877
    7978    def test_enterpin(self):
     79        self.student['studycourse'].entry_session = 2013
     80        self.browser.open(self.payment_url)
    8081        self.browser.getLink("Query eTranzact History").click()
    81         self.assertMatches(
    82             '...Confirmation Number (PIN)...',
    83             self.browser.contents)
     82        self.assertTrue(
     83            'Please pay acceptance fee firs' in self.browser.contents)
     84        self.assertFalse(
     85            'Confirmation Number (PIN)' in self.browser.contents)
     86        self.student['payments'].values()[0].approve()
     87        self.browser.getLink("Query eTranzact History").click()
     88        self.assertFalse(
     89            'Please pay acceptance fee firs' in self.browser.contents)
     90        self.assertTrue(
     91            'Confirmation Number (PIN)' in self.browser.contents)
    8492
    8593    def test_webservice(self):
Note: See TracChangeset for help on using the changeset viewer.