Changeset 8746
- Timestamp:
- 18 Jun 2012, 06:59:17 (13 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue
- Property svn:mergeinfo changed
/main/waeup.uniben/trunk/src/waeup/uniben merged: 8741
- Property svn:mergeinfo changed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r8728 r8746 312 312 """ 313 313 314 def loggerInfo(ob_class, comment):314 def writeLogMessage(view, comment): 315 315 """Adds an INFO message to the log file 316 316 """ -
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r8734 r8746 33 33 from waeup.aaue.applicants.interfaces import ICustomApplicantOnlinePayment 34 34 35 ACCEPTED_IP = None 36 35 37 # Kofa's webservice 36 38 … … 41 43 42 44 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. 50 real_ip = self.request.get('HTTP_X_FORWARDED_FOR', None) 51 if real_ip and ACCEPTED_IP: 52 if real_ip != ACCEPTED_IP: 53 self.output = '-4' 54 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 43 61 cat = getUtility(ICatalog, name='payments_catalog') 44 62 results = list(cat.searchResults(p_id=(PAYEE_ID, PAYEE_ID))) 45 63 if len(results) != 1: 46 64 self.output = '-1' 47 else:48 49 50 51 52 53 54 55 self.output = '-1'56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 65 return 66 try: 67 owner = IPaymentWebservice(results[0]) 68 full_name = owner.display_fullname 69 matric_no = owner.id 70 faculty = owner.faculty 71 department = owner.department 72 except (TypeError, AttributeError): 73 self.output = '-3' 74 return 75 amount = results[0].amount_auth 76 payment_type = results[0].category 77 programme_type = results[0].p_item 78 academic_session = academic_sessions_vocab.getTerm( 79 results[0].p_session).title 80 status = results[0].p_state 81 self.output = ( 82 'FULL_NAME=%s&' + 83 'FACULTY=%s&' + 84 'DEPARTMENT=%s&' + 85 'RETURN_TYPE=%s&' + 86 'PROGRAMME_TYPE=%s&' + 87 'PAYMENT_TYPE=%s&' + 88 'ACADEMIC_SESSION=%s&' + 89 'MATRIC_NO=%s&' + 90 'FEE_AMOUNT=%s&' + 91 'TRANSACTION_STATUS=%s') % (full_name, faculty, 92 department, PAYEE_ID, programme_type, payment_type, 93 academic_session, matric_no, amount, status) 76 94 return 77 95 -
main/waeup.aaue/trunk/src/waeup/aaue/students/payments.py
r8712 r8746 43 43 return 44 44 45 def getStudent(self): 45 @property 46 def student(self): 46 47 return self.__parent__.__parent__ 47 48 -
main/waeup.aaue/trunk/src/waeup/aaue/students/studycourse.py
r8482 r8746 38 38 @property 39 39 def next_session_allowed(self): 40 state = self. getStudent().state40 state = self.student.state 41 41 certificate = getattr(self, 'certificate', None) 42 42 if certificate == None:
Note: See TracChangeset for help on using the changeset viewer.