Changeset 2962
- Timestamp:
- 19 Dec 2007, 17:35:25 (17 years ago)
- Location:
- WAeUP_SRP/base/skins
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py
r2957 r2962 96 96 try: 97 97 wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco']) 98 return request.RESPONSE.redirect("%s/accommodation_view" % acco_info['student'].absolute_url())99 98 except: 100 99 logger.info('%s no workflow action pay_maintenance_fee' % student_id) 101 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())100 #return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 102 101 else: 103 102 logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc'])) … … 106 105 except: 107 106 logger.info('%s no workflow action close' % student_id) 107 return request.RESPONSE.redirect("%s/accommodation_view" % acco_info['student'].absolute_url()) 108 108 109 109 110 #else: 111 # next_info = context.getNextInfo(s_brain) 112 # next_session_id = next_info['next_session_id'] 113 # next_session_str = next_info['next_session_str'] 114 # next_level_id = next_info['next_level_id'] 115 # next_transition = next_info['next_transition'] 116 # next_verdict = next_info['next_verdict'] 117 # next_previous_verdict = next_info['next_previous_verdict'] 118 # 119 # if resp == '00': 120 # if context.getStudentReviewState() == "school_fee_paid": 121 # logger.info('%s paid school_fee in state school_fee_paid' % (student_id)) 122 # else: 123 # study_course = getattr(student,'study_course') 124 # try: 125 # wftool.doActionFor(study_course,'open') 126 # except: 127 # pass 128 # verdict = s_brain.verdict 129 # if next_previous_verdict == 'N/A': 130 # next_previous_verdict = '' 131 # study_course.getContent().edit(mapping= {'current_level': next_level_id, 132 # 'current_session': next_session_id, 133 # 'current_verdict': next_verdict, 134 # 'previous_verdict': next_previous_verdict, 135 # }) 136 # if next_transition: 137 # wftool.doActionFor(student,next_transition) 110 138 111 else: 112 next_info = context.getNextInfo(s_brain) 113 next_session_id = next_info['next_session_id'] 114 next_session_str = next_info['next_session_str'] 115 next_level_id = next_info['next_level_id'] 116 next_transition = next_info['next_transition'] 117 next_verdict = next_info['next_verdict'] 118 next_previous_verdict = next_info['next_previous_verdict'] 119 120 if resp == '00': 121 if context.getStudentReviewState() == "school_fee_paid": 122 logger.info('%s paid school_fee in state school_fee_paid' % (student_id)) 123 else: 124 study_course = getattr(student,'study_course') 125 try: 126 wftool.doActionFor(study_course,'open') 127 except: 128 pass 129 verdict = s_brain.verdict 130 if next_previous_verdict == 'N/A': 131 next_previous_verdict = '' 132 study_course.getContent().edit(mapping= {'current_level': next_level_id, 133 'current_session': next_session_id, 134 'current_verdict': next_verdict, 135 'previous_verdict': next_previous_verdict, 136 }) 137 if next_transition: 138 wftool.doActionFor(student,next_transition) 139 140 logger.info('%s received valid callback' % student_id) 141 referer = request.get('HTTP_REFERER','none') 142 logger.info('%s valid callback referer = %s' % (student_id,referer)) 143 real_ip = request.get('HTTP_X_REAL_IP',"none") 144 logger.info('%s valid callback real_ip = %s' % (student_id,real_ip)) 145 else: 146 logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc'])) 147 try: 148 wftool.doActionFor(context,'close') 149 except: 150 logger.info('%s no workflow action close' % student_id) 139 # logger.info('%s received valid callback' % student_id) 140 # referer = request.get('HTTP_REFERER','none') 141 # logger.info('%s valid callback referer = %s' % (student_id,referer)) 142 # real_ip = request.get('HTTP_X_REAL_IP',"none") 143 # logger.info('%s valid callback real_ip = %s' % (student_id,real_ip)) 144 # else: 145 # logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc'])) 146 # try: 147 # wftool.doActionFor(context,'close') 148 # except: 149 # logger.info('%s no workflow action close' % student_id) 151 150 152 151
Note: See TracChangeset for help on using the changeset viewer.