Changeset 8247 for main/waeup.uniben/trunk/src/waeup/uniben/utils
- Timestamp:
- 22 Apr 2012, 12:56:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
r8242 r8247 21 21 import pytz 22 22 from waeup.kofa.utils.utils import KofaUtils, sorted_phone_prefixes 23 from waeup.kofa.accesscodes import create_accesscode24 23 from waeup.uniben.interfaces import MessageFactory as _ 25 26 def actions_after_payment(student, payment, view):27 if payment.p_category == 'clearance':28 # Create CLR access code29 pin, error = create_accesscode('CLR',0,student.student_id)30 if error:31 view.flash(_('Valid callback received. ${a}',32 mapping = {'a':error}))33 return34 payment.ac = pin35 elif payment.p_category == 'schoolfee':36 # Create SFE access code37 pin, error = create_accesscode('SFE',0,student.student_id)38 if error:39 view.flash(_('Valid callback received. ${a}',40 mapping = {'a':error}))41 return42 payment.ac = pin43 elif payment.p_category == 'bed_allocation':44 # Create HOS access code45 pin, error = create_accesscode('HOS',0,student.student_id)46 if error:47 view.flash(_('Valid callback received. ${a}',48 mapping = {'a':error}))49 return50 payment.ac = pin51 view.flash(_('Valid callback received.'))52 return53 24 54 25 INT_PHONE_PREFIXES = [
Note: See TracChangeset for help on using the changeset viewer.