Changeset 16526
- Timestamp:
- 5 Jul 2021, 15:42:14 (3 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r16518 r16526 4 4 1.7.2.dev0 (unreleased) 5 5 ======================= 6 7 * Extend `IPayer` adapter. 6 8 7 9 * Adjust `ApplicantOnlinePaymentProcessor.getMapping` (2nd bugfix). -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py
r16225 r16526 94 94 95 95 @property 96 def payer(self): 97 "The payer object" 98 return self.context.__parent__ 99 100 @property 96 101 def display_fullname(self): 97 102 "Name of payer" … … 140 145 return 'N/A' 141 146 147 def doAfterPayment(self): 148 "Do after payment was made." 149 return self.context.__parent__.doAfterApplicantPayment() 150 142 151 # Applicant online payments must be importable. So we might need a factory. 143 152 class ApplicantOnlinePaymentFactory(grok.GlobalUtility): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r16243 r16526 1018 1018 self.assertEqual(payment.amount_auth,200.0) 1019 1019 # Applicant is payer of the payment ticket. 1020 self.assertEqual(IPayer(payment).payer, self.applicant) 1020 1021 self.assertEqual( 1021 1022 IPayer(payment).display_fullname, 'John Anthony Tester') -
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r16500 r16526 167 167 class IPayer(IKofaObject): 168 168 """An interface for an adapter to publish student and applicant data 169 through a simple webservice. 169 through a simple webservice. Also used in payment modules. 170 170 171 171 """ 172 payer = Attribute("The payer object") 172 173 display_fullname = Attribute('Name of payer') 173 174 id = Attribute('Id of payer') … … 180 181 current_mode= Attribute('Current study mode of payer') 181 182 current_level= Attribute('Current level of payer') 183 184 def doAfterPayment(): 185 "Do after payment was made." -
main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py
r15325 r16526 182 182 183 183 @property 184 def payer(self): 185 "The payer object" 186 return self.context.student 187 188 @property 184 189 def display_fullname(self): 185 190 "Name of payer" … … 230 235 "Current level of payer" 231 236 return self.context.student.current_level 237 238 def doAfterPayment(self): 239 "Do after payment was made." 240 return self.context.student.doAfterStudentPayment() 232 241 233 242 # Student online payments must be importable. So we might need a factory. -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r16465 r16526 3408 3408 # Student is the payer of the payment ticket. 3409 3409 payer = IPayer(self.student['payments'][value]) 3410 self.assertEqual(payer.payer, self.student) 3410 3411 self.assertEqual(payer.display_fullname, 'Anna Tester') 3411 3412 self.assertEqual(payer.id, self.student_id)
Note: See TracChangeset for help on using the changeset viewer.