Changeset 3240 for WAeUP_SRP/base/skins/waeup_epayment
- Timestamp:
- 26 Feb 2008, 22:40:31 (17 years ago)
- Location:
- WAeUP_SRP/base/skins/waeup_epayment
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_epayment/approve_epayment.py
r2941 r3240 41 41 42 42 pd = {} 43 #from Products.zdb import set_trace;set_trace()44 43 doc = context.getContent() 45 review_state = wftool.getInfoFor(context,'review_state',None)46 if review_state != "opened":47 return "not opened %s" % review_state48 44 pd['resp_code'] = 'AP' 49 45 pd['resp_desc'] = 'Payment approved by %s, %s' % (member,DateTime.DateTime()) … … 51 47 doc.edit(mapping=pd) 52 48 53 if doc.type_description.startswith('School Fee'):54 study_course = getattr(student,'study_course')55 try:56 wftool.doActionFor(study_course,'open')57 except:58 pass59 verdict = s_brain.verdict60 if verdict == 'N/A':61 verdict = ''62 study_course.getContent().edit(mapping= {'current_level': next_level_id,63 'current_session': next_session_id,64 'current_verdict': next_verdict,65 'previous_verdict': verdict,66 })67 if next_transition:68 wftool.doActionFor(student,next_transition)49 #if doc.type_description.startswith('School Fee'): 50 # study_course = getattr(student,'study_course') 51 # try: 52 # wftool.doActionFor(study_course,'open') 53 # except: 54 # pass 55 # verdict = s_brain.verdict 56 # if verdict == 'N/A': 57 # verdict = '' 58 # study_course.getContent().edit(mapping= {'current_level': next_level_id, 59 # 'current_session': next_session_id, 60 # 'current_verdict': next_verdict, 61 # 'previous_verdict': verdict, 62 # }) 63 # if next_transition: 64 # wftool.doActionFor(student,next_transition) 69 65 70 66 logger.info('%s approves epayment for %s' % (member,student_id)) 71 wftool.doActionFor(context,'close') 67 review_state = wftool.getInfoFor(context,'review_state',None) 68 if review_state == 'opened': 69 wftool.doActionFor(context,'close') 72 70 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) -
WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py
r3239 r3240 21 21 from AccessControl import Unauthorized 22 22 import DateTime 23 24 23 25 24 if context.portal_membership.isAnonymousUser(): … … 92 91 93 92 if resp == '00': 94 if context.getStudentReviewState() == "school_fee_paid": 95 logger.info('%s paid school_fee in state school_fee_paid' % (student_id)) 96 else: 97 study_course = getattr(student,'study_course') 93 94 if pay_doc.category == 'schoolfee': 95 if context.getStudentReviewState() == "school_fee_paid": 96 logger.info('%s paid school_fee in state school_fee_paid' % (student_id)) 97 else: 98 study_course = getattr(student,'study_course') 99 try: 100 wftool.doActionFor(study_course,'open') 101 except: 102 pass 103 verdict = s_brain.verdict 104 if next_previous_verdict == 'N/A': 105 next_previous_verdict = '' 106 study_course.getContent().edit(mapping= {'current_level': next_level_id, 107 'current_session': next_session_id, 108 'current_verdict': next_verdict, 109 'previous_verdict': next_previous_verdict, 110 }) 111 if next_transition: 112 wftool.doActionFor(student,next_transition) 113 114 115 elif pay_doc.category == 'hostel_maintenance': 116 acco_info = context.getAccommodationInfo() 117 d = {} 118 d['acco_maint_date'] = pay_doc.date 119 d['acco_maint_fee'] = pay_doc.amount 120 d['acco_maint_pay_id'] = context.getId() 98 121 try: 99 wftool.doActionFor(study_course,'open')122 acco_info['acco_doc'].edit(mapping=d) 100 123 except: 101 pass 102 verdict = s_brain.verdict 103 if next_previous_verdict == 'N/A': 104 next_previous_verdict = '' 105 study_course.getContent().edit(mapping= {'current_level': next_level_id, 106 'current_session': next_session_id, 107 'current_verdict': next_verdict, 108 'previous_verdict': next_previous_verdict, 109 }) 110 if next_transition: 111 wftool.doActionFor(student,next_transition) 124 logger.info('%s requeried payment though maintenance already paid' % student_id) 125 126 try: 127 wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco']) 128 except: 129 logger.info('%s no workflow action pay_maintenance_fee' % student_id) 130 131 112 132 113 133 logger.info('%s received valid callback' % student_id) 114 referer = request.get('HTTP_REFERER','none')115 logger.info('%s valid callback referer = %s' % (student_id,referer))116 real_ip = request.get('HTTP_X_REAL_IP',"none")117 logger.info('%s valid callback real_ip = %s' % (student_id,real_ip))134 #referer = request.get('HTTP_REFERER','none') 135 #logger.info('%s valid callback referer = %s' % (student_id,referer)) 136 #real_ip = request.get('HTTP_X_REAL_IP',"none") 137 #logger.info('%s valid callback real_ip = %s' % (student_id,real_ip)) 118 138 119 139 else: 120 140 logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc'])) 121 141 122 wftool.doActionFor(context,'close') 142 review_state = wftool.getInfoFor(context,'review_state',None) 143 if review_state == 'opened': 144 wftool.doActionFor(context,'close') 123 145 124 146 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
Note: See TracChangeset for help on using the changeset viewer.