Ignore:
Timestamp:
26 Jan 2007, 22:05:40 (18 years ago)
Author:
Henrik Bettermann
Message:

not callable by anononymous

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  
    1515logger = logging.getLogger('EPayment.CallBack')
    1616import DateTime
     17if context.portal_membership.isAnonymousUser():
     18    return None
    1719
    1820request = context.REQUEST
     
    3638    pd[pdk] = request.get(rc)
    3739context.getContent().edit(mapping=pd)
    38 resp = pd['resp_desc'] 
     40resp = pd['resp_desc']
    3941if  resp.startswith('Appro') and resp.endswith('essful'):
    4042    wftool.doActionFor(student,'pay_school_fee')
    4143    logger.info('"%s", "received valid callback"' % student_id)
    4244elif len(resp) < 3:
    43     logger.info('"%s", "received no callback"' % student_id)   
     45    logger.info('"%s", "received no callback"' % student_id)
    4446else:
    45     logger.info('"%s", "received unsuccessfull callback"' % student_id)   
     47    logger.info('"%s", "received unsuccessfull callback"' % student_id)
    4648wftool.doActionFor(context,'close')
    4749
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py

    r1358 r1365  
    1616logger = logging.getLogger('EPayment.PayBySC')
    1717import DateTime
     18
     19if context.portal_membership.isAnonymousUser():
     20    return None
     21
    1822lt = context.portal_layouts
    1923request = context.REQUEST
    2024students = context.portal_url.getPortalObject().campus.students
    21 
    2225student_id = context.getStudentId()
    2326if student_id is None:
     
    2730sbrain = context.students_catalog(id=student_id)[0]
    2831amount,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_code
    36     if not prefix or prefix == 'none':
    37         prefix = res[0].getPath().split('/')[-4]
    3832
    3933validate = request.has_key("cpsdocument_create_button")
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py

    r1362 r1365  
    1616logger = logging.getLogger('EPayment.PayOnline')
    1717import DateTime
     18
     19if context.portal_membership.isAnonymousUser():
     20    return None
     21
    1822request = context.REQUEST
    1923wftool = context.portal_workflow
     
    2125
    2226student_id = context.getStudentId()
    23 student = getattr(students,student_id) 
     27student = getattr(students,student_id)
    2428
    2529sbrain = context.students_catalog(id=student_id)[0]
     
    5357if student_id is None:
    5458    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    55    
     59
    5660if context.portal_url().find('uniben-demo.waeup.org') >-1 or\
    5761   context.portal_url().find('uniben.waeup.org') >-1:
     
    6064    #pass
    6165    #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)
    6367
    6468
Note: See TracChangeset for help on using the changeset viewer.