Changeset 1365 for WAeUP_SRP/trunk
- Timestamp:
- 26 Jan 2007, 22:05:40 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_epayment
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/epayment_cb.py
r1349 r1365 15 15 logger = logging.getLogger('EPayment.CallBack') 16 16 import DateTime 17 if context.portal_membership.isAnonymousUser(): 18 return None 17 19 18 20 request = context.REQUEST … … 36 38 pd[pdk] = request.get(rc) 37 39 context.getContent().edit(mapping=pd) 38 resp = pd['resp_desc'] 40 resp = pd['resp_desc'] 39 41 if resp.startswith('Appro') and resp.endswith('essful'): 40 42 wftool.doActionFor(student,'pay_school_fee') 41 43 logger.info('"%s", "received valid callback"' % student_id) 42 44 elif len(resp) < 3: 43 logger.info('"%s", "received no callback"' % student_id) 45 logger.info('"%s", "received no callback"' % student_id) 44 46 else: 45 logger.info('"%s", "received unsuccessfull callback"' % student_id) 47 logger.info('"%s", "received unsuccessfull callback"' % student_id) 46 48 wftool.doActionFor(context,'close') 47 49 -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py
r1358 r1365 16 16 logger = logging.getLogger('EPayment.PayBySC') 17 17 import DateTime 18 19 if context.portal_membership.isAnonymousUser(): 20 return None 21 18 22 lt = context.portal_layouts 19 23 request = context.REQUEST 20 24 students = context.portal_url.getPortalObject().campus.students 21 22 25 student_id = context.getStudentId() 23 26 if student_id is None: … … 27 30 sbrain = context.students_catalog(id=student_id)[0] 28 31 amount,description = context.getSchoolFee(sbrain.faculty) 29 res = context.portal_catalog(portal_type="Certificate",30 id = sbrain.course)31 if not res:32 logger.info('"%s","certificate not found", "%s"' % (student_id,sbrain.course))33 prefix = ""34 else:35 prefix = res[0].getObject().getContent().school_fee_code36 if not prefix or prefix == 'none':37 prefix = res[0].getPath().split('/')[-4]38 32 39 33 validate = request.has_key("cpsdocument_create_button") -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
r1362 r1365 16 16 logger = logging.getLogger('EPayment.PayOnline') 17 17 import DateTime 18 19 if context.portal_membership.isAnonymousUser(): 20 return None 21 18 22 request = context.REQUEST 19 23 wftool = context.portal_workflow … … 21 25 22 26 student_id = context.getStudentId() 23 student = getattr(students,student_id) 27 student = getattr(students,student_id) 24 28 25 29 sbrain = context.students_catalog(id=student_id)[0] … … 53 57 if student_id is None: 54 58 return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 55 59 56 60 if context.portal_url().find('uniben-demo.waeup.org') >-1 or\ 57 61 context.portal_url().find('uniben.waeup.org') >-1: … … 60 64 #pass 61 65 #return None 62 info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id) 66 info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id) 63 67 64 68
Note: See TracChangeset for help on using the changeset viewer.