Changeset 13783 for main/waeup.aaue/trunk/src
- Timestamp:
- 18 Mar 2016, 15:17:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r13731 r13783 85 85 self.output = ERROR_PART1 + 'Wrong IP address' + ERROR_PART2 86 86 return 87 if PAYMENT_TYPE not in ('SCHOOL-FEE-RETURNING', 'SCHOOL-FEE-NEW', 88 'ACCEPTANCE-FEE', 'APPLICATION-FEE', 'LATE-REGISTRATION', 89 'AAU-STUDENT-WELFARE-ASSURANCE','HOSTEL-ACCOMMODATION-FEE', 90 'AAU-LAPEL-FILE-FEE','MATRICULATION-GOWN-FEE','CONCESSIONAL-FEE', 91 'STUDENTS-UNION-DUES','MEDICAL-STUDENT-ASSURANCE-FEE'): 87 if PAYMENT_TYPE not in ( 88 'SCHOOL-FEE-NEW', 89 'SCHOOL-FEE-RETURNING', 90 'SCHOOL-FEE-PLUS-NEW', 91 'SCHOOL-FEE-PLUS-RETURNING', 92 'SCHOOL-FEE-PG-NEW', 93 'SCHOOL-FEE-PG-RETURNING', 94 'SCHOOL-FEE-FIRST-INSTALMENT-PLUS', 95 'SCHOOL-FEE-SECOND-INSTALMENT', 96 'SCHOOL-FEE-BALANCE', 97 'ACCEPTANCE-FEE', 98 'ACCEPTANCE-FEE-PLUS', 99 'ACCEPTANCE-FEE-PG', 100 'APPLICATION-FEE', 101 'LATE-REGISTRATION', 102 'AAU-STUDENT-WELFARE-ASSURANCE', 103 'HOSTEL-ACCOMMODATION-FEE', 104 'AAU-LAPEL-FILE-FEE', 105 'MATRICULATION-GOWN-FEE', 106 'CONCESSIONAL-FEE', 107 'STUDENTS-UNION-DUES', 108 'MEDICAL-STUDENT-ASSURANCE-FEE'): 92 109 self.output = ERROR_PART1 + 'Invalid PAYMENT_TYPE' + ERROR_PART2 93 110 return … … 110 127 self.output = ERROR_PART1 + 'Invalid PAYEE_ID' + ERROR_PART2 111 128 return 129 student = getattr(results[0], 'student', None) 112 130 amount = results[0].amount_auth 113 131 payment_type = results[0].category … … 121 139 self.output = ERROR_PART1 + 'PAYEE_ID already used' + ERROR_PART2 122 140 return 123 if PAYMENT_TYPE.startswith('SCHOOL-FEE'): 124 try: 125 student = results[0].student 126 except AttributeError: 127 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 128 return 129 if not results[0].p_category.startswith('schoolfee'): 130 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 131 return 132 if PAYMENT_TYPE == 'SCHOOL-FEE-RETURNING' and student.state == CLEARED: 133 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 134 return 135 if PAYMENT_TYPE == 'SCHOOL-FEE-NEW' and student.state != CLEARED: 136 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 137 return 138 if PAYMENT_TYPE == 'ACCEPTANCE-FEE' \ 141 if PAYMENT_TYPE.startswith('SCHOOL-FEE') \ 142 and not results[0].p_category.startswith('schoolfee'): 143 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 144 return 145 if '-FIRST' in PAYMENT_TYPE and not '_1' in results[0].p_category: 146 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 147 return 148 if '-SECOND' in PAYMENT_TYPE and not '_2' in results[0].p_category: 149 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 150 return 151 if student and PAYMENT_TYPE.endswith('-RETURNING') \ 152 and student.state == CLEARED: 153 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 154 return 155 if student and PAYMENT_TYPE.endswith('-NEW') \ 156 and student.state != CLEARED: 157 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 158 return 159 if student and '-PG' in PAYMENT_TYPE and not student.is_postgrad: 160 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 161 return 162 if '-BALANCE' in PAYMENT_TYPE and results[0].p_item != 'Balance': 163 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 164 return 165 if '-PLUS' in PAYMENT_TYPE and not 'incl' in results[0].p_category: 166 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 167 return 168 if PAYMENT_TYPE.startswith('ACCEPTANCE-FEE') \ 139 169 and not results[0].p_category.startswith('clearance'): 170 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 171 return 172 if PAYMENT_TYPE == 'LATE-ADMISSION-PROCESSING' \ 173 and not results[0].p_category == 'late_registration': 174 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 175 return 176 if PAYMENT_TYPE == 'AAU-STUDENT-WELFARE-ASSURANCE' \ 177 and not results[0].p_category == 'welfare': 178 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 179 return 180 if PAYMENT_TYPE == 'HOSTEL-ACCOMMODATION-FEE' \ 181 and not results[0].p_category == 'hostel_maintenance': 182 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 183 return 184 if PAYMENT_TYPE == 'AAU-LAPEL-FILE-FEE' \ 185 and not results[0].p_category == 'lapel': 186 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 187 return 188 if PAYMENT_TYPE == 'MATRICULATION-GOWN-FEE' \ 189 and not results[0].p_category == 'matric_gown': 190 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 191 return 192 if PAYMENT_TYPE == 'CONCESSIONAL-FEE' \ 193 and not results[0].p_category == 'concessional': 194 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 195 return 196 if PAYMENT_TYPE == 'STUDENTS-UNION-DUES' \ 197 and not results[0].p_category == 'union': 198 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 199 return 200 if PAYMENT_TYPE == 'MEDICAL-STUDENT-ASSURANCE-FEE' \ 201 and not results[0].p_category == 'medical': 140 202 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 141 203 return 142 204 if PAYMENT_TYPE == 'APPLICATION-FEE' \ 143 205 and not results[0].p_category == 'application': 144 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2145 return146 if PAYMENT_TYPE == 'LATE-ADMISSION-PROCESSING' \147 and not results[0].p_category == 'late_registration':148 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2149 return150 if PAYMENT_TYPE == 'AAU-STUDENT-WELFARE-ASSURANCE' \151 and not results[0].p_category == 'welfare':152 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2153 return154 if PAYMENT_TYPE == 'HOSTEL-ACCOMMODATION-FEE' \155 and not results[0].p_category == 'hostel_maintenance':156 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2157 return158 if PAYMENT_TYPE == 'AAU-LAPEL-FILE-FEE' \159 and not results[0].p_category == 'lapel':160 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2161 return162 if PAYMENT_TYPE == 'MATRICULATION-GOWN-FEE' \163 and not results[0].p_category == 'matric_gown':164 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2165 return166 if PAYMENT_TYPE == 'CONCESSIONAL-FEE' \167 and not results[0].p_category == 'concessional':168 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2169 return170 if PAYMENT_TYPE == 'STUDENTS-UNION-DUES' \171 and not results[0].p_category == 'union':172 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2173 return174 if PAYMENT_TYPE == 'MEDICAL-STUDENT-ASSURANCE-FEE' \175 and not results[0].p_category == 'medical':176 206 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 177 207 return
Note: See TracChangeset for help on using the changeset viewer.