Ignore:
Timestamp:
18 Jun 2012, 17:02:17 (13 years ago)
Author:
Henrik Bettermann
Message:

Disable QUERY_STRING processing until eTranzact has replied to Uli's mail.

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

    r8746 r8754  
    4343
    4444    def update(self, PAYEE_ID=None):
    45         # It seems eTranzact sends a POST request with an empty body but the URL
    46         # contains a query string. So it's actually a GET request pretended
    47         # to be a POST request. Although this does not comply with the
    48         # RFC 2616 HTTP guidelines we try to fetch the id from the QUERY_STRING
    49         # value of the request.
    5045        real_ip = self.request.get('HTTP_X_FORWARDED_FOR', None)
    5146        if real_ip  and ACCEPTED_IP:
     
    5348                self.output = '-4'
    5449                return
    55         if PAYEE_ID is None:
    56             try:
    57                 PAYEE_ID = self.request['QUERY_STRING'].split('=')[1]
    58             except:
    59                 self.output = '-2'
    60                 return
     50
     51        # It seems eTranzact sends a POST request with an empty body but the URL
     52        # contains a query string. So it's actually a GET request pretended
     53        # to be a POST request. Although this does not comply with the
     54        # RFC 2616 HTTP guidelines we may try to fetch the id from the QUERY_STRING
     55        # value of the request.
     56
     57        #if PAYEE_ID is None:
     58        #    try:
     59        #        PAYEE_ID = self.request['QUERY_STRING'].split('=')[1]
     60        #    except:
     61        #        self.output = '-2'
     62        #        return
     63
    6164        cat = getUtility(ICatalog, name='payments_catalog')
    6265        results = list(cat.searchResults(p_id=(PAYEE_ID, PAYEE_ID)))
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py

    r8733 r8754  
    5050        # Managers can add online payment tickets
    5151        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     52        self.app['configuration']['2004'].school_fee_base = 1234.0
    5253        self.browser.open(self.payments_path)
    5354        IWorkflowState(self.student).setState('cleared')
     
    5657        self.assertMatches('...ticket created...',
    5758                           self.browser.contents)
     59
    5860        ctrl = self.browser.getControl(name='val_id')
    5961        value = ctrl.options[0]
     
    7880            'RETURN_TYPE=%s&'
    7981            'PROGRAMME_TYPE=CERT1&'
    80             'PAYMENT_TYPE=School Fee&'
     82            'PAYMENT_TYPE=School Fee 1st instalment&'
    8183            'ACADEMIC_SESSION=2004/2005&'
    8284            'MATRIC_NO=E1000000&'
    83             'FEE_AMOUNT=40000.0&'
     85            'FEE_AMOUNT=1234.0&'
    8486            'TRANSACTION_STATUS=unpaid' % self.p_id)
    8587
Note: See TracChangeset for help on using the changeset viewer.