- Timestamp:
- 18 Jun 2012, 17:02:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r8746 r8754 43 43 44 44 def update(self, PAYEE_ID=None): 45 # It seems eTranzact sends a POST request with an empty body but the URL46 # contains a query string. So it's actually a GET request pretended47 # to be a POST request. Although this does not comply with the48 # RFC 2616 HTTP guidelines we try to fetch the id from the QUERY_STRING49 # value of the request.50 45 real_ip = self.request.get('HTTP_X_FORWARDED_FOR', None) 51 46 if real_ip and ACCEPTED_IP: … … 53 48 self.output = '-4' 54 49 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 61 64 cat = getUtility(ICatalog, name='payments_catalog') 62 65 results = list(cat.searchResults(p_id=(PAYEE_ID, PAYEE_ID)))
Note: See TracChangeset for help on using the changeset viewer.