Changeset 7926 for main/waeup.custom/trunk/src/waeup/custom/utils/utils.py
- Timestamp:
- 20 Mar 2012, 10:14:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.custom/trunk/src/waeup/custom/utils/utils.py
r7920 r7926 20 20 import os 21 21 from waeup.kofa.utils.utils import KofaUtils 22 from waeup.kofa.accesscodes import create_accesscode 23 from waeup.custom.interfaces import MessageFactory as _ 24 25 def actions_after_payment(student, payment, view): 26 if payment.p_category == 'clearance': 27 # Create CLR access code 28 pin, error = create_accesscode('CLR',0,student.student_id) 29 if error: 30 view.flash(_('Valid callback received. ${a}', 31 mapping = {'a':error})) 32 return 33 payment.ac = pin 34 elif payment.p_category == 'schoolfee': 35 # Create SFE access code 36 pin, error = create_accesscode('SFE',0,student.student_id) 37 if error: 38 view.flash(_('Valid callback received. ${a}', 39 mapping = {'a':error})) 40 return 41 payment.ac = pin 42 elif payment.p_category == 'bed_allocation': 43 # Create HOS access code 44 pin, error = create_accesscode('HOS',0,student.student_id) 45 if error: 46 view.flash(_('Valid callback received. ${a}', 47 mapping = {'a':error})) 48 return 49 payment.ac = pin 50 view.flash(_('Valid callback received.')) 51 return 22 52 23 53
Note: See TracChangeset for help on using the changeset viewer.