- Timestamp:
- 14 May 2014, 16:04:54 (11 years ago)
- Location:
- main/waeup.aaue/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/CHANGES.txt
r11651 r11652 4 4 1.2dev (unreleased) 5 5 =================== 6 7 * Let CustomPaymentDataWebservice distinguish between old and new student 8 school fee payments. 6 9 7 10 * To guarantee that cleared students pay both acceptance fee and school fees, -
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r11651 r11652 84 84 self.output = ERROR_PART1 + 'Wrong IP address' + ERROR_PART2 85 85 return 86 if PAYMENT_TYPE not in ('SCHOOL-FEE', 'ACCEPTANCE-FEE', 'APPLICATION-FEE'): 86 if PAYMENT_TYPE not in ('SCHOOL-FEE-RETURNING', 'SCHOOL-FEE-NEW', 87 'ACCEPTANCE-FEE', 'APPLICATION-FEE'): 87 88 self.output = ERROR_PART1 + 'Invalid PAYMENT_TYPE' + ERROR_PART2 88 89 return … … 105 106 self.output = ERROR_PART1 + 'Invalid PAYEE_ID' + ERROR_PART2 106 107 return 108 student = results[0].student 107 109 amount = results[0].amount_auth 108 110 payment_type = results[0].category … … 114 116 self.output = ERROR_PART1 + 'PAYEE_ID already used' + ERROR_PART2 115 117 return 116 if PAYMENT_TYPE == 'SCHOOL-FEE' \ 117 and not results[0].p_category.startswith('schoolfee'): 118 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 119 return 118 if PAYMENT_TYPE.startswith('SCHOOL-FEE'): 119 if not results[0].p_category.startswith('schoolfee'): 120 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 121 return 122 if PAYMENT_TYPE == 'SCHOOL-FEE-RETURNING' and student.state == CLEARED: 123 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 124 return 125 if PAYMENT_TYPE == 'SCHOOL-FEE-NEW' and student.state != CLEARED: 126 self.output = ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2 127 return 120 128 if PAYMENT_TYPE == 'ACCEPTANCE-FEE' \ 121 129 and not results[0].p_category == 'clearance': … … 140 148 return 141 149 self.output = ( 142 # Version 1143 #'FULL_NAME=%s&' +144 #'FACULTY=%s&' +145 #'DEPARTMENT=%s&' +146 #'RETURN_TYPE=%s&' +147 #'PROGRAMME_TYPE=%s&' +148 #'PAYMENT_TYPE=%s&' +149 #'ACADEMIC_SESSION=%s&' +150 #'MATRIC_NO=%s&' +151 #'FEE_AMOUNT=%s&' +152 #'TRANSACTION_STATUS=%s'153 154 # Version 2155 150 'PayeeName=%s~' + 156 151 'Faculty=%s~' + -
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py
r11651 r11652 84 84 def test_webservice(self): 85 85 self.browser.open( 86 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE '86 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-NEW' 87 87 % self.p_id) 88 88 self.assertEqual(self.browser.contents, 89 # Version 190 #'FULL_NAME=Anna Tester&'91 #'FACULTY=fac1&'92 #'DEPARTMENT=dep1&'93 #'RETURN_TYPE=%s&'94 #'PROGRAMME_TYPE=CERT1&'95 #'PAYMENT_TYPE=School Fee&'96 #'ACADEMIC_SESSION=2004/2005&'97 #'MATRIC_NO=E1000000&'98 #'FEE_AMOUNT=1234.0&'99 #'TRANSACTION_STATUS=unpaid'100 101 # Version 2102 89 'PayeeName=Anna Tester~' 103 90 'Faculty=fac1~' … … 121 108 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Missing PAYEE_ID' + ERROR_PART2) 122 109 self.browser.open( 123 'http://localhost/app/feerequest?PAYEE_ID=nonsense&PAYMENT_TYPE=SCHOOL-FEE ')110 'http://localhost/app/feerequest?PAYEE_ID=nonsense&PAYMENT_TYPE=SCHOOL-FEE-NEW') 124 111 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Invalid PAYEE_ID' + ERROR_PART2) 125 112 self.browser.open( … … 141 128 self.student['payments'][self.p_id].p_state = 'paid' 142 129 self.browser.open( 143 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE '130 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-NEW' 144 131 % self.p_id) 145 132 self.assertEqual(self.browser.contents, ERROR_PART1 + 'PAYEE_ID already used' + ERROR_PART2) 146 133 134 IWorkflowState(self.student).setState('returning') 135 self.student['payments'][self.p_id].p_state = 'unpaid' 136 self.browser.open( 137 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-NEW' 138 % self.p_id) 139 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2) 140 self.browser.open( 141 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-RETURNING' 142 % self.p_id) 143 144 self.assertEqual(self.browser.contents, 145 'PayeeName=Anna Tester~' 146 'Faculty=fac1~' 147 'Department=dep1~' 148 'Level=100~' 149 'ProgrammeType=CERT1~' 150 'StudyType=ug_ft~' 151 'Session=2004/2005~' 152 'PayeeID=%s~' 153 'Amount=1234.0~' 154 'FeeStatus=unpaid~' 155 'Semester=N/A~' 156 'PaymentType=School Fee~' 157 'MatricNumber=E1000000~' 158 'Email=aa@aa.ng~' 159 'PhoneNumber=1234' % self.p_id) 147 160 148 161 @external_test
Note: See TracChangeset for help on using the changeset viewer.