Changeset 1992
- Timestamp:
- 5 Jul 2007, 20:50:28 (17 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 added
- 4 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/LICENSE.txt
r486 r1992 1 2 SACustom3 1 Copyright 2005 WAeUP Group 4 2 -
WAeUP_SRP/trunk/skins/waeup_epayment/getSchoolFee.py
r1247 r1992 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters=faculty=None 7 ##parameters=faculty=None, session=None 8 8 ##title= 9 9 ## … … 18 18 "EDU", 19 19 ) 20 fee_1_data = ("22200","School Fee for Session 2006/2007") 21 fee_2_data = ("23700","School Fee for Session 2006/2007") 20 21 sessionstring = "School Fee for Session %s" % context.portal_vocabularies.sessions.get(session) 22 fee_1_data = ("22200",sessionstring) 23 fee_2_data = ("23700",sessionstring) 22 24 23 25 if faculty in fee1: -
WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py
r1973 r1992 51 51 for rc,pdk in resp_codes: 52 52 pd[pdk] = request.get(rc,'') 53 54 # for testing purposes 55 #pd['resp_desc'] = 'Simulated Callback' 56 #pd['resp_pay_reference'] = 'XXXX' 57 #pd['resp_code'] = '00' 58 #pd['resp_card_num'] = '0000' 59 #pd['resp_approved_amount'] = '10000' 60 53 61 if pd['resp_code'] == '00' and len(pd['resp_approved_amount']) > 4: 54 62 pd['resp_approved_amount'] = pd['resp_approved_amount'][:-2] … … 63 71 context.getContent().edit(mapping = pd) 64 72 resp = pd['resp_code'] 73 74 s_brain = context.students_catalog(id=student_id)[0] 75 session = s_brain.session 76 next_session, next_session_str = context.getNextSessionId(session) 77 65 78 if resp == '00': 66 79 if context.getStudentReviewState() == "school_fee_paid": 67 80 logger.info('%s paid school_fee in state school_fee_paid' % (student_id)) 68 81 else: 69 wftool.doActionFor(student,'pay_school_fee') 82 if next_session == context.getSessionId()[-2:]: 83 wftool.doActionFor(student,'pay_school_fee') 84 else: 85 study_course = getattr(student,'study_course') 86 try: 87 wftool.doActionFor(study_course,'open') 88 except: 89 pass 90 study_course_doc = study_course.getContent() 91 next_level = "%s" % (int(s_brain.level) + 100) 92 study_course_doc.edit(mapping= {'current_level': next_level, 93 'current_session': next_session,}) 70 94 logger.info('%s received valid callback' % student_id) 71 95 referer = request.get('HTTP_REFERER','none') -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_interswitch.py
r1946 r1992 34 34 35 35 sbrain = context.students_catalog(id=student_id)[0] 36 amount,description = context.getSchoolFee(sbrain.faculty )36 amount,description = context.getSchoolFee(sbrain.faculty,sbrain.session) 37 37 info = {} 38 38 info['site_id'] = '61' … … 111 111 uniben_amount = itotal - interswitch_amount 112 112 xmldict = {} 113 xmldict['detail_ref'] = args['txn_ref'] 114 xmldict['department'] = sbrain.department 113 xmldict['detail_ref'] = args['txn_ref'] 114 xmldict['department'] = sbrain.department 115 115 xmldict['faculty'] = sbrain.faculty 116 116 #xmldict['wema_amt'] = "%d" % wema_amount 117 #xmldict['provider_amt'] = "%d" % provider_amount 117 #xmldict['provider_amt'] = "%d" % provider_amount 118 118 xmldict['uniben_amt'] = "%d" % uniben_amount 119 119 ##<item_detail item_id="2" item_name="WEMA" item_amt="%(wema_amt)s" bank_id="16" acct_num="48398023902" /> … … 121 121 xmltext = """ 122 122 <payment_item_detail> 123 <item_details detail_ref="%(detail_ref)s" college="UNIBEN" department="%(department)s" 123 <item_details detail_ref="%(detail_ref)s" college="UNIBEN" department="%(department)s" 124 124 faculty="%(faculty)s"> 125 <item_detail item_id="1" item_name="UNIBEN" item_amt="%(uniben_amt)s" bank_id="16" acct_num="384950902390" /> 125 <item_detail item_id="1" item_name="UNIBEN" item_amt="%(uniben_amt)s" bank_id="16" acct_num="384950902390" /> 126 126 </item_details> 127 127 </payment_item_detail>
Note: See TracChangeset for help on using the changeset viewer.