Changeset 2859 for WAeUP_SRP/uniben/waeup_custom
- Timestamp:
- 4 Dec 2007, 19:24:23 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/uniben/waeup_custom/getPaymentsFolderInfo.py
r2847 r2859 11 11 """ 12 12 Info for the PaymentsFolder 13 try: 14 from Products.zdb import set_trace 15 except: 16 def set_trace(): 17 pass 13 18 """ 14 19 … … 16 21 if mtool.isAnonymousUser(): 17 22 return None 18 try:19 from Products.zdb import set_trace20 except:21 def set_trace():22 pass23 24 23 25 24 #import logging … … 36 35 import DateTime 37 36 request = context.REQUEST 38 students = context.portal_url.getPortalObject().campus.students37 #students = context.portal_url.getPortalObject().campus.students 39 38 student_id = context.getStudentId() 40 39 if student_id is None: 41 40 return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 42 student = getattr(students,student_id)43 s _brain = context.students_catalog(id = student_id)[0]44 41 #student = getattr(students,student_id) 42 student_record = context.students_catalog.getRecordByKey(student_id) 43 context['updatePayments']() 45 44 payments = [] 46 #from Products.zdb import set_trace;set_trace()47 45 48 46 info = {} 49 47 is_so = info['is_so'] = context.isSectionOfficer() 50 48 is_student = info['is_student'] = context.isStudent() 51 info['student_name'] = s _brain.name49 info['student_name'] = student_record.name 52 50 info['query_url'] = "https://webpay.interswitchng.com/paydirect/services/TransactionQueryURL.aspx" 53 review_state = info['review_state'] = s _brain.review_state54 parttime = s _brain.mode and s_brain.mode.endswith('_pt')55 fulltime = s _brain.mode and s_brain.mode.endswith('_ft')51 review_state = info['review_state'] = student_record.review_state 52 parttime = student_record.mode and student_record.mode.endswith('_pt') 53 fulltime = student_record.mode and student_record.mode.endswith('_ft') 56 54 57 55 #if review_state == 'cleared_and_validated' or (parttime and review_state == 'returning'): … … 60 58 # sc_payment = True 61 59 62 session = s _brain.session63 next_info = context.getNextInfo(s _brain)60 session = student_record.session 61 next_info = context.getNextInfo(student_record) 64 62 info['next_session'] = next_info['next_session_id'] 65 63 info['next_session_str'] = next_info['next_session_str'] … … 73 71 info['prod_id'] = '61' 74 72 75 info['student_name'] = s _brain.name73 info['student_name'] = student_record.name 76 74 payments_path = "%s/campus/students/%s/payments" % (context.portal_url.getPortalPath(),student_id) 77 75 sos = context.portal_catalog(container_path=payments_path) … … 97 95 if review_state == 'opened' and info['review_state'] == 'cleared_and_validated' and hasattr(so_doc, 'order_id') and not so_doc.resp_code: 98 96 row['is_requeryable'] = True 99 row['callback_url'] = "%s/payments/%s/interswitch_cb" % (student.absolute_url(), 100 so.getId) 97 row['callback_url'] = "%s/interswitch_cb" % (payments_path) 101 98 href = '%(query_url)s' % info 102 99 href += '?transRef=%(trans_ref)s' % row
Note: See TracChangeset for help on using the changeset viewer.